NSClient custom counter question
Harper Mann
hmann at itgroundwork.com
Fri Oct 8 02:33:26 CEST 2004
[root at milano plugins]# !./ch
./check_nt -H torino -p 1248 -v COUNTER -l "\\Paging File(_Total)\%
Usage",'Paging File Usage is %2.2f%%' -w 40 -c 90
Paging File Usage is %2.2f%% = 3
[root at milano plugins]# ./check_nt -V
check_nt (nagios-plugins 1.4.0alpha1) 1.21
Nagios-1.4.0alph1 is wrong for me as well....
- Harper
Harper Mann
Groundwork Open Source Solutions
510-599-2075 (cell)
-----Original Message-----
From: Jan Scholten [mailto:Jan.Scholten at iconz.net]
Sent: Thursday, October 07, 2004 5:26 PM
To: hmann at itgroundwork.com; 'Julian Hein';
nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] NSClient custom counter question
Strange!
I'm Running it from a Debian 3.1 testing to a Win2k Server with NSClient
./check_nt -V
check_nt (nagios-plugins 1.4.0alpha1) 1.21
ok.. command back.. if i use the Version of 1.3 its working fine. Args!
Thanks man!
Jan
On Thu, 7 Oct 2004 16:54:55 -0700, Harper Mann <hmann at itgroundwork.com>
wrote:
> One other thought: try single quoting (') the format string. It looks
> like
> check_nt is taking it as a literal.
>
> - Harper
>
> Harper Mann
> Groundwork Open Source Solutions
> 510-599-2075 (cell)
>
>
> -----Original Message-----
> From: Jan Scholten [mailto:Jan.Scholten at iconz.net]
> Sent: Thursday, October 07, 2004 4:48 PM
> To: hmann at itgroundwork.com; 'Julian Hein';
> nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] NSClient custom counter question
>
> Nope no luck with that.. it seems NSClient is ignoring the whole %.2f%%
> Stuff and does not parse it.
>
> at least not here :-)
>
> It's working but not looking good.
>
> But thanks for trying!
>
> Jan
>
>> Try %2.2f%%
>>
>> Example:
>> [root at milano root]# cat foo.c
>> main() {
>> printf("foo is %2.2f%%\n:", 37.66);
>> }
>>
>> [root at milano root]# make foo
>> cc foo.c -o foo
>> [root at milano root]# ./foo
>> foo is 37.66%
>>
>> You may also need to escape the % in the check_nt statement: \%2.2f\%\%.
>>
>> Hope that works,
>>
>> - Harper
>>
>> Harper Mann
>> Groundwork Open Source Solutions
>> 510-599-2075 (cell)
>>
>>
>> -----Original Message-----
>> From: nagios-users-admin at lists.sourceforge.net
>> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Jan
>> Scholten
>> Sent: Thursday, October 07, 2004 4:07 PM
>> To: Julian Hein; nagios-users at lists.sourceforge.net
>> Subject: Re: [Nagios-users] NSClient custom counter question
>>
>> Sorry for pulling an old topic, but i came to this right now :)
>>
>> I have a similar problem:
>>
>> /check_nt -H 192.168.100.54 -p 1248 -v COUNTER -l "\\Paging
>> File(_Total)\\% Usage","Paging File Usage is %.2f%%" -w 35 -c 90
>> Paging File Usage is %.2f%% = 38
>> ^^^^^^^ Ugly
>>
>>
>> Wortking but i can't get it being wellformated. So what must i do to
>> geht
>> this as 37.66% or something like that.
>>
>> I tried different Versions like "%.2f %%" "% .2f %" "%%.2f %%" "% .2f
>> %%"
>> but no luck..
>> Any hints?
>>
>> Jan
>>
>>
>>> Hi,
>>>
>>>> I've got my Nagios install set up to check the paging file on several
>>>> Windows 200 hosts thus:
>>>>
>>>> define command {
>>>> command_name check_nt_pagingfile
>>>> command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v
>>>> COUNTER -l "\\Paging File(_Total)\\%Usage","Paging File Usage
>>>> is %.2f%%"
>>>> -w $ARG1$ -c $ARG2$
>>>> }
>>>>
>>>> I'm passing 75 and 90 as the warning and critical levels respectively,
>>>> but every host I'm checking returns the same result - Paging
>>>> File Usage
>>>> is 0.00%
>>>
>>> I think, you need a blank between "%" and "Usage":
>>>
>>> -l "\\Paging File(_Total)\\% Usage","Paging File Usage is %.2f%%"
>>>
>>> Julian
>>>
>>
>>
>>
>
>
>
--
Jan Scholten
Research and Development Intern
Iconz.co.nz
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list