Page 1 of 2

Null in status information for a counter

Posted: Fri May 17, 2013 9:09 am
by MSPk
Hi,

I have configured a counter to monitor pages/sec and page faults/sec for a windows server, however when the check executes both these services show the status as OK but the status information shows as (null). I have configured other counters on this server and they are working fine. Please suggest.

[img]
error.png
[/img]

Re: Null in status information for a counter

Posted: Fri May 17, 2013 2:14 pm
by abrist
Could you post the check commands (and args) from XI as well as your nsclient config file in word wraps (obfuscate passwords!)?

Re: Null in status information for a counter

Posted: Sat May 18, 2013 7:33 am
by MSPk
This is the check ccommand

$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$

$ARG1$ - NSClient password
$ARG2$ - COUNTER
$ARG3$ - -l "\\Memory\\Pages/sec","Pages per Second %.2f %"

Code: Select all

define service {
        service_description             Memory - Pages/Sec
        use                             xiwizard_windowsserver_nsclient_service
        hostgroup_name                  Windows-Servers
        check_command                   check_xi_service_nsclient!password!COUNTER!-l "\\Memory\\Pages/sec","Pages per Second %.2f %"!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        contact_groups                  xi_contactgroup_all
        _xiwizard                       windowsserver
        register                        1
        }

Re: Null in status information for a counter

Posted: Mon May 20, 2013 10:41 am
by abrist
What happens when you try the check right from the XI cli?

Code: Select all

/usr/local/nagios/libexec/check_nt -H <remote host ip> -s "<password>" -p 12589 -v COUNTER -l  "\\Memory\\Pages/sec","Pages per Second %.2f %"

Re: Null in status information for a counter

Posted: Mon May 20, 2013 12:12 pm
by MSPk
I have tried the command and the out put for both "\\Memory\\Pages/sec" and "\\Memory\\Page Faults/sec" is 0

[root@localhost libexec]# ./check_nt -H ipaddress -s password -p 12489 -v COUNTER -l "\\Memory\\Pages Faults/sec", "pages per sec %.2f%"
0

[root@localhost libexec]# ./check_nt -H ipaddress -s password -p 12489 -v COUNTER -l "\\Memory\\Pages/sec", "pages per sec %.2f%"
0

Re: Null in status information for a counter

Posted: Mon May 20, 2013 2:00 pm
by slansing
How many times did you run:

Code: Select all

./check_nt -H 192.168.5.195 -s welcome -p 12489 -v COUNTER -l "\\Memory\\Page Faults/sec", "pages per sec %.2f%"
It is possible that it returned 0 if there was not much activity on that counter at that time. This is what happened when I tested it on my end, what version of NSclient++ are you running, and what version of Windows/Windows Server?

Re: Null in status information for a counter

Posted: Mon May 20, 2013 7:52 pm
by MSPk
I'm sure that the Page Faults/Sec wasn't 0, I have checked the performance counter and nagios output at the same time and the result on nagios is null all the time. more over if it is really zero then the status information should atleast provide that info instead of a null.

I have downloaded the NSClient++ from the link - http://assets.nagios.com/downloads/nagi ... ble-64.msi - on 30th April, the version number is NSClient++ - 0.3.9.328.

Version of windows - Windows Server 2008 SP2 64-bit

Re: Null in status information for a counter

Posted: Mon May 20, 2013 8:53 pm
by scottwilkerson
change your $ARG3$ to this

Code: Select all

-l "\\Memory\\Pages/sec","Pages per Second %2f"

Re: Null in status information for a counter

Posted: Tue May 21, 2013 9:03 am
by MSPk
it is still the same...!!!

Re: Null in status information for a counter

Posted: Tue May 21, 2013 1:44 pm
by slansing
Have you verified this counter is available on that windows server? It "SHOULD" be, just curios. Lets run a quick test:

If you have access to the Windows server, is nsclient++ logging? If so, in it's installation directory you should see a nsclient.log file, please remove this file, and then run the following command rapidly from the nagios Xi CLI:

Code: Select all

/usr/local/nagios/libexec/check_nt -H 192.168.5.64 -p 12489 -v COUNTER -l "\\Memory\\Pages/sec", "pages per sec %.2f%"
Then switch back to the windows server, if NSClient++ created a new log file please send us that file, you can remove any information that is security related. This will allow us to see if NSclient++ is rejecting the perf counter check as invalid. If it is not, it is quite possible it is actually returning "0" as a result, if we find that to be the case we will need to take a look at how 0's are treated when returned via NSclient++ as a perf counter module check.. they should be normal integers but there is a chance that they could somehow show as null..