This article explains how to generate SNMP Trap in HA when RE and Memory utilization rise or fall.
When the RE amd Memory utilization rise or fall, the related SNMP trap could be generated. Note: The following example is for SRX220.
{primary:node0}[edit snmp] root# show trap-group trap { version v2; categories { rmon-alarm; } targets { x.x.x.x; } } rmon { alarm 100 { interval 60; variable jnxOperatingBuffer.9.1.0.0; <--- For primary node Memory utilization sample-type absolute-value; startup-alarm rising-or-falling-alarm; rising-threshold xx; falling-threshold xx; rising-event-index 100; falling-event-index 100; } alarm 101 { interval 60; variable jnxOperatingBuffer.9.2.0.0; <--- For secondary node Memory utilization sample-type absolute-value; startup-alarm rising-or-falling-alarm; rising-threshold xx; falling-threshold xx; rising-event-index 101; falling-event-index 101; } alarm 102 { interval 60; variable jnxOperatingCPU.9.1.0.0; <--- For primary node CPU utilization sample-type absolute-value; startup-alarm rising-or-falling-alarm; rising-threshold xx; falling-threshold xx; rising-event-index 102; } alarm 103 { interval 60; variable jnxOperatingCPU.9.2.0.0; <--- For secondary node CPU utilization sample-type absolute-value; startup-alarm rising-or-falling-alarm; rising-threshold xx; falling-threshold xx; rising-event-index 103; falling-event-index 103; } event 100 { type snmptrap; } event 101 { type snmptrap; } event 102 { type snmptrap; } event 103 { type snmptrap; } }
Verification: - show commands >show snmp rmon alarms >show snmp rmon events >show snmp statistics - SNMP traceoption root@SRX-220# run show log jdebug-snmp | match trap Oct 21 01:08:29 snmpd[0] <<< V2 Trap Oct 21 01:08:29 snmpd[0] <<< Community: trap Oct 21 01:08:29 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:08:29 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:08:29 trap_generate_rmonAlarm: sent rmon trap type: risingAlarm, alarmIndex:100 Oct 21 01:08:31 snmpd[0] <<< V2 Trap Oct 21 01:08:31 snmpd[0] <<< Community: trap Oct 21 01:08:31 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:08:31 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:08:31 trap_generate_rmonAlarm: sent rmon trap type: risingAlarm, alarmIndex:101 Oct 21 01:09:35 snmpd[0] <<< V2 Trap Oct 21 01:09:35 snmpd[0] <<< Community: trap Oct 21 01:09:35 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:09:35 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:09:35 trap_generate_rmonAlarm: sent rmon trap type: fallingAlarm, alarmIndex:103 Oct 21 01:17:33 snmpd[0] <<< V2 Trap Oct 21 01:17:33 snmpd[0] <<< Community: trap Oct 21 01:17:33 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:17:33 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:17:33 trap_generate_rmonAlarm: sent rmon trap type: risingAlarm, alarmIndex:102 Notes: The following excerpt is from the technical document on rising-threshold :
- show commands >show snmp rmon alarms >show snmp rmon events >show snmp statistics - SNMP traceoption root@SRX-220# run show log jdebug-snmp | match trap Oct 21 01:08:29 snmpd[0] <<< V2 Trap Oct 21 01:08:29 snmpd[0] <<< Community: trap Oct 21 01:08:29 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:08:29 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:08:29 trap_generate_rmonAlarm: sent rmon trap type: risingAlarm, alarmIndex:100 Oct 21 01:08:31 snmpd[0] <<< V2 Trap Oct 21 01:08:31 snmpd[0] <<< Community: trap Oct 21 01:08:31 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:08:31 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:08:31 trap_generate_rmonAlarm: sent rmon trap type: risingAlarm, alarmIndex:101 Oct 21 01:09:35 snmpd[0] <<< V2 Trap Oct 21 01:09:35 snmpd[0] <<< Community: trap Oct 21 01:09:35 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:09:35 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:09:35 trap_generate_rmonAlarm: sent rmon trap type: fallingAlarm, alarmIndex:103 Oct 21 01:17:33 snmpd[0] <<< V2 Trap Oct 21 01:17:33 snmpd[0] <<< Community: trap Oct 21 01:17:33 snmpd[0] <<< OID : snmpTrapOID.0 Oct 21 01:17:33 snmpd[0] <<< OID : snmpTrapEnterprise.0 Oct 21 01:17:33 trap_generate_rmonAlarm: sent rmon trap type: risingAlarm, alarmIndex:102
Upper threshold for the sampled variable. When the current sampled value is greater than or equal to this threshold, and the value at the last sampling interval is less than this threshold, a single event is generated. A single event is also generated if the first sample after this entry becomes valid is greater than or equal to this threshold, and the associated startup alarm value is equal to the falling alarm or rising or falling alarm value. After a rising event is generated, another rising event cannot be generated until the sampled value falls below this threshold and reaches the falling threshold .
The following excerpt is from the technical document on falling-threshold :
The lower threshold for the sampled variable. When the current sampled value is less than or equal to this threshold, and the value at the last sampling interval is greater than this threshold, a single event is generated. A single event is also generated if the first sample after this entry becomes valid is less than or equal to this threshold, and the associated startup-alarm value is equal to falling-alarm value or rising-or-falling-alarm value. After a falling event is generated, another falling event cannot be generated until the sampled value rises above this threshold and reaches the rising-threshold.