Page 1 of 1

SNMP OK - 2 Even Log or Notification nagios 3.3.1

Posted: Tue Jul 10, 2012 2:58 am
by az_tech44
Hello everyone,

we have configured nagios 3.3.1 in our network its working fine but we have one issue with switch port monitoring even log or notification not working.

we have configured ring network with D-Link switches whenever the link id down in the ring in any port it just shows me on Status Information SNMP OK - 2 but there is no event log or notification...

If any buddy knows this solution please help me with this.....


Thanks in Advance
aztech44

Re: SNMP OK - 2 Even Log or Notification nagios 3.3.1

Posted: Tue Jul 10, 2012 9:36 pm
by jsmurphy
What's the full command you are using for this check to monitor these devices? Which plugin? A little more detail :)

Re: SNMP OK - 2 Even Log or Notification nagios 3.3.1

Posted: Thu Jul 12, 2012 1:58 am
by az_tech44
Thanks for the replay..

define host{
use generic-switch
host_name DLINK230 ;ing to this switch
alias D-Link Gigabit Switch ; ated with the switch
address 192.168.220.230 ; IP address of the switch
parents CISCO144
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 5
notification_period 24x7
notification_options d,u,r
notification_interval 30
hostgroups gigabit ;roups this switch is associated with
icon_image ng-switch40.jpg
statusmap_image ng-switch40.gd2
}

define service{
use local-service ; Inherit values from a template
host_name DLINK230
service_description PING
check_command check_ping!200.0,20%!600.0,60%
check_period 24x7
normal_check_interval 5
retry_check_interval 1
}
# Monitor status of port number 9 on the D-Link GIGA BIT switch

define service{
use generic-service
host_name DLINK230
service_description Port 9 Link Status
check_command check_snmp!-C public -o ifOperStatus.9 -r 1 -m RFC1213-MIB
}

# Monitor status of port number 10 on the D-Link GIGA BIT switch

define service{
use generic-service
host_name DLINK230
service_description Port 10 Link Status
check_command check_snmp!-C public -o ifOperStatus.10 -r 1 -m RFC1213-MIB
}

Re: SNMP OK - 2 Even Log or Notification nagios 3.3.1

Posted: Thu Jul 12, 2012 7:59 pm
by jsmurphy
I've seen this before and the solution was something really simply but I can't remember exactly what it was... Try putting single quotes around the -r value so that it looks like:
check_command check_snmp!-C public -o ifOperStatus.9 -r '1' -m RFC1213-MIB

Re: SNMP OK - 2 Even Log or Notification nagios 3.3.1

Posted: Sat Jul 14, 2012 2:06 am
by az_tech44
Thanks,

I have updated same as you given but I don't know what is updated. Now also the same only showing SNMP-2 that's it there is no event log or notification error we need any service alert if the snmp-2 showing..... is there any solution.....

Re: SNMP OK - 2 Even Log or Notification nagios 3.3.1

Posted: Sun Jul 15, 2012 8:31 pm
by jsmurphy
What we are trying to do here is diagnose why Nagios thinks a "2" is OK... for whatever reason it's not matching the regex pattern of '1' correctly so lets go back to basics. Execute the check_snmp plugin found in your libexec folder on the command line and lets see what the return is. Lets see if we can eliminate the Nagios application as the root cause or if the plugin isn't behaving as we expect.

./check_snmp -H <device IP> -C public -o ifOperStatus.9 -r '1' -m RFC1213-MIB

Can you post output? Can you also do an "echo $?" after running the command so that we can ensure it's exiting correctly. Are you also able to open your commands.cfg file and post the command definition for check_snmp.