Run nagios plugins/checks from salt and get the return as data.
List all the nagios plugins
CLI Example:
salt '*' nagios.list_plugins
Run one nagios plugin and return retcode of the execution
Run one or more nagios plugins from pillar data and get the result of cmd.retcode The pillar have to be in this format:
------
webserver:
Ping_google:
- check_icmp: 8.8.8.8
- check_icmp: google.com
Load:
- check_load: -w 0.8 -c 1
APT:
- check_apt
-------
webserver is the role to check, the next keys are the group and the items the check with the arguments if needed
You must to group different checks(one o more) and always it will return the highest value of all the checks
CLI Example:
salt '*' nagios.retcode webserver
Run nagios plugin and return all the data execution with cmd.run
CLI Example:
salt '*' nagios.run check_apt
salt '*' nagios.run check_icmp '8.8.8.8'
Run nagios plugin and return all the data execution with cmd.run_all
Run one or more nagios plugins from pillar data and get the result of cmd.run_all The pillar have to be in this format:
------
webserver:
Ping_google:
- check_icmp: 8.8.8.8
- check_icmp: google.com
Load:
- check_load: -w 0.8 -c 1
APT:
- check_apt
-------
webserver is the role to check, the next keys are the group and the items the check with the arguments if needed
You have to group different checks in a group
CLI Example:
salt '*' nagios.run webserver
Run one or more nagios plugins from pillar data and get the result of cmd.run The pillar have to be in this format:
------
webserver:
Ping_google:
- check_icmp: 8.8.8.8
- check_icmp: google.com
Load:
- check_load: -w 0.8 -c 1
APT:
- check_apt
-------
webserver is the role to check, the next keys are the group and the items the check with the arguments if needed
You have to group different checks in a group
CLI Example:
salt '*' nagios.run webserver