How to setup Configuration in the Nagios server

From PheonixSolutions
Jump to navigation Jump to search

How to setup Configuration in the Nagios server

Prerequisites

Before starting, ensure you have:

1. A Ubuntu server accessible via SSH.

step 1

Configuring Nagios Host and Services File

You create the configuration file below commands 

 cd /usr/local/nagios/etc/servers/
              or
 vi /usr/local/nagios/etc/servers/taxary.cfg

Next open taxary.cfg file and add the following services to be monitored.

     

Save the configuration file 

And finally, restart Nagios to apply recent configuration changes:

 systemctl restart nagios

Step 2

Verify Connection from Nagios

Let’s verify the connection between the Nagios server and the NRPE client machine. Login to your Nagios server and check the Nagios server can communicate with the NRPE service properly.

Use the check_nrpe command on the Nagios server under the plugins directory. The command will be like as below here 192.168.1.11 is the IP address of the client machine.

Go to this path for plugins 

 cd /usr/lib/nagios/plugins

Check the below commands 

 ./check_nrpe -H 142.54.163.115

It is output for successful 

 NRPE v4.0.0

Note:

 
1. If the server has the DB service,  that should listen always on the local host (127.0.0.1) unless it is approved by the client
2. The DB status can be monitored via status script, the tcp check on the DB port is not required