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 ] ];
|