Header
 
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup Hardware Internet Linux Nagios/Monitoring Personal PHP Proxy Shell VMware Windows Wyse

Nagiosgraph from NSClient++ (Windows) Checks
Wednesday - Dec 8th 2010 - 3.50 pm (+0100) - Geneva, Switzerland - (0 comments)

To create automatic graphics from Nagios, Nagiosgraph is a very handy and powerful tool. In the so-called 'map' configurations file there are already a lot of examples for Unix/Linux checks but none for NSClient++/Windows checks.

On the following websites I found examples but unfortunately they didn't seem to work:
http://nerhood.wordpress.com/2004/09/22/nagiosgraph-with-windows-support/
http://rambling-techie.blogspot.com/2009/02/nagiosgraph-windows-clients.html
http://jurrys.blogspot.com/2008/10/nagiosgraph-extra-mappings.html

So I worked a bit on them and got the following ones to work:

CPU Load (Nagios output: CPU Load 23% (15 min average) )
This one is based on the example delivered on nerhood.wordpress.com

/output:.*CPU Load .*?(\d+)%/
and push @s, [ ntload,
        ['avg15min', GAUGE, $1 ] ];

Memory Usage (Nagios output: Memory usage: total:9732.64 Mb - used: 2189.29 Mb (22%) - free: 7543.35 Mb (78%) )
This map-entry works with the actual NSClient++ (0.3.6-0.3.8) outputs and has been written by Fabien Huttin:

# Service type memory for Windows (NSClient++)
# Regex by Fabien Huttin
#output: Memory usage: total:9732.64 Mb - used: 2203.30 Mb (23%) - free: 7529.34 Mb (77%)
/output:Memory usage.*:.*:(\d+)\.\d* Mb .*: (\d+)\.\d* Mb .*: (\d+)\.\d* Mb .*/
and push @s, [ntmem,
       ['memtotal', GAUGE, $1*1024**2 ],
        ['memused', GAUGE, $2*1024**2] ];

Disk/Partition utilization  (Nagios output: c: - total: 40.00 Gb - used: 22.69 Gb (57%) - free 17.31 Gb (43%) )
This map-entry works with current NSClient++ versions (0.3.6-0.3.8) and was written by me:

# Service tpye disk space for Windows (NSClient++)
# by Claudio Kuenzler
# Nagios Output: c: - total: 40.00 Gb - used: 22.69 Gb (57%) - free 17.31 Gb (43%)
/output:.* total: (\d+\.\d*) Gb .*used: (\d+\.\d*) Gb .*free (\d+\.\d*).*/
and push @s, [ntdisk,
       ['disktotal', GAUGE, $1*1000**3 ],
        ['diskused', GAUGE, $2*1000**3 ] ];


 

Add a comment

Show form to leave a comment

Comments (newest first):

No comments yet.

Go to Homepage home RSS Feed
About ck about
Linux Howtos how to's
Nagios Plugins nagios plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

9376 Days
until Death of Computers
Why?