Page 2 of 3

Re: monitor PMON and listner

Posted: Thu Jun 19, 2014 4:42 am
by cyient
output is as follows

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.3.4
NRPE v2.12

Re: monitor PMON and listner

Posted: Thu Jun 19, 2014 12:49 pm
by sreinhardt
Could you tcpdump the communication between the two machines and post it back here?

Start:

Code: Select all

tcpdump -i eth0 -w /tmp/nrpe.pcap -nnXSs 0 'port 5666'
run your nrpe check command:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.3.4 -c check_ora -t 60
Stop the tcpdump command with ctrl+c after nrpe times out.

Re: monitor PMON and listner

Posted: Mon Jun 23, 2014 11:17 pm
by cyient
I have run the code and below are the outputs.

Code: Select all

[root@NAGIOSXI-64 ~]# tcpdump -i eth0 -w /tmp/nrpe.pcap -nnXSs 0 'port 5666'
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C581 packets captured
839 packets received by filter
136 packets dropped by kernel
97 packets dropped by interface
[root@NAGIOSXI-64 ~]#

Code: Select all

[root@NAGIOSXI-64 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.3.4 -c check_ora -t 60
CHECK_NRPE: Socket timeout after 60 seconds.
[root@NAGIOSXI-64 ~]#

Re: monitor PMON and listner

Posted: Tue Jun 24, 2014 2:46 pm
by tmcdonald
I believe sreinhardt wants you to post the /tmp/nrpe.pcap file that was created. And did you make sure to leave the tcpdump running *while* you ran that check_nrpe command?

Re: monitor PMON and listner

Posted: Wed Jun 25, 2014 8:59 am
by cyient
nrpe.pcap.txt
tmcdonald wrote:I believe sreinhardt want you to post the /tmp/nrpe.pcap file that was created. And did you make sure to leave the tcpdump running *while* you ran that check_nrpe command?
tcpdump is left running while running the check_nrpe command.

Attached nrpe.cap file please rename the file to nrpe.cap

Re: monitor PMON and listner

Posted: Wed Jun 25, 2014 1:19 pm
by tmcdonald
I'm not seeing any mention of 192.168.3.4 in that capture. Can you explain the connection between the two devices? Is there an interface other than eth0 that would be in use? What IPs specifically belong to the Nagios server and the remote NRPE client?

Re: monitor PMON and listner

Posted: Thu Jun 26, 2014 3:00 am
by cyient
Actually the remote server IP is 172.17.43.25 and nagios server IP is 172.17.1.129 hostname is INFHYDNAGIOSXI-64.NAGIOSERVER.COM

eth0 is the only interface through which it would be communicating.

Re: monitor PMON and listner

Posted: Thu Jun 26, 2014 9:16 am
by tmcdonald
But where does 192.168.3.4 come into play? I am seeing that in all of your commands and output so far but it is not in the pcap you sent us. Are you replacing the real IP with that one when posting here? Or is that not the right server?

Re: monitor PMON and listner

Posted: Sat Jul 05, 2014 3:17 am
by cyient
Hi i was replacing real IP (172.17.43.25) with 192.168.3.4 IP

Re: monitor PMON and listner

Posted: Sun Jul 06, 2014 6:17 pm
by Box293
I beleive your problem has to do with the creation of temp files.

Change:

Code: Select all

tmp=$( mktemp temp.XXXXXX )
tmp2=$( mktemp temp.XXXXXX )
To:

Code: Select all

tmp=$( mktemp /tmp/temp.XXXXXX )
tmp2=$( mktemp /tmp/temp.XXXXXX )
And the plugin should work.
sreinhardt wrote:it seems one of your greps is failing. This may or may not cause the issue you are seeing, but should be resolved regardless
You should also follow sreinhardt's advice.