Regex in snmptd probe not working as expected

Document ID : KB000044056
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

I am trying to generate an alarm when a PDU Variable Comparison Rule, within a snmptd profile, is matched using the Regex operator.

When the trap is received, the alarm is not generated even if I’m expecting the variable condition is met.

 

Environment: 

SNMPTD probe (any version)

 

Cause:

The regex does not match the variable

 

Resolution

 

Ensure you enclose the regex between “/” and “/”

 

Example:

 

-          Alarm comes in with variable “New alarm”

 

Bad Regex:

New.*

 

Good Regex:

/New.*/

 

Capture.JPG 

 

 

Additional Information:  

 

Regex tested and debugger (online free tool): https://regex101.com/

 

Snmptd documentation: https://docops.ca.com/ca-unified-infrastructure-management-probes/en/alphabetical-probe-articles/snmptd-simple-network-management-protocol-trap-daemon-monitoring/snmptd-im-configuration