Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PT43392239: system related alarms are not sent via email

- fix regex for DISMAN-EVENT-MIB::mteHotTrigger
- reconfigure snmpd when alarms change
  • Loading branch information...
commit 3d8d6ca8b82505bb6b8949ddb904f67be3f60677 1 parent d8c088e
@dizzy dizzy authored
View
2  sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/snmp/SnmpConfig.java
@@ -62,7 +62,7 @@ public boolean setup(SetupManager manager) {
@Override
public void replicate(ConfigManager manager, ConfigRequest request) throws IOException {
- if (!request.applies(SnmpManager.FEATURE, LocationsManager.FEATURE)) {
+ if (!request.applies(SnmpManager.FEATURE, LocationsManager.FEATURE, Alarms.FEATURE)) {
return;
}
Set<Location> locations = request.locations(manager);
View
8 sipXsnmp/bin/snmptrap-email-handler.in
@@ -84,11 +84,11 @@ end
#
# ============= Builtin net-snmp alarm =======
# DISMAN-EVENT-MIB::mteTriggerFired
-# DISMAN-EVENT-MIB::mteHotTrigger.0 = STRING: CPU_THRESHOLD_EXCEEDED
+# DISMAN-EVENT-MIB::mteHotTrigger.0 CPU_THRESHOLD_EXCEEDED
# DISMAN-EVENT-MIB::mteHotTargetName.0 = STRING:
# DISMAN-EVENT-MIB::mteHotContextName.0 = STRING:
# DISMAN-EVENT-MIB::mteHotOID.0 = OID: HOST-RESOURCES-MIB::hrProcessorLoad.768
-# DISMAN-EVENT-MIB::mteHotValue.0 = INTEGER: 95
+# DISMAN-EVENT-MIB::mteHotValue.0 95
####################################
def parse_alarm(data, input_stream)
alarm = {}
@@ -98,9 +98,9 @@ def parse_alarm(data, input_stream)
alarm = get_alarm(data, $1)
when /^SIPXECS-ALARM-NOTIFICATION-MIB::sipxecsAlarmSource/
alarm['source'] = line.split[1]
- when /^DISMAN-EVENT-MIB::mteHotTrigger.0 = STRING: (.*)$/
+ when /^DISMAN-EVENT-MIB::mteHotTrigger.0 (.*)$/
alarm = get_alarm(data, $1)
- when /^DISMAN-EVENT-MIB::mteHotValue.0 = INTEGER: (.*)$/
+ when /^DISMAN-EVENT-MIB::mteHotValue.0 (.*)$/
alarm['message'] = "threshold is #{$1}"
when /^SIPXECS-ALARM-NOTIFICATION-MIB::sipxecsAlarmDescr "(.*)"$/
alarm['message'] = $1
Please sign in to comment.
Something went wrong with that request. Please try again.