Ansible Role monitoring_plugins
This role deploys the Linuxfabik Monitoring Plugins, allowing them to be easily executed by a monitoring system.
Installation Methods
Taken from the Linuxfabrik Monitoring Plugins INSTALL document:
Platform |
Install |
Implemented by |
Requirements |
---|---|---|---|
Linux |
Binaries from rpm/deb package (default) |
|
Deploy the Repository for the Monitoring Plugins. This can be done using the linuxfabrik.lfops.repo_monitoring_plugins role. If you use the monitoring_plugins Playbook, this is automatically done for you. |
Linux |
Binaries from zip |
Currently not supported by this role |
|
Linux |
Source Code |
|
|
Windows |
Binaries from msi (default) |
|
Icinga2 Agent is required. |
Windows |
Binaries from zip |
|
Since you cannot change files that are currently used by a process in Windows, when running against a Windows host, this role first stops the Icinga2 service, deploys the plugins and starts the service again. Optionally, it sets a downtime for each host. Have a look at the optional role variables below for this. |
Windows |
Source Code |
Currently not supported by this role |
Additionally, this role allows you to deploy custom plugins which are placed under {{ inventory_dir }}/host_files/{{ inventory_hostname }}/usr/lib64/nagios/plugins
on the Ansible control node.
Mandatory Requirements
See table above.
Optional Role Variables
Variable |
Description |
Default Value |
---|---|---|
|
String. The password of the |
unset |
|
String. The address of the Icinga2 master API. This is required to schedule a downtime for Windows hosts. |
unset |
|
String. The Icinga2 API user. This is required to schedule a downtime for Windows hosts. Therefore, it needs to have the following permissions: |
unset |
|
String. Which variant of the monitoring plugins should be deployed? Possible options:
|
|
|
Skips the deployment of the notification-plugins (in addition to the check-plugins). For the usage in |
|
|
By default, the version of the |
|
|
String. Which version of the monitoring plugins should be deployed? Possible options: |
|
Example:
# optional
monitoring_plugins__icinga2_api_password: 'linuxfabrik'
monitoring_plugins__icinga2_api_url: 'https://192.0.2.3:5665/v1'
monitoring_plugins__icinga2_api_user: 'downtime-api-user'
monitoring_plugins__install_method: 'source'
monitoring_plugins__skip_notification_plugins__host_var: true
monitoring_plugins__skip_package_versionlock: false
monitoring_plugins__version: 'stable'
Troubleshooting
If you get No package linuxfabrik-monitoring-plugins-main available. msg: Failed to install some of the specified packages
while setting monitoring_plugins__version: 'dev'
, you simply forgot to also set monitoring_plugins__install_method: 'source'
.