How to Use Ansible to Set Up System Monitoring with Prometheus


In summer 2017, I wrote two how-to articles about using Ansible. After the first article, I planned to show examples of the copysystemdserviceaptyumvirt, and usermodules. But I decided to tighten the scope of the second part to focus on using the yum and user modules. I explained how to set up a basic Git SSH server and explored the commandfileauthorized_keysyum, and user modules. In this third article, I’ll go into using Ansible for system monitoring with the Prometheus open source monitoring solution.

If you followed along with those first two articles, you should have:

  1. Installed an Ansible control host
  2. Created an SSH key on the Ansible control host
  3. Propagated the SSH key to all the machines you want Ansible to manage
  4. Restricted SSH access on all machines
  5. Installed a Git SSH server
  6. Created the git user, which is used to check code in and out of the Git SSH server