Monitor for the Gitlab runner service. This usually runs on port 9252, so to monitor an instance on the same host as the agent, you can do:
monitors:
- type: gitlab-runner
host: localhost
port: 9252
For more information on configuring monitoring within Gitlab runner itself, see https://docs.gitlab.com/runner/monitoring/README.html.
See the Gitlab monitor for more information.
Monitor Type: gitlab-runner
Accepts Endpoints: Yes
Multiple Instances Allowed: Yes
Config option | Required | Type | Description |
---|---|---|---|
host |
yes | string |
Host of the exporter |
port |
yes | integer |
Port of the exporter |
useHTTPS |
no | bool |
If true, the agent will connect to the exporter using HTTPS instead of plain HTTP. (default: false ) |
skipVerify |
no | bool |
If useHTTPS is true and this option is also true, the exporter's TLS cert will not be verified. (default: false ) |
metricPath |
no | string |
Path to the metrics endpoint on the exporter server, usually /metrics (the default). (default: /metrics ) |
sendAllMetrics |
no | bool |
Send all the metrics that come out of the Prometheus exporter without any filtering. This option has no effect when using the prometheus exporter monitor directly since there is no built-in filtering, only when embedding it in other monitors. (default: false ) |
The following table lists the metrics available for this monitor. Metrics that are marked as Included are standard metrics and are monitored by default.
Name | Type | Included | Description |
---|---|---|---|
gitlab_runner_api_request_statuses_total |
cumulative | The total number of API requests, partitioned by runner, endpoint and status | |
gitlab_runner_autoscaling_machine_creation_duration_seconds_bucket |
cumulative | Histogram of machine creation time | |
gitlab_runner_autoscaling_machine_creation_duration_seconds |
cumulative | Histogram of machine creation time | |
gitlab_runner_autoscaling_machine_creation_duration_seconds_count |
cumulative | Histogram of machine creation time | |
gitlab_runner_autoscaling_machine_states |
gauge | The current number of machines per state in this provider | |
gitlab_runner_concurrent |
gauge | The current value of concurrent setting | |
gitlab_runner_errors_total |
cumulative | ✔ | The number of catched errors |
gitlab_runner_limit |
gauge | The current value of concurrent setting | |
gitlab_runner_request_concurrency |
gauge | ✔ | The current number of concurrent requests for a new job |
gitlab_runner_request_concurrency_exceeded_total |
cumulative | Counter tracking exceeding of request concurrency | |
gitlab_runner_version_info |
gauge | A metric with a constant '1' value labeled by different build stats fields |
To specify custom metrics you want to monitor, add a metricsToInclude
filter
to the agent configuration, as shown in the code snippet below. The snippet
lists all available custom metrics. You can copy and paste the snippet into
your configuration file, then delete any custom metrics that you do not want
sent.
Note that some of the custom metrics require you to set a flag as well as add them to the list. Check the monitor configuration file to see if a flag is required for gathering additional metrics.
metricsToInclude:
- metricNames:
- gitlab_runner_api_request_statuses_total
- gitlab_runner_autoscaling_machine_creation_duration_seconds_bucket
- gitlab_runner_autoscaling_machine_creation_duration_seconds
- gitlab_runner_autoscaling_machine_creation_duration_seconds_count
- gitlab_runner_autoscaling_machine_states
- gitlab_runner_concurrent
- gitlab_runner_limit
- gitlab_runner_request_concurrency_exceeded_total
- gitlab_runner_version_info
monitorType: gitlab-runner