redhat-cop / monitoring

Assets to manage monitoring infrastructure and applications
8 stars 12 forks source link

Alertmanager + seeding grafana with dashboards #9

Closed tkummer33 closed 4 years ago

tkummer33 commented 4 years ago

What does this PR do?

Add role to install Alertmanager on Prometheus hosts. The Alertmanager configures SMTP notification channel. Seed grafana with dashboards. Adds the scraping targets for Haproxy and Bind in prometheus.yml based on the inventory.

How should this be tested?

Run the setup-prometheus-grafana.yml playbook. Following variables are required in inventory:

docker_install: True
docker_username: centos
ansible_user: centos
dashboard_dir: /home/user/dashbooard dir  - Where are your grafana dashboards located
notification_recipients: somebody@example.com - Recipients list for the alert notifications

from group_vars/prometheus_master:
smtp_host: my_smtp_host
smtp_port: my_smtp_port
from: my_smtp_from
smtp_username: 'smtp_user'
smtp_password: 'smtp_password'

The result can be verified on the prometheus_master by running:

docker exec -ti alertmanager cat /etc/alertmanager/alertmanager.yml
docker exec -ti prometheus cat /etc/prometheus/first_rules.yml
docker exec -ti prometheus cat /etc/prometheus/prometheus.yml

Is there a relevant Issue open for this?

Provide a link to any open issues that describe the problem you are solving. resolves #

Other Relevant info, PRs, etc.

13 #14

People to notify

cc: @redhat-cop/monitoring