Community discussions

MikroTik App
 
User avatar
slackR
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Sat May 23, 2009 1:46 pm
Location: Buffalo, New York, USA

Global Variable SNMP oid

Wed Jan 21, 2015 10:08 pm

Hello,

I've been thinking about how to use SNMP to graph data like DHCP lease count in ROS. Then I thought it would be very useful if ROS could make an SNMP oid point to global script variable so that you could schedule a script to pull any value you want. Then you could retreve the value with SNMP.

Uses:

DHCP lease count
BGP prefix count
BGP/VPN peer uptime
route hop count
Wireless client registration count
Custom script values for endless uses
 
wispgeek
just joined
Posts: 17
Joined: Fri May 25, 2007 5:47 am

Re: Global Variable SNMP oid

Thu Oct 06, 2016 9:26 pm

This is a very useful feature for monitoring which many of us do using snmp, I personally run zabbix.
I'm wondering if there is any chance that this feature is being implemented?
I would currently like to query a count of addresses in a particular list, but can see future uses for passing variables via snmp if it were available.
 
isoplayert
just joined
Posts: 4
Joined: Mon Nov 19, 2018 11:54 am

Re: Global Variable SNMP oid

Mon Nov 19, 2018 12:02 pm

hi
am working on a solution that is based on LTE interfaces and i want to create a script that run every 1 min and send USSD code inquering about the SIM data balance and store that value in a global variable , it would be realy nice and helpfull if i can pass this value with custome-user OID and view it on the Dude Server , and make the dude notifying me if a data-balance is reaching certain threshold.

please add this feature to the ROS
 
isoplayert
just joined
Posts: 4
Joined: Mon Nov 19, 2018 11:54 am

Re: Global Variable SNMP oid

Wed Nov 21, 2018 10:54 pm

hi
for my case i found another approach to view global variable on Dude's screen , since the dude can connect to mikrotik CPE using SNMP or ROS , i can pull the global variable using the ROS method
for example we can add in the appearance for a device the following code in appearance>>label
[ros_command(":put $MyVar")]
and it will be displayed in the label of your device

hope it will help
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3292
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Global Variable SNMP oid

Wed Nov 21, 2018 11:08 pm

Then I thought it would be very useful if ROS could make an SNMP oid point to global script variable so that you could schedule a script to pull any value you want. Then you could retreve the value with SNMP.
This is exactly how I do it, but insted of SNMP I do use Syslog.
Se my thread about logging and example for DHCP etc here:
viewtopic.php?t=137338
 
indi
just joined
Posts: 3
Joined: Mon Nov 04, 2013 7:39 pm

Re: Global Variable SNMP oid

Thu Feb 04, 2021 11:57 am

We second this but not just for global variables. Our use case is to store script generated data in the variables and then retrieve it through SNMP OID, more specifically bandwidth test results, that we can later graph and alert on in our NMS.

So, please add "/environment print oid". Would also like to see them in somewhat static numbering, maybe numbered by alpabetical variable name order or similar.

We are aware of the workarounds with using unused entity names etc but we think putting real OID's on the variables would be more correct.

Who is online

Users browsing this forum: No registered users and 20 guests