SNMP Cisco Problem

Jan Scholten Jan.Scholten at iconz.net
Mon Nov 8 21:19:37 CET 2004


Don't try to check the Admnin status (that is wheter the port is shutdown  
or no shutdown in the configs).

Try a snmpget -v 1 -c nagios 172.16.0.23 IF-MIB::ifOperStatus -w :1 -c:1
or if you have a different port to check on some routers:

# 'check_if_status' command definition
define command{
         command_name    check_if_status
         command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $USER3$ -P  
1 -o .1.3.6.1.2.1.2.2.1.8.$ARG1$ -m ALL -l $ARG2$ -w $ARG3$ -c $ARG4$
         }
and call it with:check_snmp!1!Port Status for Port 1 is:!:1!:1

.1.3.6.1.2.1.2.2.1.8. is IfOperStatus (for the submittet Port $ARG1$)
$ARG2$ is a custom string
$ARG3$ and $ARG4$ are warning and critical ranges here it means : critical  
(as it has the same value as warning it will override warning) if Port  
Status is above. snmp returns 1 for up and 2 for down.

Hope that helps!

Jan

> Hi!
>
> I currently try to check a Cisco Catalyst 3550.
> So i got this result with snmpget
>
> #snmpwalk -v 1 -c nagios 172.16.0.23  
> interfaces.ifTable.ifEntry.ifAdminStatus.1
> IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
>
> and this is my service descr for nagios
>
> define service {
> 	host_name		SW_NOT_UG
> 	service_description	SNMP_TEST
> 	check_command		check_snmp!interfaces.ifTable.ifEntry.ifAdminStatus.34!"INTEGER:  
> up(1)"!"INTEGER: down(2)"!"INTEGER: down(2)"
> 	max_check_attempts	3
> 	normal_check_interval	1
> 	retry_check_interval	3
> 	check_period    	24x7
>         notification_interval   20
>         notification_period     24x7
>         notification_options    w,c,u,r
>         contact_groups          SMS
> 	}
>
>
> With this description i got only this message in Nagios:
> 	Invalid warning threshold: INTEGER: up(1)
>
> I also tried to change " to '  - no result.
> So, what can i do else to get informations in a correct way?
>
> Sorry for this question its the first time i use snmp.
>
> Thanks for your help!
>
> Bye
>
>
> -------------------------------------------------------
> 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_idU88&alloc_id065&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
>
>



-- 
Jan Scholten
Research and Development Intern
Iconz.co.nz


-------------------------------------------------------
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