Page 4 of 6

Re: Need plugin information

Posted: Mon Feb 25, 2013 5:00 pm
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

Re: Need plugin information

Posted: Mon Feb 25, 2013 5:22 pm
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.

Re: Need plugin information

Posted: Mon Feb 25, 2013 5:25 pm
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

Re: Need plugin information

Posted: Tue Feb 26, 2013 9:22 am
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

Re: Need plugin information

Posted: Tue Feb 26, 2013 12:01 pm
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

Re: Need plugin information

Posted: Mon Mar 04, 2013 4:00 pm
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

Re: Need plugin information

Posted: Mon Mar 04, 2013 5:39 pm
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

Re: Need plugin information

Posted: Tue Mar 05, 2013 9:56 am
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 '^]'.
^]

Re: Need plugin information

Posted: Tue Mar 05, 2013 10:26 am
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?

Re: Need plugin information

Posted: Tue Mar 05, 2013 4:04 pm
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