KB450411 - Houston Monitoring and Alerting
Posted on March 15, 2021 by Brett Kelly
Houston Monitoring and Alerting
This article will show how to install and configure a monitoring, alerting and metric stack in Ubuntu 20.04 and CentOS7 using ansible.
More information can be found here.
- Ubuntu 20.04 LTS or CentOS7.9 installed
- Ansible installed
- Generate ssh key and copy it to yourself
ssh-keygen <Press enter for each line>
- Install monitoring-stack playbooks from github
git clone https://github.com/45Drives/monitoring-stack.git
- Initialize default varibles for playbook. Default values will do for majority of cases. See github readme for more options.
- Configure email send/recieve varibles for recieving alerts
- If using gmail,slack or another supported alert destinations leave the defaults alone. Manual configuration required.
- Open group_vars/metrics.yml for editing
- alertmanager_smtp_host: <email server hostanme or IP>
- alertmanager_smtp_port: <email server smtp port>
- alertmanager_send_email: <email address that sends alerts>
- alertmanager_receive_email: <email address that recieves alerts>
- multiple email address can be specified as
- Run playbook to deploy monitoring stack
ansible-playbook -i hosts deploy-monitoring.yml
- Offline zpool disk and verify email has been recieved
- Monitoring stack can be uninstalled back to a fresh state with
ansible-playbook -i hosts purge-monitoring.yml