Hi,
let me try to explain how to setup nagios integration for
At first, create a linux host object in UMC for the debian host and activate nagios support (open the host object and activate “Nagios support” in the [Options] menu). The debian host should now be available in the nagios webinterface (without any services/checks though).
Next step, adding services (like a ping check) for the debian host. The Univention nagios integration already adds some nagios services like UNIVENTION_PING, see Devices -> Nagios in the UMC webinterface. These services can be assigned to hosts objects (if nagios is activated).
But, there are two kind of services, Non-NRPE checks (executed on the nagios server, the UCS system) and NRPE checks (the nagios plugin is executed on the client via NRPE).
Non-NRPE services - no configuration needed on the client
For example UNIVENTION_PING (as you can see in UMC -> Devices -> Nagios -> UNIVENTION_PING -> Use NRPE is not activated). These services can be used without any configuration on the client (debian host) because they are executed on the nagios server. To add a services to a host, open the host object in the UMC webinterface got to [Advanced Settings] -> Nagios Services and add UNIVENTION_PING. The nagios service should now be activated for the host in the nagios webinterface.
NRPE services
For NRPE services, there is some configuration needed on the client. First, install the (standard debian) package nagios-nrpe-server (some nagios plugin packages are installed automatically with the installation of nagios-nrpe-server). Now configure allowed_hosts in /etc/nagios/nrpe.cfg to the UCS nagios server (e.g. allowed_hosts=master.my.domain) and restart the nrpe service (service nagios-nrpe-server restart).
Next, the nagios NRPE services commands have to be configured on the client. Every NRPE nagios service on the UCS nagios server defines a NRPE command (see /etc/nagios/nrpe.univention.d/ on the UCS nagios server), for example /etc/nagios/nrpe.univention.d/UNIVENTION_DISK_ROOT.cfg. In order to use the UNIVENTION_DISK_ROOT NRPE service, the client needs a appropriate configuration for the UNIVENTION_DISK_ROOT command. So, just copy /etc/nagios/nrpe.univention.d/UNIVENTION_DISK_ROOT.cfg from the UCS nagios server to /etc/nagios/nrpe.d/UNIVENTION_DISK_ROOT.cfg on the debian host and restart the NRPE service.
-> more /etc/nagios/nrpe.d/UNIVENTION_DISK_ROOT.cfg
command[UNIVENTION_DISK_ROOT]=/usr/lib/nagios/plugins/check_disk -w '25%' -c '10%' -p '/'
Now the UCS nagios server can execute the UNIVENTION_DISK_ROOT on the debian host via NRPE. The client than executes the nagios plugin (check_disk) with the configured parameters. The plugin is a standard nagios plugin and should be available on the debian host after the installation of the nagios NRPE package. To check the setup, run the following command on the UCS nagios server:
/usr/lib/nagios/plugins/check_nrpe -H debian -c UNIVENTION_DISK_ROOT
After all this configuration, you can add the UNIVENTION_DISK_ROOT nagios service to the host object for the debian system.
Please keep in mind:
[ul]
[li] Activate nagios for the host object[/li]
[li] Add nagios services to the host object[/li]
[li] Make sure NRPE service commands are known on the client (e.g. the nagios service UNIVENTION_DISK_ROOT defines a NRPE command in /etc/nagios/nrpe.univention.d/UNIVENTION_DISK_ROOT.cfg on the UCS nagios server, this command has to be configured in the debian client too, /etc/nagios/nrpe.d/UNIVENTION_DISK_ROOT.cfg)[/li]
[li] Make sure the plugin used in the NRPE command (/usr/lib/nagios/plugins/check_disk in case of UNIVENTION_DISK_ROOT) is available on the client[/li][/ul]
More information about nagios in UCS can be found in the documentation http://docs.software-univention.de/manual-4.1.html#nagios::general.
I hope this helps, best regards
Felix Botner