Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450411 – Houston Monitoring and Alerting

You are here:

Scope/Description

This article will show how to install and configure a monitoring, alerting and metric stack  in Ubuntu 20.04 and Rocky Linux 8 using ansible.

More information can be found here.

Prerequisites

  • Ubuntu 20.04 LTS or CentOS7.9 installed
  • Ansible installed

Steps

  • Generate ssh key and copy it to yourself
ssh-keygen <Press enter for each line>
ssh-copy-id localhost
  • Install monitoring-stack playbooks from github
cd /usr/share
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.
cd /usr/share/monitoring-stack
bash init.sh
  • Configure email send/recieve varibles for recieving alerts
vim /usr/share/monitoring-stack/group_vars/metrics.yml
  • If using gmail,slack or another supported alert destinations leave the defaults alone. Manual configuration required.
vim group_vars/metrics.yml
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 [email0, email1, email2, … email9]

  • If  using a public smtp server or need to authenticate to a local mail server, you will need to input the username and password. Leave variables empty in the case it is not needed. See parameters below.
alertmanager_smtp_username: 'username'
alertmanager_smtp_password: 'password'
  • Run playbook to deploy monitoring stack
ansible-playbook -i hosts deploy-monitoring.yml

Verification

  • Offline zpool disk and verify email has been received. Make sure to online the disk after the testing is complete.

Troubleshooting

  • Monitoring stack can be uninstalled back to a fresh state with
ansible-playbook -i hosts purge-monitoring.yml
  • If using a Gmail account you may need to turn less secure access on for your account.
  • Ensure the configuration is properly set in /etc/alertmanager/alertmanager.yml
Was this article helpful?
Dislike 12
Views: 2419
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access