Community discussions

MikroTik App
 
kiwistag
just joined
Topic Author
Posts: 16
Joined: Mon Jun 24, 2013 12:53 am
Location: New Zealand

HowTo: Voltage monitoring on The Dude for v6+

Fri May 19, 2017 1:22 am

After having a look through several old threads it was about time that a new thread with info on later versions of The Dude was released.

Most data is sort of right but it depends on what you are trying to achieve.
Below I will break each section up into separate posts since I won't have that much time to do all of it in one go.

The main thing to note is that the full SNMP OID string has changed.

To monitor voltage on a mipsbe unit (maybe others too) the full OID is:
iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.mtxrHlVoltage.0

The short OID:
iso.1.3.6.1.4.1.14988.1.1.3.8.0
Last edited by kiwistag on Fri May 19, 2017 3:23 am, edited 1 time in total.
 
kiwistag
just joined
Topic Author
Posts: 16
Joined: Mon Jun 24, 2013 12:53 am
Location: New Zealand

Re: HowTo: Voltage monitoring on The Dude for v6+

Fri May 19, 2017 1:30 am

mipsbe:
First of all create a new function named: mipsbe_voltage

In Code enter:
oid ("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.mtxrHlVoltage.0")
Create another function named: mipsbe_voltage_size (for use later on)
round (mipsbe_voltage())
Since the default function name cpu_mem_disk can't be edited you will have to create a new function.
Name it: cpu_mem_disk_volt
concatenate(
if(cpu_usage_available(), concatenate("cpu: ", cpu_usage(), "% "), ""),
if(mem_usage() > 0, concatenate("mem: ", round(mem_usage()), "% "), ""),
if(virtual_mem_usage() > 0, concatenate("virt: ", round(virtual_mem_usage()), "% "), ""),
if(hdd_usage() > 0, concatenate("disk: ", round(hdd_usage()), "% "), ""),
if(mipsbe_voltage() > 0, concatenate("Volt: ", (mipsbe_voltage()), "V "), "")
)
Next create yet another function called: device_performance_v (the function device_performance is read only, similar to cpu_mem_disk)
I simply created the suffix of _v to identify it as one to include voltage but feel free to rename it whatever as long as you use the same name in the next section.
if(
string_size(cpu_mem_disk_volt()) > 0,

concatenate(cpu_mem_disk_volt(), "
"),

""
)

Now to activate it on the map, you need to go into The Dude Settings and in the Map tab, expand Device Appearance
Change the label to be:
[Device.Name]
[device_performance_v()][Device.ServicesDown]
Image

If you go into your Network Maps now it should show the voltage for those that can view it.
Last edited by kiwistag on Fri May 19, 2017 1:59 am, edited 1 time in total.
 
kiwistag
just joined
Topic Author
Posts: 16
Joined: Mon Jun 24, 2013 12:53 am
Location: New Zealand

Re: HowTo: Voltage monitoring on The Dude for v6+

Fri May 19, 2017 1:55 am

This part is more experimental as it depends on how you want to graph the data.

Under Probes you can do this in two ways (both if you want).
The more useful one to have graphing of Voltage is to create a Probe linked to a function.

Create a new Probe called Voltage
Type: Function
Agent: default (in most cases)
Available: mipsbe_voltage_size() > 0 (remember how I said it'd come in handy later)
Error: if(mipsbe_voltage(), "", "down")
Value: mipsbe_voltage_size() >0
Unit: V

Image


Add the probe to the Services for the unit you wish to monitor. Note that initially it'll start at showing in mV since the first reading was zero when it started.
 
Beastman
just joined
Posts: 1
Joined: Sat Jun 16, 2018 1:15 pm

Re: HowTo: Voltage monitoring on The Dude for v6+

Sat Jun 16, 2018 4:08 pm

Hi there everyone

I was wondering is it possible for on the main overview of the map, to show whenever a site's power goes offline and batteries start to discharge, for the submap (Highsite) Label to change from the usual green to orange?

I am monitoring voltage already with alerts setup via telegram, but Im needing the label to indicate that once a set threshold is reached, voltage wise, the Label needs to change to orange.

That way when I walk into my office, with a quick glance I can see power is off at certain sites.

Thank you all in advance.
 
jondavy
Member Candidate
Member Candidate
Posts: 143
Joined: Tue May 12, 2009 11:14 pm
Location: Brasil

Re: HowTo: Voltage monitoring on The Dude for v6+

Sat Dec 21, 2019 6:08 pm

How i can Grap it in the dude?
This part is more experimental as it depends on how you want to graph the data.

Under Probes you can do this in two ways (both if you want).
The more useful one to have graphing of Voltage is to create a Probe linked to a function.

Create a new Probe called Voltage
Type: Function
Agent: default (in most cases)
Available: mipsbe_voltage_size() > 0 (remember how I said it'd come in handy later)
Error: if(mipsbe_voltage(), "", "down")
Value: mipsbe_voltage_size() >0
Unit: V

Image


Add the probe to the Services for the unit you wish to monitor. Note that initially it'll start at showing in mV since the first reading was zero when it started.

Who is online

Users browsing this forum: No registered users and 15 guests