Page 1 of 1
Monitoring Devices with Nagios
Posted: Sun Nov 20, 2016 3:34 pm
by emartine
I was asked to "monitor all interfaces on the Fabric Interconnect and UCS servers. If a link does down or flaps, and engineer must be paged."
I understand
https://communities.cisco.com/docs/DOC-52697 is available but still geared for nagios core rather than Nagios XI due to its discovery. I know there is a plugin called cisco_ucs_nagios that can be used to monitor the UCS.
/usr/local/nagios/libexec/cisco_ucs_nagios -H <IP ADDRESS> -u <USERNAME> -p <PASSWORD> -t <class or dn> -q <query > other options.
But I can't seem to find what I need. Is nagios the right tool for this? Should I be looking elsewhere or am I just looking in the wrong places?
Re: Monitoring Devices with Nagios
Posted: Mon Nov 21, 2016 10:28 am
by rkennedy
Can you show us the full input / output for the plugin that you're using? Just trying to understand what the plugin is showing you, and to see what you mean by 'can't find what I need'.
Are you using SNMP to query the device? Can you post the output of a full walk against the device? There should be an OID for each interface that says UP or DOWN, and it's fairly easy to monitor them.
Re: Monitoring Devices with Nagios
Posted: Fri Dec 02, 2016 5:43 pm
by emartine
rkennedy wrote:Can you show us the full input / output for the plugin that you're using? Just trying to understand what the plugin is showing you, and to see what you mean by 'can't find what I need'.
I was asked to "monitor all interfaces on the Fabric Interconnect and UCS servers. If a link does down or flaps, and engineer must be paged." <--- what I need
Are you using SNMP to query the device? Can you post the output of a full walk against the device? There should be an OID for each interface that says UP or DOWN, and it's fairly easy to monitor them.
It times out.
Code: Select all
snmpwalk -c public -O e <IP Address>
No log handling enabled - turning on stderr logging
snmpwalk: Timeout
From looking at the guts of the plugin I've been able to get some of the queries to work but not what I need.
These don't give me output
Code: Select all
Inv_ComputeRackUnit=Serial,Uuid,Model,Vendor,OperPower:Power(W),TotalMemory:Memory(MB),NumOfCores:Cores,NumOfCpus:CPUs
Inv_ComputeRackUnitMbTempStats = AmbientTemp:Temperature
Inv_ComputeMbPowerStats= ConsumedPower:Power(W)
Inv_EquipmentChassis=partNumber,serial
Inv_EquipmentFex=serial,operState
Inv_equipmentSwitchIOCard=switchId,model,serial
These Give me output
Code: Select all
Inv_MemoryUnit=Capacity:Memory Size (MB)
Inv_MemoryArray= CurrCapacity:Total Memory (MB),Populated:Slot(s) Populated
Inv_EquipmentPsu = Model,Power:Power Status,Serial
Inv_ComputeBlade=TotalMemory,AssignedToDn,PartNumber,NumOfCpus,NumOfCores
Inv_ProcessorUnit= Cores,Model,Speed:CPU Speed(Mhz)
Inv_networkElement=serial,oobIfGw:Gateway IP,oobIfIp:IP,oobIfMask:Subnet Mask
Inv_equipmentIOCard=switchId,model,serial
Inv_equipmentNetworkElementFanStats=Speed,airflowDirection,speedMin,speedMax
Re: Monitoring Devices with Nagios
Posted: Mon Dec 05, 2016 1:02 pm
by avandemore
Have you tried using the SNMP Walk Wizard?
emartine wrote:It times out.
How long before it times out?
snmpwalk -h will list timeout options.
Re: Monitoring Devices with Nagios
Posted: Tue Dec 06, 2016 1:20 pm
by emartine
The snmp walk wizard also times out. It scans for devices and then displays:
No results were returned from a scan of the device. This may be due to the fact that SNMP is not enabled, or you specified incorrect scan settings.
You may either change your settings or try the same scan again.
I've tried several iterations of settings but so far no dice.
Re: Monitoring Devices with Nagios
Posted: Tue Dec 06, 2016 2:08 pm
by avandemore
avandemore wrote:How long before it times out? snmpwalk -h will list timeout options.
Please see the above and the full syntax you are using.
Re: Monitoring Devices with Nagios
Posted: Tue Dec 06, 2016 3:23 pm
by emartine
I've done -t 200 and still the same result.
Re: Monitoring Devices with Nagios
Posted: Tue Dec 06, 2016 4:27 pm
by avandemore
You should be able to walk .1.3.6.1.2.1.2.2 Consult your device documentation. Perhaps you can refer to the manufacturer MIB on what you need to query.