* Nagios gives the detailed information about the services running in the server. For example, Number of
processes, Number of Users, Disk capacity, etc. These Services are configured by us.
* We have setup Nagios to show the Unknown, Critical and warning errors of various services.
* The Errors are shown based on the Configuration in the Nagios Set up file.
* In the event of a failure of any services, Nagios can alert us the problem, allowing us to begin remediation processes before outages affect our business processes, end-users, or customers. 
To Check the Nagios file,
1) SSH to the server.
2) The Nagios Set up file will be located in the following path in all the servers /usr/local/nagios/etc/nrpe.cfg
vi /usr/local/nagios/etc/nrpe.cfg
3) The Various Services that are configured using Nagios are available in this nrpe.cfg file. It also contains location of the coding files of various services.
The Snippet below is an example:
================================================
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 2,4,8 -c 4,6,8
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 380 -c 430
command[check_smart_sda]=/usr/local/nagios/libexec/check_ide_smart -d /dev/sda -n
command[check_smart_sdb]=/usr/local/nagios/libexec/check_ide_smart -d /dev/sdb -n
command[check_var]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /dev/sda2
command[check_tmp]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /dev/sda5
command[check_root]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /dev/sda1
=================================================
These are the example services that we have running on our Server. The location of the Script for that particular command is also given.
Note:
-w – indicate warnings when the given limit is reached
-c – indicate critical when the given limit is reached
Let us see the explanation for a command.
[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
This command shows that Nagios will check for the number of Users on the Server. 
If the number of users reaches 5 it will show warning.
If the number of users reaches 10 it will show critical.
The Command check_users will act based in the script available in /usr/local/nagios/libexec/check_users.
The script can be edited according to our requirment.

Leave a Reply