Add Jenkins to Prometheus targets

Change-Id: Ie9853b9860b34536ded4a7583c48c735e75bb7b7
This commit is contained in:
Konstantin Hontar 2017-08-15 16:34:29 +03:00
parent 94c1a3c99a
commit db1f492198

View file

@ -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 %}