You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
Hi there,
I got an issue on trap_arg with CISCO CIMC trap event.
With C220 MIB, I always get the objects from transformed MIBS as the following:
{ObjectName(1.3.6.1.6.3.1.1.4.1): 'snmpTrapOID', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.1): 'cucsFaultIndex', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.16): 'cucsFaultOccur', ObjectName(1.3.6.1.2.1.1.3): 'sysUpTime', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.5): 'cucsFaultAffectedObjectDn', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.20): 'cucsFaultSeverity', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.7): 'cucsFaultProbableCause', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.22): 'cucsFaultType', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.10): 'cucsFaultCreationTime', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.14): 'cucsFaultLastModificationTime', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.4): 'cucsFaultAffectedObjectId', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.9): 'cucsFaultCode', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.11): 'cucsFaultDescription', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.13): 'cucsFaultId'}
def handles(self, trap):
if trap.oid == self.trap_type:
for trap_arg in trap.arguments:
if str(trap_arg) not in ['1.3.6.1.2.1.1.3.0'] and trap_arg not in self.trap_args.keys():
return False
return True
return False
Looks like the transformed CISCO MIB adds "CucsManagedObjectId(167772424)" in behind of each object.
Hi there,
I got an issue on trap_arg with CISCO CIMC trap event.
With C220 MIB, I always get the objects from transformed MIBS as the following:
{ObjectName(1.3.6.1.6.3.1.1.4.1): 'snmpTrapOID', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.1): 'cucsFaultIndex', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.16): 'cucsFaultOccur', ObjectName(1.3.6.1.2.1.1.3): 'sysUpTime', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.5): 'cucsFaultAffectedObjectDn', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.20): 'cucsFaultSeverity', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.7): 'cucsFaultProbableCause', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.22): 'cucsFaultType', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.10): 'cucsFaultCreationTime', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.14): 'cucsFaultLastModificationTime', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.4): 'cucsFaultAffectedObjectId', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.9): 'cucsFaultCode', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.11): 'cucsFaultDescription', ObjectName(1.3.6.1.4.1.9.9.719.1.1.1.1.13): 'cucsFaultId'}
But when a event happens, the args(parameters) like the following:
[2015-04-27 11:28:43,773] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.9.167772424
[2015-04-27 11:28:43,773] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.5.167772424
[2015-04-27 11:28:43,773] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.14.167772424
[2015-04-27 11:28:43,773] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.7.167772424
[2015-04-27 11:28:43,774] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.1.167772424
[2015-04-27 11:28:43,774] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.4.167772424
[2015-04-27 11:28:43,774] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.2.1.1.3.0
[2015-04-27 11:28:43,774] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.16.167772424
[2015-04-27 11:28:43,774] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.11.167772424
[2015-04-27 11:28:43,774] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.10.167772424
[2015-04-27 11:28:43,775] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.20.167772424
[2015-04-27 11:28:43,775] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.13.167772424
[2015-04-27 11:28:43,775] [DEBUG] [sensu-trapd] trap_arg : 1.3.6.1.4.1.9.9.719.1.1.1.1.22.167772424
This cause the following code in hander.py fail.
Looks like the transformed CISCO MIB adds "CucsManagedObjectId(167772424)" in behind of each object.
And here is my traps.json file:
cat traps.json
{
"cisco-event-handler1":
{
"trap":
{
"type":
[
"CISCO-UNIFIED-COMPUTING-NOTIFS-MIB",
"cucsFaultActiveNotif"
],
"args":
{
"sysUpTime":
[
"SNMPv2-MIB",
"sysUpTime"
],
"snmpTrapOID":
[
"SNMPv2-MIB",
"snmpTrapOID"
],
"cucsFaultIndex":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultIndex"
],
"cucsFaultAffectedObjectId":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultAffectedObjectId"
],
"cucsFaultCreationTime":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultCreationTime"
],
"cucsFaultLastModificationTime":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultLastModificationTime"
],
"cucsFaultCode":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultCode"
],
"cucsFaultType":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultType"
],
"cucsFaultProbableCause":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultProbableCause"
],
"cucsFaultOccur":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultOccur"
],
"cucsFaultId":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultId"
],
"cucsFaultDescription":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultDescription"
],
"cucsFaultAffectedObjectDn":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultAffectedObjectDn"
],
"cucsFaultSeverity":
[
"CISCO-UNIFIED-COMPUTING-FAULT-MIB",
"cucsFaultSeverity"
]
}
},
This is the code I've got from transformed MIB:
CISCO-UNIFIED-COMPUTING-FAULT-MIB.py:cucsFaultIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 719, 1, 1, 1, 1, 1), CucsManagedObjectId()).setMaxAccess("noaccess")
CISCO-UNIFIED-COMPUTING-FAULT-MIB.py:cucsFaultHolderInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 719, 1, 1, 2, 1, 1), CucsManagedObjectId()).setMaxAccess("noaccess")
CISCO-UNIFIED-COMPUTING-FAULT-MIB.py:cucsFaultPolicyInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 719, 1, 1, 3, 1, 1), CucsManagedObjectId()).setMaxAccess("noaccess")
CISCO-UNIFIED-COMPUTING-FAULT-MIB.py:cucsFaultAffectedClassInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 719, 1, 1, 4, 1, 1), CucsManagedObjectId()).setMaxAccess("noaccess")
CISCO-UNIFIED-COMPUTING-FAULT-MIB.py:cucsFaultLocalTypedHolderInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 719, 1, 1, 6, 1, 1), CucsManagedObjectId()).setMaxAccess("noaccess")
CISCO-UNIFIED-COMPUTING-FAULT-MIB.py:cucsFaultSuppressPolicyInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 719, 1, 1, 7, 1, 1), CucsManagedObjectId()).setMaxAccess("noaccess")
So what could the issue be, is there anything wrong in my configuration?
Regards,
Autumn Wang
The text was updated successfully, but these errors were encountered: