FW: NSClient++ on windows machine

Lars Stavholm stava at telcotec.se
Fri Jun 15 09:58:39 CEST 2007


Palle Jensen wrote:
> Hej :=)
> 
> Thanks Lars, still struggling in between, to get the ngraphs working for my
> Check_nt services.
> 
> I tried what you said and i got the output data, but how to change it in the
> ngraph definition? That seems to be not all that easy.
> 
> For example:
> check_nt -H ip.ad.dre.ss -v USEDDISKSPACE -l c -p 12489 -w 90 -c 95 
> 
> Will give the output:
> c:\ - total: 3.95 Gb - used: 2.44 Gb (62%) - free 1.51 Gb (38%) | 'c:\ Used
> Space'=2.44Gb;3.55;3.75;0.00;3.95 
> 
> If I understand it correct it's the code in "graph_perf_regex ([0-9]+)MB"
> that needs to match or read the output perf data from check_nt e.g | 'c:\
> Used Space'=2.44Gb;3.55;3.75;0.00;3.95 
>   
>   define ngraph {
>   graph_legend Used Space
>   graph_perf_regex ([0-9]+)MB

graph_perf_regex ([0-9]+)Gb would match the above output's first column.

>   graph_value MBused
>   hide yes
>   rrd_color 00a000
>   rrd_plottype AREA
>   service_name Filesystems
> }
> 
> 
> Another example is the Check_nt Memory used
> | 'Memory usage'=1367.25Mb;3588.48;4037.04;0.00;4485.60
> 
> Compared to output from Check_mem (native plugin)
> | /=2848MB;17278;17268;0;17358 /boot=16MB;18;8;0;98
> /dev/shm=0MB;170;160;0;250
> 
> And the Ngraph definition for the native plugin looks like this:
> 
> define ngraph {
>   graph_legend Memory Used
>   graph_perf_regex MemUsed=([0-9]+)%

There's a '%' character in the expected regular expression,
but there's no '%' character in the above output, hence it
doesn't match.

>   graph_value MemUsed
>   hide yes
>   rrd_color 00a000
>   rrd_plottype AREA
>   service_name Memuse
> }
> 
> What do you think, or are there anyone else that knows how to changes this
> so that I can get the perf data to be picked up by ngraph?

I think you might need to read up on regular expression matching:)
/Lars

> -----Original Message-----
> From: Lars Stavholm [mailto:stava at telcotec.se] 
> Sent: Wednesday, June 06, 2007 4:23 PM
> To: Palle Jensen
> Cc: 'Nagios Users'
> Subject: Re: [Nagios-users] FW: NSClient++ on windows machine
> 
> Palle Jensen wrote:
>> Hi to all,
> 
> Hej:)
> 
>> I have been trying to find out how you get the graphs for monitored
>> service on Windows/Nsclient++.
>>
>> It is working fine for the locahost (FC9) Memory, load, procs and users.
>> I added a windows machine with NSClient++, I added the service Ping to
>> both localhost and the windows machine, and the graphs are showing up
>> fine. But when I add Memory, procs, load service to the windows machine
>> no graphs shows. How come it works with ping for both localhost and
>> Windows machine? Even though I made sure that the service_description is
>> the same as for the localhost
>>
>> I am about to go insain, please help? I know this belongs under
>> NagiosGrapher mailinglist, and I posted there as well, but I got 0
>> answers there, hoping that someone can help me here.
> 
> I'll just assume that you remembered to restart/reload
> both NagiosGrapher and nagios when adding stuff in config.
> 
> There might be a difference in the performance data handed
> back by NSClient as compared to the native check plugins.
> 
> The check_load, for instance, can be run manually. Now run the
> check_load for the Windows boxes (whatever it's called) and
> compare the output, especially the output to the righ of the '|'
> character, i.e. the performance data delimiter. If they are not
> the same, they wont fit the same graph definition.
> 
> Min you, I have no experience with NSClient at all, but still.
> 
> Cheers
> /Lars
> 
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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