-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
OID filtering - compare to string... #31
Comments
Do you need to filter by the OID or by its value or by its MIB name or by some combination of those? |
I need to filter first the OID (to select a trap for node down for example) and then compare other OID with an IP address, to forward only node down from this source address. |
I think this exact work flow is yet to be implemented. What you could do now is to filter/route messages by the OIDs or match the OIDs and override their values in command response (note to self: we need to extend that to notifications). Perhaps the best bet would be to create a simple plugin which would do exactly what you need i.e. search by a specific OID, then search for the other and compare with a value. In case of no match, just return Let me know if you need any further help. |
Hi Ilya, Plugin: filterplus.py
PLUGIN CONF FILE: filterplus.conf
Thanks in advance |
If I understand the logic you are looking for, the loop seems suspicious to me... How about this simplistic linear approach?
|
Hi,
but there is an error about str and attirbute match:
Any help? Thanks a lot |
At this line:
you are using the value of the
Which is obviously a |
Hi Ilya,
Now I have this error about int object not iterable:
|
I think the plugin is expected to return a tuple of |
Hi Ilya,
Actually I'm trying to check the functionality that I want. My target is to receive only "node down" (firstOID in filterplus.conf) traps, but only from some hosts (hostname in filterplus.conf). I'm trying with and without regular expressions in conf, like this:
and the server configuration is this:
Now, if I send a trap to local server with snmp_trapsend, like this: I have a "ERROR no route configured....", as you can see: But if I send to local server a trap with network node manager (hp openview), like this:
I have no message in server log. Any idea about it? |
This May be your notification comes in a way that it does not match |
Yes, snmp_trapsend send only v1 traps, but I can see something in logs. /opt/OV/bin/nnmsnmpnotify.ovpl -v2c -p 10161 -e .1.3.6.1.4.1.11.2.17.19.2.0.32 -a $node $nnmi .1.3.6.1.4.1.11.2.17.19.2.0.32 (where $node and $nnmi are the host receiver) nothing changes in log |
If you intend to send SNMPv1 TRAPs, try to set |
It is possible to filter by OID comparison with a string?
Example: filter traps that have a particular node name in a varbind.
The text was updated successfully, but these errors were encountered: