Commit 9488d696 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'weimeng-master-patch-75474' into 'master'

Document prometheus scrape_configs

Closes gitlab-com/support/docs#29

See merge request gitlab-org/gitlab!19756
parents e3e294f9 b9578406
......@@ -78,6 +78,31 @@ To change the address/port that Prometheus listens on:
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect
### Adding custom scrape configs
You can configure additional scrape targets for the GitLab Omnibus-bundled
Prometheus by editing `prometheus['scrape_configs']` in `/etc/gitlab/gitlab.rb`
using the [Prometheus scrape target configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#%3Cscrape_config%3E)
syntax.
Here is an example configuration to scrape `http://1.1.1.1:8060/probe?param_a=test&param_b=additional_test`:
```ruby
prometheus['scrape_configs'] = [
{
'job_name': 'custom-scrape',
'metrics_path': '/probe',
'params' => {
'param_a' => ['test'],
'param_b' => ['additional_test']
},
'static_configs' => [
'targets' => ['1.1.1.1:8060'],
],
},
]
```
### Using an external Prometheus server
NOTE: **Note:**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment