Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-14 00:06:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-14 00:06:45 +0300
commitb42f312df5aee0f1b832b69171e9d1cf92eb7416 (patch)
treecf0f4e59d45688723d3d534ddf13564fa10d3050 /doc/administration/monitoring
parent57e3d49fc0fb99f42ac178761fc6232715734020 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/monitoring')
-rw-r--r--doc/administration/monitoring/prometheus/index.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/administration/monitoring/prometheus/index.md b/doc/administration/monitoring/prometheus/index.md
index c35d6f505be..c0b563bd76e 100644
--- a/doc/administration/monitoring/prometheus/index.md
+++ b/doc/administration/monitoring/prometheus/index.md
@@ -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:**