Header RSS Feed
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup BSD Database Hacks Hardware Internet Linux Mail MySQL Monitoring Network Personal PHP Proxy Shell Solaris Unix Virtualization VMware Windows Wyse

Nagiosgraph from NSClient++ (Windows) Checks
Wednesday - Dec 8th 2010 - by - (2 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:

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):

ck from St. Gallen, Switzerland wrote on Apr 29th, 2015:
Hi Erwin, here is an example how to monitor the CPU with NSclient on the Windows server:

# Check CPU Usage
define service{
use generic-service
host_name mywindowshost
service_description CPU Usage
check_command check_nt!CPULOAD!-l 5,85,95

Erwin from Philippines wrote on Apr 29th, 2015:
good day all,

cant you shown up the config for monitor services of windows machines (e.g. Computer Browser, Workstation, etc.)

God Bless!!

Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

6979 Days
until Death of Computers