Go to file
Ludovic Cartier 07f55dae29 add meta info
2024-12-20 16:36:39 +01:00
defaults Add default dns to cloudflare container 2024-05-24 11:05:59 +02:00
docs pve to proxmox 2024-04-25 09:22:30 +02:00
files/dashboards Add users processes panel on mysqld dashboard 2024-05-24 11:00:22 +02:00
handlers nginx - add handler 2023-04-21 15:25:46 +02:00
meta add meta info 2024-12-20 16:36:39 +01:00
tasks proxmox - virtualenv instead of venv 2024-04-24 18:14:08 +02:00
templates Add default dns to cloudflare container 2024-05-24 11:05:59 +02:00
example_file.yml big refacto - might have break things 2022-11-11 23:51:52 +01:00
LICENSE update license to MIT 2024-12-20 16:18:02 +01:00
README.md update license to MIT 2024-12-20 16:18:02 +01:00

prometheus

The present role :

  • Installs Prometheus server inside a docker container.
  • Installs various Prometheus exporter.
  • Deploys Grafana with a dashboard for each exporter configured.
  • Supports deploying VictoriaMetrics as the Prometheus backend.

Please note that Docker and Haproxy their own embedded exporters.

The role has been successfully tested on :

  • Debian 9
  • Debian 10
  • Debian 11

Forced upgrade of installed exporters can be done by setting the extra parameters "exporter_upgrade" to "yes".

ansible-playbook playbook/myhost.yml -t prometheus -e "exporter_upgrade=yes"

Role variables

Dependencies

  • jq
  • Docker must installed and running for prometheus server

Example Playbook

- hosts: prometheus
  ignore_errors: "{{ ansible_check_mode }}" # ignore errors only in check mode !

  roles:
    - { role: brainsys.prometheus, tags: ['prometheus'] }

Example variables

---
prometheus_server_enable: 'true'
prometheus_server_monitor: 'example'

prometheus_exporter_packages:
  - node
  - mysqld

prometheus_mysqld_exporter_user: 'foo'
prometheus_mysqld_exporter_password: 'bar'

prometheus_node_exporter_targets:
  - server01
  - server02

prometheus_mysqld_exporter_targets:
  - server01

TODO

  • documentation
    • review / enhance documentation
  • memcached
    • add options to exporter launch
      • --memcached.address="localhost:11211"
      • --memcached.timeout=1s
      • --memcached.pid-file=""
    • handle multi instances for memcached exporter

License

MIT

Author Information

Written by Ludovic Cartier ludovic.cartier@brainsys.io