Page 1 of 1

Monitoring Windows With Nagios

Posted: Wed Dec 28, 2016 7:29 am
by AlbertM
Hello

I'm trying monitrize my Windows with nagios but when y try monitorize the Ram and Storage nagios let me 2 warnings.

Image

This are my documents.

Storage:

define command{
command_name check_disk_snmp
command_line /usr/bin/perl $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -s $ARG1$ -d $ARG2$ -u $ARG3$ -w $ARG4$ -c $ARG5$
}

define service {
use windows-srv
host_name cpd_19X.XXX.XXX.XXX
service_description Disco C:
check_command check_disk_snmp!XXX!C!MB!1527!898
}

RAM

define command{
command_name check_winmem_snmp
command_line /usr/bin/perl $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG1$
}

define service {
use windows-srv
host_name cpd_19x.xxx.xxx.xxx
service_description Uso MEM
check_command check_winmem_snmp!xxx!80%!90%
}

Re: Monitoring Windows With Nagios

Posted: Wed Dec 28, 2016 10:50 am
by mcapra
It looks as if your service checks are missing required parameters for the check_snmp_storage.pl. From this plugin's usage:

Code: Select all

Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]
In the case of your check_disk_snmp command definition, you don't appear to be providing a community string (-C) or credentials (-l, -x, -L, -X, etc).

Re: Monitoring Windows With Nagios

Posted: Tue Jan 03, 2017 7:07 am
by AlbertM
mcapra wrote:It looks as if your service checks are missing required parameters for the check_snmp_storage.pl. From this plugin's usage:

Code: Select all

Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]
In the case of your check_disk_snmp command definition, you don't appear to be providing a community string (-C) or credentials (-l, -x, -L, -X, etc).

Thank You I'm trying fixed this error but now appear another message

Code: Select all

**ePN /usr/lib/nagios/plugins/check_snmp_storage.pl: "Argument "v6.0.1" isn't numeric in numeric lt (<) at (eval 1) line 408,".

Re: Monitoring Windows With Nagios

Posted: Tue Jan 03, 2017 1:11 pm
by mcapra
Can you show the full check_command definition or what you're executing from the CLI?