DX Infrastructure Management

Tech Tip: Regex in snmptd probe not working as expected - tec1629067 

Jun 13, 2016 06:30 AM

Issue:

I am trying to generate an alarm when a PDU Variable Comparison Rule, within a snptd 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.*/

 

 

 

 

Additional Information:

 

tec1629067 - http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec1629067.aspx

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

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.