Community discussions

MikroTik App
 
isoplayert
just joined
Topic Author
Posts: 4
Joined: Mon Nov 19, 2018 11:54 am

snmp probe compare the oid lookup value

Sat Sep 07, 2019 12:56 pm

hello
fast question is " is it possible to compare oid lookup value instead of its integer value in SNMP probe ? "
the full story below :
i am using the dude to monitor many devices of my network including the UPS , and am using telegram api for notifications to inform me of the probe status
i am monitoring the following OID 1.3.6.1.2.1.33.1.4.1.0 which is an integer
in the appearance lable i put
status:[oid("1.3.6.1.2.1.33.1.4.1.0")]
and the output is "status:normal (3)"
ups1.png
i defined an SNMP probe to compare the value of the above oid if it is equal 3 or not
ups.status probe.png
when the service is not equal 3 it is considered as down and i get a telegram notification says

"Service UPS.status on rackUPS is now down (statement 5 == 3 not true)"

instead of this , i want to compare the lookup value instead of the integer value in the probe and see if it is equal "normal"

so when i get a notification it would say "Service UPS.status on rackUPS is now down (statement onbattery == normal not true)

and so back to the first question is it possible to compare oid lookup value instead of its integer value in SNMP probe ? if not do you agree to add this feature in the dude server ?
You do not have the required permissions to view the files attached to this post.
 
User avatar
geoffsmith31
Member Candidate
Member Candidate
Posts: 157
Joined: Fri Nov 05, 2010 6:08 am
Location: Toowoomba, Australia

Re: snmp probe compare the oid lookup value

Sun Sep 22, 2019 2:25 am

You'd be better off to write a function probe to get the solution you want rather than the auto-created probes that just do the value compare as in your example. Look in the Probes thread there are heaps of examples about how to do this.