Hello,
The situation is as following:
I have Nagwin installed on a server,
and so far I'm monitoring +30 windows hosts with check_wmic.exe.
The page www.itefix.net/i2/content/nagwin-usage-example-3-agentless-wmi-monitorin...
lists 7 possible check commands, but is it possible to create more checks?
If I use wmic /? on a host, I see a lot more possible checks,
but I have been unsuccesful adding them in Nagwin.
If I define a command+service myself, I get to see "OK - 0" and that's it.
More specific, I would like to be able to monitor/check the following:
- Monitor a single specific service, eg. VNC
- Get the OS installed on that host?
- Installed Service pack?
- More info on drivespace, like "30GB, 10GB Free, 66% in use"
I also noticed that warning and critical flags don't work correctly on drives.
I'll keep digging.
Harm.
I came up with a check for a single service:
commands.cfg entry:
# 'wmic_non_running_service' command definition
define command{
command_name wmic_non_running_service
command_line $USER1$/check_wmic --H $HOSTADDRESS$ --alias "Service where (Caption='$ARG1$' And State!='Running')" --property Name --count --format "%d services not running." $ARG2$
}
host.cfg entry:
define service{
use generic-service
host_name host-200
service_description Audioservice
check_command wmic_non_running_service!Audio Service!--crit 0
}
It's not perfect (counts 0 or 1 services), but it works.
Found a way to get the detailed system info from SNMP,
with the snmpget command that comes with Net-SNMP.
Command:
# SNMPGet Command
define command{
command_name snmpget
command_line snmpget -OqvU -v 2c -c public -t2 -r0 $HOSTADDRESS$ $ARG1$
}
Service:
define service{
use generic-service
host_name hostname
service_description System Description
check_command snmpget!1.3.6.1.2.1.1.1.0
}
Note: 1.3.6.1.2.1.1.1.0 can be changed some other value you would like to monitor.