Page 1 of 1

Setting up a MAX on snmp disk percentace

Posted: Thu Feb 09, 2017 12:09 pm
by paries
Hello, I am a newbie
setting up my nagios core for the first time
So far so good

So i have created a command

Code: Select all

define command{
        command_name    snmp_Disk1_Usage
        command_line    $USER1$/check_snmp -o .1.3.6.1.4.1.2021.9.1.8.1 -H $HOSTADDRESS$ $ARG1$
}
This works fine with

Code: Select all

define service{
        use                     generic-service
        host_name               www2.myhost.com
        service_description     Disk 1 Usage Percentage
        check_command           snmp_Disk1_UsedPercentage!-C my_monitor
}
The one part where i can not seem to connect the dots is how do i set this up to fail when a particular MAX Percentage is reached

Thanks

Re: Setting up a MAX on snmp disk percentace

Posted: Thu Feb 09, 2017 12:26 pm
by rkennedy
You'll want to append to your check_command, further information to pass to $ARG1$. The warning / critical values are usually adjusted with the -w / -c variables -

Code: Select all

[root@xi libexec]# ./check_snmp
check_snmp: Could not parse arguments
Usage:
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-x privproto] [-X privpasswd]


Re: Setting up a MAX on snmp disk percentace

Posted: Wed Mar 01, 2017 2:26 pm
by tmcdonald
Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up or has the issue otherwise been resolved?