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 ] ];
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:
hi
good day all,
cant you shown up the config for monitor services of windows machines (e.g. Computer Browser, Workstation, etc.)
Thanks
God Bless!!
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder