Compare commits
4 Commits
ca9882adde
...
2efb5b2554
Author | SHA1 | Date | |
---|---|---|---|
2efb5b2554 | |||
8f2dc691f2 | |||
1b119a94e3 | |||
5ef2bcd3e7 |
@ -3,6 +3,18 @@
|
||||
# Database servers
|
||||
---
|
||||
- hosts: vm-general-1.ashburn.mgmt.desu.ltd
|
||||
tasks:
|
||||
- name: assure prometheus psql exporter
|
||||
ansible.builtin.docker_container:
|
||||
name: prometheus-psql-exporter
|
||||
image: quay.io/prometheuscommunity/postgres-exporter
|
||||
env:
|
||||
DATA_SOURCE_URI: "10.0.0.2:5432/postgres"
|
||||
DATA_SOURCE_USER: "nagios"
|
||||
DATA_SOURCE_PASS: "{{ secret_postgresql_monitoring_password }}"
|
||||
ports:
|
||||
- 9102:9187/tcp
|
||||
tags: [ db, psql, prometheus, monitoring, docker ]
|
||||
roles:
|
||||
- role: geerlingguy.postgresql
|
||||
vars:
|
||||
|
@ -42,6 +42,8 @@
|
||||
image: quay.io/prometheus/node-exporter:latest
|
||||
command:
|
||||
- '--path.rootfs=/host'
|
||||
- '--collector.interrupts'
|
||||
- '--collector.processes'
|
||||
network_mode: host
|
||||
pid_mode: host
|
||||
volumes:
|
||||
|
@ -1,17 +1,17 @@
|
||||
# my global config
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
# The job name is added as a label `job=<job_name>` to any timeseries
|
||||
# scraped from this config.
|
||||
# Default Prometheus job to monitor itself
|
||||
- job_name: "prometheus"
|
||||
# metrics_path defaults to '/metrics'
|
||||
# scheme defaults to 'http'.
|
||||
static_configs:
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# These two jobs are included for every node in our inventory
|
||||
- job_name: "node-exporter"
|
||||
static_configs:
|
||||
- targets:
|
||||
@ -24,3 +24,11 @@ scrape_configs:
|
||||
{% for host in groups['tags_nagios'] %}
|
||||
- '{{ host }}:9101'
|
||||
{% endfor %}
|
||||
|
||||
# This container is used on every psql machine
|
||||
- job_name: "psql-exporter"
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for host in groups['tags_nagios-checkpgsql'] %}
|
||||
- '{{ host }}:9102'
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user