From: Zack Cerza Date: Tue, 1 May 2018 17:58:27 +0000 (-0600) Subject: ceph-prometheus: Add separate job for db host X-Git-Tag: v2.0~28^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb66531e2f105aa8819958ced43414732aba5e82;p=cephmetrics.git ceph-prometheus: Add separate job for db host So that we can monitor the db host's resources, without mixing that data in with the ceph cluster's metrics. Signed-off-by: Zack Cerza --- diff --git a/ansible/roles/ceph-prometheus/templates/prometheus.yml b/ansible/roles/ceph-prometheus/templates/prometheus.yml index f570421..36a319d 100644 --- a/ansible/roles/ceph-prometheus/templates/prometheus.yml +++ b/ansible/roles/ceph-prometheus/templates/prometheus.yml @@ -16,7 +16,14 @@ scrape_configs: {% endfor %} - job_name: 'node' static_configs: -{% for host in groups['all'] %} +{% for host in (groups['all'] | difference(groups['ceph-grafana'])) %} + - targets: ['{{ host }}:9100'] + labels: + instance: "{{ hostvars[host]['ansible_nodename'] }}" +{% endfor %} + - job_name: 'cephmetrics' + static_configs: +{% for host in groups['ceph-grafana'] %} - targets: ['{{ host }}:9100'] labels: instance: "{{ hostvars[host]['ansible_nodename'] }}"