check_snmp assistance request
Jan Scholten
Jan.Scholten at iconz.net
Wed Nov 10 21:55:51 CET 2004
Jamie Roughan wrote:
[cut]
> general checklist---
> - ./check_snmp -h #read contents
Normally it's a goord idea to check on the command_line (as user nagios)
if the plugin returns the correct output:
./check_snmp -P 1 -C public -H 172.16.100.1 -o IF-MIB::ifOperStatus.1 -w
:1 -c:1 -m ALL
if the output is like the one expected just use this line as a
check_command:
define command{
command_name check_snmp
command_line $USER1$/check_snmp
-H $HOSTADDRESS$ -C $USER3$ -o $ARG1$ -w $ARG2$ -c $ARG3$ -P1 -m ALL
}
You see i use the $USER1$ for the path to the plugins and $USER3$ for
the snmp Password (configure both in resources.cfg)
the check_command entry in the services.cfg is (for the above example):
..
check_command check_snmp!IF-MIB::ifOperStatus.1!:1!:1
> - commands.cfg
> #check_snmp command definition
> define command{
> command_name check_snmp
> command_line /usr/local/nagios/libexec/check_snmp
> -H $HOSTADDRESS$ -c $ARG1$ -o $ARG2$
> }
>
[cut]
> I suspect that the snmp config in either / both the services.cfg &
> checkcommands.cfg is close but not quite correct. Any useful suggestions
> are welcome.
Yeah.. some errors: in checkcommands you want Arguements (which you
dodn't provide in the services.cfg and you use a wrong parameter (-c
instead of -C)
If you have more questions: let me know!
Jan
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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