Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Hi guys and girls,
I have Nagios Core installed and want to monitor the VLAN membership on Cisco switches, I also monitor the power used on the port and whether it's up or down in the same command, but VLAN is where my problem lies
This is the command I use (just the VLAN part) and works fine unless a port is a member of two VLANs in which case I only get the first VLAN- this is the first minor issue
./check_snmp -H 192.168.130.152 -C public -o SNMPv2-SMI::enterprises.9.9.68.1.2.2.1.2.10123 -l "VLAN ="
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.9.9.68.1.2.2.1.2.10123
I'm using groups when checking VLANs so I have checks for ports 1-24 for every switch. On some of them ports 23-24 are trunked. I'd like to keep using groups otherwise I would need separate checks for every switch. I guess my question is, is there another command that I'm not aware of that I could use to check VLAN membership where I won't get an error when run on a trunked port? Any recommendations are highly appreciated
Pikmin wrote:This is the command I use (just the VLAN part) and works fine unless a port is a member of two VLANs in which case I only get the first VLAN- this is the first minor issue
/usr/bin/snmpget -Le -t 3 -r 5 -m ALL -v 1 [authpriv] 192.168.130.152:161 SNMPv2-SMI::enterprises.9.9.68.1.2.2.1.2.10101 -D ALL
Pikmin wrote:I'm using groups when checking VLANs so I have checks for ports 1-24 for every switch. On some of them ports 23-24 are trunked. I'd like to keep using groups otherwise I would need separate checks for every switch. I guess my question is, is there another command that I'm not aware of that I could use to check VLAN membership where I won't get an error when run on a trunked port? Any recommendations are highly appreciated
You might be able to exclude those specific switches in the switches using a ! to exclude them. You could put all these switches in a group and exclude the group: https://assets.nagios.com/downloads/nag ... ricks.html
Excluding Hosts:
If you want to create identical services on numerous hosts or hostgroups, but would like to exclude some hosts from the definition, this can be accomplished by preceding the host or hostgroup with a ! symbol.
I've noticed your original command does not define an SNMP version so it is defaulting to v1. I'm interested to see what happens when you run it with v2c, try this command:
Thanks for all your help, aprreciate it.
For now I've decided to keep them all monitored but will keep in mind I have the exclude directive option
Ports that are not trunked output:
SNMP OK - VLAN = 34 Power = 0 Port Status = up(1)
SNMP OK - VLAN = 34 Power = 0 Port Status = up(1)
SNMP OK - VLAN = 34 Power = 0 Port Status = up(1)
Ports 21-24 only check for Power and Port Status, so I don't have to worry about VLAN error messages
Gi0/23 Description
SNMP OK - Power = 0 Port Status = up(1)
Gi0/24 Description
SNMP OK - Power = 0 Port Status = up(1)
Pikmin wrote:Thanks for all your help, aprreciate it.
For now I've decided to keep them all monitored but will keep in mind I have the exclude directive option
Ports that are not trunked output:
SNMP OK - VLAN = 34 Power = 0 Port Status = up(1)
SNMP OK - VLAN = 34 Power = 0 Port Status = up(1)
SNMP OK - VLAN = 34 Power = 0 Port Status = up(1)
Ports 21-24 only check for Power and Port Status, so I don't have to worry about VLAN error messages
Gi0/23 Description
SNMP OK - Power = 0 Port Status = up(1)
Gi0/24 Description
SNMP OK - Power = 0 Port Status = up(1)
Is there anything else we can do for you, or are you all right one this one for now?