Nagios-plugins
From openSUSE
|
| |||||||||||||
[edit]
Features and documentation
Please refer to the upstream documentation on
- http://www.nagios.org/docs/
- http://nagiosplugins.org/
- http://www.nagioscommunity.org/wiki/index.php/Main_Page
The openSUSE package contains most of the currently available plugins.
All plugins are installed in /usr/lib/nagios/plugins/ on every architecture.
[edit]
Plugins needing special privileges
[edit]
Plugins needing special privileges
There are at least three check scripts that need root privileges to run:
- check_dhcp
- check_icmp
- check_ide_smart
To be "safe per default", SuSE doesn't install these plugins with the suid bit set. There are two recommended ways about overriding this on your system:
[edit]
Set the suid bit
Note: Please choose only those examples you need.
- change the group ownership to the users primary group that executes this check (normally nagios):
chgrp nagios /usr/lib/nagios/plugins/check_dhcp chgrp nagios /usr/lib/nagios/plugins/check_icmp chgrp nagios /usr/lib/nagios/plugins/check_ide_smart
- set the suid bit so the plugin is executed as root:
chmod 4750 /usr/lib/nagios/plugins/check_dhcp chmod 4750 /usr/lib/nagios/plugins/check_icmp chmod 4750 /usr/lib/nagios/plugins/check_ide_smart
[edit]
Use sudo to grant the permission and modify your plugin config
This way you need entries like:
nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_dhcp nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_icmp nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_ide_smart
in /etc/sudoers and an adapted command definition like the following:
define command{
command_name check_dhcp
command_line /usr/bin/sudo $USER1$/check_dhcp <other_options_here>
}
define command{
command_name check_icmp
command_line /usr/bin/sudo $USER1$/check_icmp <other_options_here>
}
define command{
command_name check_ide_smart
command_line /usr/bin/sudo $USER1$/check_ide_smart <other_options_here>
}
[edit]
See Also
[edit]


