Add Jenkins to Prometheus targets
Change-Id: Ie9853b9860b34536ded4a7583c48c735e75bb7b7
This commit is contained in:
parent
94c1a3c99a
commit
db1f492198
1 changed files with 7 additions and 0 deletions
|
@ -243,3 +243,10 @@ scrape_configs:
|
|||
port: {{ target.port }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
{%- if grains.get('jenkins_plugins', {}).get('prometheus', {}).get('version', False) %}
|
||||
- job_name: jenkins
|
||||
metrics_path: '/prometheus'
|
||||
static_configs:
|
||||
- targets: ['{{ pillar.get('jenkins').get('client').get('master').get('host') }}:{{ pillar.get('jenkins').get('client').get('master').get('port') }}']
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in a new issue