nsclient & nrpe configuration file changes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

nsclient & nrpe configuration file changes

Post by lntinfo »

i have existing setup running with nagioscore. but now we would like to go with nagiosxi.
those servers are being monitored under nagioscore same will be monitored by nagiosxi.
we have deployed remote agent on monitoring devices e.g. nsclient on windows & nrpe agent on linux machine at the time of nagioscore installation.
as now we are going with nagiosxi, server ip and server will be change since which agent we have deployed on remote locations that remains same.
so can i use those exsiting nsclient & nrpe agent which are installed on remote machines.
do i need to do changes in nsclient & nrpe configuration files.
what can be done in such scenario. please share you views

thnx in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nsclient & nrpe configuration file changes

Post by scottwilkerson »

The NSClient++ shouldn't need to be changed unless you are using the NRPE features of it. If you are you will need to add the new IP address to the allowed_hosts field.

Also, for the Linux NRPE agents, the same, you will need to add the IP to the only_from section of /etc/xinetd.d/nrpe if they are running under xinetd or the allowed_hosts section of the nrpe.cfg if they are not.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: nsclient & nrpe configuration file changes

Post by lntinfo »

added nagiosxi ip below configuration file

/etc/xinetd.d/nrpe

configure linux host in nagioxi but not able to monitor below error persist

CHECK_NRPE: Error - Could not complete SSL handshake.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nsclient & nrpe configuration file changes

Post by lmiltchev »

Did you restart the daemon after you made changes in /etc/xinetd.d/nrpe?

Code: Select all

# service xinetd restart
Check if nrpe works fine on the client. If you had "127.0.0.1" added to the "only_from" section of "/etc/xinetd.d/nrpe", you could test NRPE on the client site by running:

Code: Select all

# ./check_nrpe -H localhost
You should see:

Code: Select all

NRPE v2.12
After you are sure it works on the client site, you can try running the check on the server site:

Code: Select all

# ./check_nrpe -H <client_IP>
You should also see:

Code: Select all

NRPE v2.12
Make sure your firewall is not blocking the connection. Check if port 5666 is open - from a terminal on your Nagios server, you can try:

Code: Select all

nc -z <client_IP> 5666
or

Code: Select all

telnet <client_IP> 5666
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: nsclient & nrpe configuration file changes

Post by lntinfo »

restrated service.

below error persist after run
#./check_nrpe -H localhost


-bash: ./check_nrpe: No such file or directory

below error i have got in nagiosxi dashboard
CHECK_NRPE: Socket timeout after 30 seconds.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nsclient & nrpe configuration file changes

Post by lmiltchev »

Do you have nagios plugins installed on the client machine? Did you run this check from the plugins directory? On my machine I run:

Code: Select all

cd /usr/local/nagios/libexec/
./check_nrpe -H localhost
Your path may be different or you may not have "check_nrpe" installed on the client.

Did you check if port 5666 is open?
Be sure to check out our Knowledgebase for helpful articles and solutions!
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: nsclient & nrpe configuration file changes

Post by lntinfo »

i have not installed any plugin on client machine
i have just made changes in /etc/xinet.d/nrpe file

after running below command on client machine:
#./check_nrpe -H localhost
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for erro r messages.

#nc -z <client IP) 5666
Connection to <client ip>5666 port [tcp/nrpe] succeeded!

why i have not installed pluing on client machiens, is these servers are being monitored under nagios core,
now i have nagiosxi in place, and wants to add this server under nagiosxi.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nsclient & nrpe configuration file changes

Post by lmiltchev »

OK, on your Nagios server, run the following commands in terminal:

Code: Select all

cd /usr/local/nagios/libexec
./check_nrpe -H 192.168.5.83 -t 30 -c check_procs -a '-w 200 -c 300'
Then on your client machine, run the following command in terminal and show us the output:

Code: Select all

tail /var/log/messages
Be sure to check out our Knowledgebase for helpful articles and solutions!
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: nsclient & nrpe configuration file changes

Post by lntinfo »

Client is machine is installed with redhat enterprise 5.7 tikanga

below are the logs:-



May 9 07:13:15 grpsgh311 xinetd[17522]: START: nrpe pid=15075 from=10.105.32.115
May 9 07:13:19 grpsgh311 xinetd[17522]: START: nrpe pid=15078 from=10.105.32.115
May 9 07:13:22 grpsgh311 xinetd[15079]: FAIL: nrpe address from=10.105.33.15
May 9 07:13:22 grpsgh311 xinetd[17522]: START: nrpe pid=15079 from=10.105.33.15
May 9 07:13:22 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15079 duration=0(sec)
May 9 07:13:45 grpsgh311 nrpe[15075]: Could not read request from client, bailing out...
May 9 07:13:45 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15075 duration=30(sec)
May 9 07:13:49 grpsgh311 nrpe[15078]: Could not read request from client, bailing out...
May 9 07:13:49 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15078 duration=30(sec)
May 9 07:14:19 grpsgh311 xinetd[15107]: FAIL: nrpe address from=10.105.33.15
May 9 07:14:19 grpsgh311 xinetd[17522]: START: nrpe pid=15107 from=10.105.33.15
May 9 07:14:19 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15107 duration=0(sec)
May 9 07:14:58 grpsgh311 xinetd[17522]: START: nrpe pid=15122 from=10.105.32.115
May 9 07:15:17 grpsgh311 xinetd[17522]: START: nrpe pid=15281 from=10.105.32.115
May 9 07:15:28 grpsgh311 nrpe[15122]: Could not read request from client, bailing out...
May 9 07:15:28 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15122 duration=30(sec)
May 9 07:15:46 grpsgh311 xinetd[17522]: START: nrpe pid=15291 from=10.105.32.115
May 9 07:15:47 grpsgh311 nrpe[15281]: Could not read request from client, bailing out...
May 9 07:15:47 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15281 duration=30(sec)
May 9 07:15:49 grpsgh311 xinetd[17522]: START: nrpe pid=15294 from=10.105.32.115
May 9 07:16:02 grpsgh311 xinetd[17522]: START: nrpe pid=15298 from=10.105.32.115
May 9 07:16:16 grpsgh311 nrpe[15291]: Could not read request from client, bailing out...
May 9 07:16:16 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15291 duration=30(sec)
May 9 07:16:19 grpsgh311 nrpe[15294]: Could not read request from client, bailing out...
May 9 07:16:19 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15294 duration=30(sec)
May 9 07:16:32 grpsgh311 nrpe[15298]: Could not read request from client, bailing out...
May 9 07:16:32 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15298 duration=30(sec)
May 9 07:16:33 grpsgh311 xinetd[17522]: START: nrpe pid=15321 from=10.105.32.115
May 9 07:16:36 grpsgh311 xinetd[17522]: START: nrpe pid=15322 from=10.105.32.115
May 9 07:17:03 grpsgh311 nrpe[15321]: Could not read request from client, bailing out...
May 9 07:17:03 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15321 duration=30(sec)
May 9 07:17:06 grpsgh311 nrpe[15322]: Could not read request from client, bailing out...
May 9 07:17:06 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15322 duration=30(sec)
May 9 07:17:13 grpsgh311 xinetd[15337]: FAIL: nrpe address from=10.105.33.15
May 9 07:17:13 grpsgh311 xinetd[17522]: START: nrpe pid=15337 from=10.105.33.15
May 9 07:17:13 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15337 duration=0(sec)
May 9 07:17:45 grpsgh311 xinetd[15344]: FAIL: nrpe address from=10.105.33.15
May 9 07:17:45 grpsgh311 xinetd[17522]: START: nrpe pid=15344 from=10.105.33.15
May 9 07:17:45 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15344 duration=0(sec)
May 9 07:17:45 grpsgh311 xinetd[17522]: EXIT: nrpe status=0 pid=15344 duration=0(sec)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nsclient & nrpe configuration file changes

Post by lmiltchev »

Try re-installing the linux agent on the client machine by following our documentation:

http://assets.nagios.com/downloads/nagi ... _Agent.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked