SNMP OID for Script Results

This is directed at Mikrotik - I know tons of users would benefit.

Can you please extend SNMP to allow results of scripts to be returned, ie:

/system script print oid
0.1.2.3.4.5.6.7.8.9.0.1 script1
0.1.2.3.4.5.6.7.8.9.0.2 script2

then you could perform snmp get against the OID to run the script and return the result to the snmp get request. Pretttttttyyyy please.

or just allow variables to have OIDs:

[@cip-office] > :env print
“temp”=“running”

and

[@cip-office] > :env print oid
“temp”=“running” 0.1.2.3.4.5.6.7.8.9.0.1

then you could query just about anything you could dream of by setting the variable in a script.

why do you need this? example?

did you know that the Dude can get results of any command even if there is no OID for it?

get var by The Dude, then run external program and send the value to it - it’s so romantic =)

it depends on where you need that var. if it’s in dude, you don’t need to send it anywhere. if not in dude, then of course nothing I can do :slight_smile:

not now, but in future releases =)

I second this request… this is something that I’ve asked for for a long time (I think I even listed it on my requests when i started the original v4.0 Feature Requests thread…)

I have been trying to find information on using the Dude to do just this, but can not acheive success.
I have an APC UPS connected using USB, I have the UPS Package installed and want to create a Probe to monitor the On-line state. I have read the Probe Thread and other forums but I have been unable to decifer the correct function to read the variable.

Any help greatly appreciated.

Paul

From APC UPS work is not convenient if PoE cable length greater than 5 meters.
I am impressed by this:
http://tandem.ck.ua/ups_mtm-eng.php
http://tandem.ck.ua/ups_mt-eng.php

From APC UPS work is not convenient if PoE cable length greater than 5 meters.
I am impressed by this:
http://tandem.ck.ua/ups_mtm-eng.php
http://tandem.ck.ua/ups_mt-eng.php

This a good product, but my UPS is within the same enclousure as the router so cable length is fine. I can see all the data in WinBox, but what I am hoping to do is have a Probe Function that can monitor the On-Battery status within the Dude, but I am yet to make it work.

Mikrotik does not support SNMP UPS.
The answer of the mikrotik:
“Thank you very much for the request.
Currently such options are not available over SNMP, but we added these
features to our todo list.”
See scripts:http://tandem.ck.ua/prg/scripts.txt
Maybe they will help you.
We have also used them for APC.

Not everyone uses The Dude, but Zabbix, Zenoss or other NMSs. It would be really handy to have an option to save a value from script as OID. For example count of wireless users (/interface wireless registration-table print count-only where interface=“wlan1”). Really handy and useful.

Z.

or ‘:put [/queue tree get test-pcq pcq-queues]’ - developers promise that it vill be added in future versions, but with that feature we can get it right now =)

that will be added at first for simple queues.

For now you can “hack around it” and use currently defined OIDs. For example, simple queue’s name has an OID and you can change the name to reflect some value with a script. I also manipulate MTU value, since it’s got an OID, of dummy VAP to the same effect. I’m sure you can find others… :slight_smile:

simple?!? who need that??? queue tree ruleZ!

Congratulations
The feature has been added in 6.37
http://wiki.mikrotik.com/wiki/Manual:SNMP#Runing_scripts_with_GET

I want to write script for oid ccq .
may help me