We mentioned how to install Nagiosinstallation. The client will introduce it later in the article. This article will introduce how to configure the server side of Nagiosinstallation. We talked about how to install Nagios installation. The client will introduce it later in the article. This article will introduce how to configure the server side of Nagios.
Procedure1: Open the local. cfg file and configure the service user group.
Servicegroup_name Users-Groups User Group
Servicegroup_name Disks-Groups disk user
# vim /usr/loca/nagios/etc/objects/localhost.cfg define servicegroup{ servicegroup_name Users-Groups alias Users }define servicegroup{ servicegroup_name Disk-Groups alias Disk Usages }
Step 2:
Open the local host file and configure servicegroups,
# vim /usr/local/nagios/etc/servers/ define host{ use linux-server host_name host.hostname.com alias hostname.com address 192.168.2.0 # Client Host IP } define service{ use generic-service host_name host.hostname.com service_description Current Users check_command check_nrpe!check_users servicegroups Users-Groups }define service{ use generic-service host_name host.hostname.com service_description Disk Usage check_command check_nrpe!check_disk servicegroups Disks-Groups }
Once configured restart the Nagios service,
# service nagios restartRestarting nagios (via systemctl): [ OK ]