Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Create trap key section #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deshike22
Copy link

$oid =~ s/./\./g; # replaces a . with . However when receiving trap alerts it comes with partially translated trapoid
Eg:
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.789.0.13

It does not match with full oid created in the code.

Also $item->{ key } = "snmptrap["\s$oid\s"]"; # surrounds with the oid with \s. When I checked it with http://www.rexv.org/ under posix regex none of those matched. Therefore item key had to change.
$item->{ key } = "snmptrap["$oid"]";

Please note that this was tested only on NETAPP-MIB

$oid =~ s/\./\\./g;  # replaces a . with \. However when receiving trap alerts it comes with partially translated trapoid
Eg: 
  SNMPv2-MIB::snmpTrapOID.0      type=6  value=OID: SNMPv2-SMI::enterprises.789.0.13

It does not match with full oid created in the code.

Also $item->{ key } = "snmptrap[\"\\s$oid\\s\"]";  # surrounds with the oid with \s. When I checked it with http://www.rexv.org/ under posix regex none of those matched. Therefore item key had to change. 
$item->{ key } = "snmptrap[\"$oid\"]";
 
Please note that this was tested only on NETAPP-MIB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant