check_snmp

Philip Kizer pckizer at nostrum.com
Tue Jul 29 03:01:39 CEST 2008


On 2008, Jul 28, at 05:16, Kermito le kermit wrote:
> I want to use check_snmp to make somme check   example i want to  
> check a printer to see if ink is finish command
>
> check_snmp  -H ip -o OID TRAP   -w        -c
>
> i want to put what to warnnig and critical

If your check_snmp looks like:

# 'check_snmp' command definition
define command{
         command_name    check_snmp
         command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$  
-o $ARG2$ -w $ARG3$ -c $ARG4$ $ARG5$ $ARG6$ $ARG7$
}

you can just do:

define service{
         use                             generic-service         ;  
Name of service template to use
         hostgroup_name                  hosts_temp
         service_description             Temp
         check_command                   check_snmp!$USER4$!$USER9$!39! 
42
}

Appropriately redfined for your printer community string where I have  
$USER4$, the ink-level OID where I have $USER9$ and your warning/crit  
levels in place of the final 2 numbers.

That should help you interpret the rest of the documentation to  
understand it better in how parameter passing is done separated by the  
exclamation marks.


-philip


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list