Hi Team,
After installing nrpe plugin in remote machine (ubuntu 16.x version ) . Check_* commands are failing due to below error from nagios machine
error :
=====
CHECK_NRPE: Error - Could not connect to 13.232.218.201: Connection reset by peer.
but when i checked in remote machine check_* commands working but not from nagios machine.
Commands used from nagios :-
=========================
/usr/local/nagios/libexec/check_nrpe -H 13.232.218.201 -c check_load
CHECK_NRPE: Error - Could not connect to 13.232.218.201: Connection reset by peer
Below are our observations:
=======================
Telnet connectivity is fine from nagios to (remote machine) 13.232.218.201, port 5666 reachable.
nrpe running in remote machine.( commands used : sudo /etc/init.d/nagios-nrpe-server status )
Please help us to fix this issue.
Regards,
Sudhakar Amineni
CHECK_NRPE:Error -Could not connect to remote ip: Connection
-
mailtosudha0820
- Posts: 4
- Joined: Thu Oct 31, 2019 9:25 am
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: CHECK_NRPE:Error -Could not connect to remote ip: Connec
Do you have your nagios server IP in the nrpe.cfg?
Can you show the output of the following from 13.232.218.201
Can you show the output of the following from 13.232.218.201
Code: Select all
netstat -nlp|grep 5666-
mailtosudha0820
- Posts: 4
- Joined: Thu Oct 31, 2019 9:25 am
Re: CHECK_NRPE:Error -Could not connect to remote ip: Connec
Hi Scott,
Thanks for your feedabck.
Yes, I have allowed nagios IP in remote server as like below format in nrpe.cfg in remote server.
allowed_hosts=127.0.0.1,172.31.32.238,162.20.82.77
Please find below output from remote (13.232.218.201) server.
cmd : sudo netstat -nlp|grep 5666
Output/
ubuntu@ip-192-168-20-101:~$ sudo netstat -nlp|grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 9091/nrpe
tcp6 0 0 :::5666 :::* LISTEN 9091/nrpe
without sudo :
===========
ubuntu@ip-192-168-20-101:~$ netstat -nlp|grep 5666
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN -
tcp6 0 0 :::5666 :::* LISTEN -
Please help us to fix this issue.let me know if required additional information to troubleshoot this issue.
Regards,
Sudhakar Amineni.
Thanks for your feedabck.
Yes, I have allowed nagios IP in remote server as like below format in nrpe.cfg in remote server.
allowed_hosts=127.0.0.1,172.31.32.238,162.20.82.77
Please find below output from remote (13.232.218.201) server.
cmd : sudo netstat -nlp|grep 5666
Output/
ubuntu@ip-192-168-20-101:~$ sudo netstat -nlp|grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 9091/nrpe
tcp6 0 0 :::5666 :::* LISTEN 9091/nrpe
without sudo :
===========
ubuntu@ip-192-168-20-101:~$ netstat -nlp|grep 5666
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN -
tcp6 0 0 :::5666 :::* LISTEN -
Please help us to fix this issue.let me know if required additional information to troubleshoot this issue.
Regards,
Sudhakar Amineni.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: CHECK_NRPE:Error -Could not connect to remote ip: Connec
Can you show the following from the Nagios server
and the following from the remote machine
The path to nrpe may vary on the remote machine, if you aren't sure where it is you can run the following to see its path
Code: Select all
/usr/local/nagios/libexec/check_nrpe -h|head -10Code: Select all
/usr/local/nagios/bin/nrpe -h|head -20Code: Select all
ps -ef|grep nrpe-
mailtosudha0820
- Posts: 4
- Joined: Thu Oct 31, 2019 9:25 am
Re: CHECK_NRPE:Error -Could not connect to remote ip: Connec
Hi Scott,
Thanks for your reply.
in nagios server
==================
ubuntu@ip-172-31-32-238:~$ ps -ef | grep nrpe
ubuntu 22502 10098 0 07:25 pts/0 00:00:00 grep --color=auto nrpe
nagios 24858 1 0 Mar12 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
ubuntu@ip-172-31-32-238:~$ /usr/local/nagios/libexec/check_nrpe -h| head -10
NRPE Plugin for Nagios
Version: 3.2.1
Copyright (c) 2009-2017 Nagios Enterprises
1999-2008 Ethan Galstad ([email protected])
Last Modified: 2017-09-01
License: GPL v2 with exemptions (-l for more info)
in below path from nagios server.
/usr/local/nagios/bin/nrpe
ubuntu@ip-172-31-32-238:~$ /usr/local/nagios/bin/nrpe -h|head -20
==================================================================
Incorrect command line arguments supplied
NRPE - Nagios Remote Plugin Executor
Version: 3.2.1
Copyright (c) 2009-2017 Nagios Enterprises
1999-2008 Ethan Galstad ([email protected])
Last Modified: 2017-09-01
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available, OpenSSL 0.9.6 or higher required
***************************************************************
** POSSIBLE SECURITY RISK - TCP WRAPPERS ARE NOT AVAILABLE! **
** Read the NRPE SECURITY file for more information **
***************************************************************
from Remote server
====================
output of cmd : ps -ef | grep nrpe
ubuntu@ip-192-168-20-101:~$ ps -ef | grep nrpe
ubuntu 8400 7757 0 12:53 pts/273 00:00:00 grep --color=auto nrpe
nagios 9091 1 0 Mar11 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -n -d
ubuntu@ip-192-168-20-101:~$ /usr/local/nagios/bin/nrpe -h|head -20
Incorrect command line arguments supplied
NRPE - Nagios Remote Plugin Executor
Version: 3.2.1
Copyright (c) 2009-2017 Nagios Enterprises
1999-2008 Ethan Galstad ([email protected])
Last Modified: 2017-09-01
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available, OpenSSL 0.9.6 or higher required
***************************************************************
** POSSIBLE SECURITY RISK - COMMAND ARGUMENTS ARE SUPPORTED! **
** Read the NRPE SECURITY file for more information **
***************************************************************
CMD : ps -ef | grep nrpe
Output is same in nagios server and remote server.
Please review above.
thanks in advance
Regards,
Sudhakar Amineni
Thanks for your reply.
in nagios server
==================
ubuntu@ip-172-31-32-238:~$ ps -ef | grep nrpe
ubuntu 22502 10098 0 07:25 pts/0 00:00:00 grep --color=auto nrpe
nagios 24858 1 0 Mar12 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
ubuntu@ip-172-31-32-238:~$ /usr/local/nagios/libexec/check_nrpe -h| head -10
NRPE Plugin for Nagios
Version: 3.2.1
Copyright (c) 2009-2017 Nagios Enterprises
1999-2008 Ethan Galstad ([email protected])
Last Modified: 2017-09-01
License: GPL v2 with exemptions (-l for more info)
in below path from nagios server.
/usr/local/nagios/bin/nrpe
ubuntu@ip-172-31-32-238:~$ /usr/local/nagios/bin/nrpe -h|head -20
==================================================================
Incorrect command line arguments supplied
NRPE - Nagios Remote Plugin Executor
Version: 3.2.1
Copyright (c) 2009-2017 Nagios Enterprises
1999-2008 Ethan Galstad ([email protected])
Last Modified: 2017-09-01
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available, OpenSSL 0.9.6 or higher required
***************************************************************
** POSSIBLE SECURITY RISK - TCP WRAPPERS ARE NOT AVAILABLE! **
** Read the NRPE SECURITY file for more information **
***************************************************************
from Remote server
====================
output of cmd : ps -ef | grep nrpe
ubuntu@ip-192-168-20-101:~$ ps -ef | grep nrpe
ubuntu 8400 7757 0 12:53 pts/273 00:00:00 grep --color=auto nrpe
nagios 9091 1 0 Mar11 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -n -d
ubuntu@ip-192-168-20-101:~$ /usr/local/nagios/bin/nrpe -h|head -20
Incorrect command line arguments supplied
NRPE - Nagios Remote Plugin Executor
Version: 3.2.1
Copyright (c) 2009-2017 Nagios Enterprises
1999-2008 Ethan Galstad ([email protected])
Last Modified: 2017-09-01
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available, OpenSSL 0.9.6 or higher required
***************************************************************
** POSSIBLE SECURITY RISK - COMMAND ARGUMENTS ARE SUPPORTED! **
** Read the NRPE SECURITY file for more information **
***************************************************************
CMD : ps -ef | grep nrpe
Output is same in nagios server and remote server.
Please review above.
thanks in advance
Regards,
Sudhakar Amineni
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: CHECK_NRPE:Error -Could not connect to remote ip: Connec
Does a simple version check work?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 13.232.218.201