Integrating Ansible with monitoring tools
Because Ansible is flexible and can automate most of your day-to-day jobs, it is a common practice to automate every possible use case, even if it is not efficient. One of the so-called non-standard use cases we have learned from the community is using Ansible for monitoring purposes, as follows:
- Monitoring the service or application status in a system
- Running health checks on endpoints (applications, web services, or clusters)
- Monitoring network and security device rules or status
The following diagram shows a typical scenario where Ansible automation jobs are scheduled to run health checks on managed nodes or applications. These jobs can be either running as cron jobs from an Ansible control node or as a scheduled job in an Ansible automation controller:
Figure 14.3 – Using scheduled automation jobs for monitoring
This method is possible and easy to implement but is not efficient. It...