Need plugin information

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: Need plugin information

Post by ravish78 »

Changed the port number to 12489 for nsclient.OS checks like disk,load and cpu are working fine but physical memory checks are not working

Below is the output.

tmproot@usa0300lv846>./check_nrpe -H 13.118.27.40
CHECK_NRPE: Socket timeout after 10 seconds.

tmproot@usa0300lv846>./check_nrpe -H 13.118.27.40 -p 12489 -t 30 -c checkMem -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
CHECK_NRPE: Error - Could not complete SSL handshake.
tmproot@usa0300lv846>./check_nrpe -H 13.118.27.40 -p 5666 -t 30 -c checkMem -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
CHECK_NRPE: Socket timeout after 30 seconds.

tmproot@usa0300lv846>>./check_nrpe -H 13.118.27.40 -c CheckCounter -a "Counter:=\\PhysicalDisk(0 C:)\Avg. Disk sec/Transfer" ShowAll MaxWarn=80% MaxCrit=90%
sh: ./check_nrpe: Text file busy
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need plugin information

Post by slansing »

Port 12489 is a check_nt port only, not a nrpe port. Port 5666 is for NRPE. You need to make sure that both ports are open on both the Nagios server, and the remote NSClient++ host. The errors you are getting are still indicative of a connection interruption between the two.

As for the last command, you need to kill or close the check_nrpe.sh file, it looks like you were editing the check plugin itself and suspended or locked it.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need plugin information

Post by lmiltchev »

What is the output of the following command?

./check_nrpe -H 13.118.27.40

Open the NSC.ini file, and check this line, under the [NRPE] section:

Code: Select all

;allow_arguments=0
to this:

Code: Select all

allow_arguments=1
Save the file, and restart the nsclient++ service.

Try running the following command:

Code: Select all

./check_nrpe -H 13.118.27.40 -p 5666 -t 30 -c checkMem -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
CGraham
Posts: 115
Joined: Tue Aug 16, 2011 2:43 pm

Re: Need plugin information

Post by CGraham »

Can you run this on the host you are trying to check the memory on?

Start > Run > "cmd"

Code: Select all

netstat -an | Find "5666"
The response should be

C:\Users\cgraham>netstat -an | Find "5666"
TCP 0.0.0.0:5666 0.0.0.0:0 LISTENING
TCP [::]:5666 [::]:0 LISTENING
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need plugin information

Post by lmiltchev »

ravish78,

Did you check if port 5666 is accessible? Did you try modifying the NSC.in file, and running the following command:

Code: Select all

./check_nrpe -H 13.118.27.40 -p 5666 -t 30 -c checkMem -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
Be sure to check out our Knowledgebase for helpful articles and solutions!
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: Need plugin information

Post by ravish78 »

Team,

Below is the output of the commands which you suggested.Port 12489 is not opened on nagios xi server only 5666 is functioning.Both porst are open at client end.

tmproot@usa0300lv886>telnet localhost 5666
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^C
^CConnection closed by foreign host.

tmproot@usa0300lv886>telnet localhost 12489
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
tmproot@usa0300lv886>


tmproot@usa0300lv886>./check_nrpe -H 13.118.27.40
CHECK_NRPE: Socket timeout after 10 seconds.

tmproot@usa0300lv886>./check_nrpe -H 13.118.27.40 -p 5666 -t 30 -c checkMem -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
CHECK_NRPE: Socket timeout after 30 seconds.

C:\>netstat -an | Find "5666"
TCP 0.0.0.0:5666 0.0.0.0:0 LISTENING
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Need plugin information

Post by abrist »

Can you telnet to port 5666 from the XI server to the remote host?

Code: Select all

telnet 13.118.27.40 5666
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: Need plugin information

Post by ravish78 »

tmproot@usa0300lv846>telnet 13.118.27.40 5666
Trying 13.118.27.40...
Connected to briodev (13.118.27.40).
Escape character is '^]'.
^]
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need plugin information

Post by lmiltchev »

Please, post your latest NSC.ini and the nsclient.log files.

Did you restart the nsclinet++ after making the changes in the NSC.ini?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: Need plugin information

Post by ravish78 »

Snippet from nagios logs

2013-02-26 09:00:09: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2013-02-26 09:00:09: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
2013-02-27 04:34:27: message:modules\NRPEListener\NRPEListener.cpp:370: Could not read a full NRPE packet from socket, only got: 65
2013-03-01 03:12:09: error:modules\CheckSystem\PDHCollector.cpp:215: Failed to query performance counters: \Processor(_total)\% Processor Time: PdhGetFormattedCounterValue failed: A counter with a negative denominator value was detected. (800007D6)
2013-03-03 23:08:14: error:modules\CheckSystem\PDHCollector.cpp:215: Failed to query performance counters: \Processor(_total)\% Processor Time: PdhGetFormattedCounterValue failed: A counter with a negative denominator value was detected. (800007D6)
2013-03-04 10:37:53: error:modules\NRPEListener\NRPEListener.cpp:290: Unauthorize access from: 127.0.0.1
2013-03-04 10:38:00: error:modules\NSClientListener\NSClientListener.cpp:314: Unauthorized access from: 127.0.0.1
2013-03-04 10:44:38: message:modules\NRPEListener\NRPEListener.cpp:370: Could not read a full NRPE packet from socket, only got: 65
2013-03-04 10:47:53: message:modules\FileLogger\FileLogger.cpp:86: Starting to log for: NSClient++ - 0.3.9.329 2011-09-02
2013-03-04 11:35:53: debug:CACHENSClient++.cpp:557: Attempting to start NSCLient++ - 0.3.9.329 2011-09-02
2013-03-04 11:35:53: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\NSClient++\\nsclient.log
2013-03-04 11:35:53: message:modules\NRPEListener\NRPEListener.cpp:370: Could not read a full NRPE packet from socket, only got: 65
2013-03-04 11:37:11: message:modules\NRPEListener\NRPEListener.cpp:370: Could not read a full NRPE packet from socket, only got: 65
2013-03-05 09:57:01: error:modules\NRPEListener\NRPEListener.cpp:377: Timeout reading NRPE-packet (increase socket_timeout), we only got: 0
2013-03-05 16:01:36: message:modules\FileLogger\FileLogger.cpp:86: Starting to log for: NSClient++ - 0.3.9.329 2011-09-02
2013-03-05 16:02:27: debug:CACHENSClient++.cpp:557: Attempting to start NSCLient++ - 0.3.9.329 2011-09-02
2013-03-05 16:02:27: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\NSClient++\\nsclient.log
2013-03-05 16:02:27: message:modules\NRPEListener\NRPEListener.cpp:370: Could not read a full NRPE packet from socket, only got: 65
Locked