2.0 KiB
2.0 KiB
profile::icinga::nrpe
- This profile is a function that configures
nrpeandsudoers(whenever needed) for a specific command: -
- Will create a
/etc/nrpe.d/<filename>.cfgfile fornrpe - Will create a
/etc/sudoers.d/<filename>file forsudoers(ifsudois required)
- Will create a
Parameters
| Name | Type | Default |
|---|---|---|
| command | String | |
| sudo | Boolean | false |
| notifications_enabled | Boolean | true |
command
Full path for the command to be configured in the nrpe.d
file. This will be translated in the nrpe.d as:
# sudo = true
command[${title}]=/usr/bin/sudo ${command}
# sudo = false
command[${title}]=${command}
sudo
Whether sudo is required or not for that command. By
default is false. When set to true,
/usr/bin/sudo will be added to the nrpe
command, and proper sudoers file will be configured.
Example:
Defaults:nrpe !requiretty
nrpe ALL=(root) NOPASSWD: ${command}
notifications_enables
Currently this settings has no effect. Will be used when exporting Nagios resources to the PuppetDB. Please ignore it in the meantime.
Facts
When some specific facts are detected, it will trigger some actions.
| Fact | Value(s) | Action description |