Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #36497

Merged
merged 3 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ $ ghe-config app.github.rate-limiting-exempt-users "hubot github-actions[bot]"

### ghe-config-apply

This utility applies {% data variables.enterprise.management_console %} settings, reloads system services, prepares a storage device, reloads application services, and runs any pending database migrations. It is equivalent to clicking **Save settings** in the {% data variables.enterprise.management_console %}'s web UI or to sending a POST request to {% ifversion management-console-manage-ghes-parity %}[the `/manage/v1/config/apply` endpoint](/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run){% else %}[the `/setup/api/configure` endpoint](/rest/enterprise-admin/management-console){% endif %}.
This utility applies {% data variables.enterprise.management_console %} settings, reloads system services, prepares a storage device, reloads application services, and runs any pending database migrations. It is equivalent to clicking **Save settings** in the {% data variables.enterprise.management_console %}'s web UI or to sending a POST request to {% ifversion management-console-manage-ghes-parity %}[the `/manage/v1/config/apply` endpoint](/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run){% else %}[the `/setup/api/configure` endpoint](/rest/enterprise-admin/management-console){% endif %}. {% ifversion ghes > 3.15 %} Starting in version 3.16, this utility applies configuration changes conditionally to relevant settings. You can force it to run unconditionally by using `-f` flag. {% endif %}

```shell
ghe-config-apply
Expand Down
1 change: 1 addition & 0 deletions content/admin/all-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ For instances with {% data variables.product.prodname_actions %} enabled, self-h

| {% data variables.product.prodname_ghe_server %} version | Minimum Runner version |
| ------------------------------------------------- | ---------------------- |
| 3.16 | 2.321.0 ([release notes](https://github.com/actions/runner/releases/tag/v2.321.0)) |
| 3.15 | 2.319.1 ([release notes](https://github.com/actions/runner/releases/tag/v2.319.1)) |
| 3.14 | 2.317.0 ([release notes](https://github.com/actions/runner/releases/tag/v2.317.0)) |
| 3.13 | 2.314.1 ([release notes](https://github.com/actions/runner/releases/tag/v2.314.1)) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Your instance uses metrics from `collectd` to display graphs in the {% data vari

You can review a list of the metrics that `collectd` gathers on {% data variables.location.product_location %}. For more information, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/collectd-metrics-for-github-enterprise-server).

{% ifversion prometheus-metrics-exporter %}

> [!TIP] In {% data variables.product.prodname_ghe_server %} 3.16, support was added for exporting `collectd` metrics in Prometheus format. This update does not change the existing metrics stack in the appliance but provides an easier way to ingest metrics into an observability platform by supporting the Prometheus protocol. An additional option is available to expose collectd metrics in Prometheus format with an endpoint. See [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/exporting-and-scraping-prometheus-metrics).

{% endif %}

## Set up an external `collectd` server

If you haven't already set up an external `collectd` server, you will need to do so before enabling `collectd` forwarding on {% data variables.location.product_location %}. Your `collectd` server must be running `collectd` version 5.x or higher.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Exporting and scraping Prometheus metrics
shortTitle: Export and scrape Prometheus metrics
intro: "{% data variables.product.prodname_ghe_server %} provides Prometheus-compatible metrics by transforming `collectd` data. These metrics can be scraped from a dedicated endpoint, allowing integration with observability and monitoring tools for performance insights."
versions:
feature: prometheus-metrics-exporter
type: how_to
topics:
- Enterprise
- Fundamentals
- Infrastructure
- Monitoring
- Performance
---

{% data variables.product.prodname_ghe_server %} includes a Prometheus metrics exporter to simplify observability and monitoring. This feature allows metrics to be scraped directly from the appliance, eliminating the need to forward `collectd` metrics to an external `collectd` server for transformation before sending them to a Prometheus system. By supporting Prometheus-compatible metrics natively, the exporter enables seamless integration with external monitoring dashboards and alerting systems.

## Enabling Prometheus metrics exporter and scraping metrics

By default, the Prometheus metrics exporter and scraping are disabled. Enabling the exporter for `collectd` metrics opens the metrics endpoint (also knows as `scrape endpoint`) at `http(s)://HOSTNAME:9103`. Ensure that firewall rules allow traffic on port 9103.

You can enable the Prometheus metrics exporter using the {% data variables.enterprise.management_console %}, the command line interface within the appliance, or the API.

### Enabling using the {% data variables.enterprise.management_console %}

{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
1. In the monitoring settings, select **Enable prometheus**.
1. In the **Trusted IPv4/IPv6 addresses or CIDR blocks in a comma-separated list** field, type the comma-separated list of ip addresses or CIDR blocks. An example: `10.0.0.1, 192.168.1.0/8`. If this field is left empty, then scraping requests from any source IP will be accepted.
{% data reusables.enterprise_management_console.save-settings %}

### Enabling via the command line interface

To enable the Prometheus metrics exporter, SSH into the {% data variables.product.prodname_ghe_server %} appliance and run the following commands:

```shell
ghe-config app.prometheus.enabled true
# Specify a comma-separated list of trusted IPv4/IPv6 addresses or CIDR blocks.
ghe-config app.prometheus.trusted-ips "10.0.0.1, 192.168.1.0/8"
ghe-config-apply
```

### Enabling using the API

You can enable the Prometheus metrics exporter using the API by sending a `PUT` request to update the configuration settings.

```shell
curl -L -H "Content-Type: application/json" -X PUT -u "api_key:xxxxxxx" https://<hostname>/manage/v1/config/settings -d '{"prometheus": {"enabled": true, "trusted_ips": "10.0.0.1, 192.168.1.0/8"}}'
```

## Verifying the Prometheus metrics exporter is enabled

To verify that the Prometheus metrics exporter is enabled, use `curl` to query the `/metrics` endpoint on port 9103. For more information about the administrative ports, see [AUTOTITLE](/admin/configuring-settings/configuring-network-settings/network-ports#administrative-ports).

```shell
curl localhost:9103/metrics
```

If successful, the response will include metrics with the `collectd_` prefix.

## Configuring your external Prometheus server

To scrape exported metrics from {% data variables.product.prodname_ghe_server %}, add a scraping configuration to the `prometheus.yaml` file on your external Prometheus server.

```yaml
- job_name: "ghes-prom-agent"
scrape_interval: 10s
static_configs:
- targets: ["http(s)://HOSTNAME:9103/metrics"]
```

## Support for the darkshipped Prometheus metrics exporter

If you have been using the Prometheus metrics exporter since it was darkshipped in {% data variables.product.prodname_ghe_server %} 3.12, it will continue to work after upgrading to 3.16. In this version, you now have the option to specify trusted IPs for scraping requests.

## Sharing feedback

You can share your feedback on the Prometheus metrics exporter and scraping functionality with {% data variables.product.company_short %}. For help with questions or issues, visit {% data variables.contact.contact_ent_support %}.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ children:
- /about-system-logs
- /troubleshooting-resource-allocation-problems
- /generating-a-health-check-for-your-enterprise
- /exporting-and-scraping-prometheus-metrics
shortTitle: Monitor your instance
---

Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,13 @@ Simple Network Management Protocol (SNMP) is a widely supported method of monito
collectd is an open source statistics collection and reporting daemon with built-in support for writing to RRD files. Statistics on CPU utilization, memory and disk consumption, network interface traffic and errors, and system load can be forwarded to an external collectd server where graphs, analysis, and alerting may be configured using a wide range of available tools and plugins. To configure `collectd` forwarding, see [AUTOTITLE](/admin/enterprise-management/monitoring-your-appliance/configuring-collectd).

Additionally, the monitoring tools built into underlying virtualization platforms may also be used for basic monitoring and alerting of system resources. For more information, see [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) and [VMware vSphere](https://docs.vmware.com/en/VMware-vSphere/index.html) documentation.

{% ifversion prometheus-metrics-exporter %}

## About the Prometheus metrics exporter

The Prometheus metrics exporter allows you to integrate {% data variables.product.prodname_ghe_server %} metrics into your observability pipeline and tooling. You can scrape metrics in a Prometheus-compatible format via the `/metrics` API at regular intervals and feed them into your observability system.

To configure the Prometheus metrics exporter and scraping, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/exporting-and-scraping-prometheus-metrics).

{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The following table shows the reference types that are passed to {% data variabl
| {% data variables.product.prodname_vscode %} | Yes | Yes | Yes | No | Repository owner and branch |
| {% data variables.product.prodname_vs %} | Yes | Yes | Yes | No | Repository owner and branch |
| {% data variables.product.prodname_dotcom_the_website %} | No | No | Yes | Yes | Repository information and other {% data variables.product.github %} resources |
| {% data variables.product.prodname_mobile %} | No | No | No | Yes | Not applicable

{% endrowheaders %}

Expand Down
1 change: 1 addition & 0 deletions content/get-started/using-github/github-mobile.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following documentation contains more information about using {% data variab
{% ifversion mobile-code-search %}- For more information about using {% data variables.product.prodname_dotcom %} code search on {% data variables.product.prodname_mobile %}, see [AUTOTITLE](/search-github/github-code-search/using-github-code-search#using-github-code-search-on-github-mobile).{% endif %}
{% ifversion fpt or ghec %}- For more information on two-factor authentication using {% data variables.product.prodname_mobile %}, see [AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-github-mobile) and [Authenticating using {% data variables.product.prodname_mobile %}](/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication#verifying-with-github-mobile). {% endif %}
{% ifversion copilot-chat-for-mobile %}- For more information about using {% data variables.product.prodname_copilot_mobile %}, see [AUTOTITLE](/copilot/github-copilot-chat/copilot-chat-in-github-mobile/using-github-copilot-chat-in-github-mobile).{% endif %}
{% ifversion copilot-chat-for-mobile %}- For more information about using {% data variables.product.prodname_copilot_extensions %} in {% data variables.product.prodname_mobile %}, see [Extending {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_mobile %}](/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github-mobile#extending-copilot-chat-in-github-mobile).{% endif %}

## Installing {% data variables.product.prodname_mobile %}

Expand Down
1 change: 1 addition & 0 deletions content/rest/private-registries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ children:
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.16'
---

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ intro: Use the REST API to manage private registry configurations for organizati
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
ghes: '>=3.16'
topics:
- API
autogenerated: rest
Expand Down
3 changes: 3 additions & 0 deletions data/features/prometheus-metrics-exporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# In GHES 3.16, ability to scrape prometheus-compatible metrics is introduced
versions:
ghes: '>=3.16'
6 changes: 6 additions & 0 deletions data/release-notes/PLACEHOLDER-TEMPLATE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ sections:
- |
...

- heading: APIs
notes:
# LINK TO RELEASE ISSUE
- |
...

- heading: Migrations
notes:
# LINK TO RELEASE ISSUE
Expand Down
Loading
Loading