Community discussions

MikroTik App
RK
Long time Member
Long time Member
Topic Author
Posts: 565
加入: Tue Nov 21, 2006 11:22 am
Location:Winnipeg, Canada and Central America

Can't read Voltage via SNMP on CRS112-8P-4S

Sat Mar 31, 2018 4:27 am

Self explanatory:

[]> /system health print oid
active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
voltage: .1.3.6.1.4.1.14988.1.1.3.8.0
temperature: .1.3.6.1.4.1.14988.1.1.3.10.0
processor-temperature: .1.3.6.1.4.1.14988.1.1.3.11.0
current: .1.3.6.1.4.1.14988.1.1.3.13.0
fan-speed: .1.3.6.1.4.1.14988.1.1.3.17.0
fan-speed2: .1.3.6.1.4.1.14988.1.1.3.18.0
power-consumption: .1.3.6.1.4.1.14988.1.1.3.12.0
psu1-state: .1.3.6.1.4.1.14988.1.1.3.15.0
psu2-state: .1.3.6.1.4.1.14988.1.1.3.16.0

# snmpget -v1 -c public x.x.x.x .1.3.6.1.4.1.14988.1.1.3.8.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.14988.1.1.3.8.0
Top
RK
Long time Member
Long time Member
Topic Author
Posts: 565
加入: Tue Nov 21, 2006 11:22 am
Location:Winnipeg, Canada and Central America

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Apr 05, 2018 8:14 pm

Mikrotik, are there plans to fix this software bug?
Top
jarda
Forum Guru
Forum Guru
Posts: 7752
加入: Mon Oct 22, 2012 4:46 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Apr 05, 2018 8:32 pm

Top
RK
Long time Member
Long time Member
Topic Author
Posts: 565
加入: Tue Nov 21, 2006 11:22 am
Location:Winnipeg, Canada and Central America

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sat Apr 07, 2018 4:47 am

Thanks for confirming that I am doing everything correctly and that this is a software bug.
Top
VasilisCY
刚刚加入了
Posts: 3
加入: Wed Feb 21, 2018 7:18 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Sep 27, 2018 6:59 pm

Any updates on the issue ?
Working with version 6.43.2 and
[admin@MikroTik] > /system health print oid
temperature: .1.3.6.1.4.1.14988.1.1.3.10.0

only

but,
[admin@MikroTik] > /system health print
temperature: 43C
psu1-voltage: 25.6V
psu2-voltage: 0V

I will prefer snmp read instead of wring a script to telnet to the switch just to get a value.
Top
用户头像
jose
Frequent Visitor
Frequent Visitor
Posts: 59
加入: Thu Sep 22, 2005 4:56 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Mon Dec 03, 2018 7:15 pm

Any update with this problem?

Thanks
Top
Kampfwurst
Member Candidate
Member Candidate
Posts: 107
加入: Mon Mar 24, 2014 2:53 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Mon Dec 10, 2018 5:08 pm

same problem with the RB1100x4
Top
用户头像
jose
Frequent Visitor
Frequent Visitor
Posts: 59
加入: Thu Sep 22, 2005 4:56 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Wed Jan 09, 2019 8:57 pm

bump
Top
scampbell
Trainer
Trainer
Posts: 486
加入: Thu Jun 22, 2006 5:20 am
Location:Wellington, NZ
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Wed Mar 06, 2019 7:27 am

bump please
Top
mimbach
刚刚加入了
Posts: 14
加入: Fri Sep 14, 2007 7:59 am
Location:utah / wyoming

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Wed Apr 17, 2019 7:49 am

Bump.
Top
VasilisCY
刚刚加入了
Posts: 3
加入: Wed Feb 21, 2018 7:18 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Wed May 15, 2019 11:58 pm

Well ??
Is been a long time now. Any effort to resolve this ?
Running latest stable version(6.44.3) on CRS112-8P-4S

[admin@Switch] > /system health print oid
temperature: .1.3.6.1.4.1.14988.1.1.3.10.0
[admin@Switch] >
Top
用户头像
vecernik87
Forum Veteran
Forum Veteran
Posts: 884
加入: Fri Nov 10, 2017 8:19 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu May 16, 2019 3:28 am

Long time? Not even 10 years yet. You seem to be bit impatient, don't you think?:D
Top
CJSA
刚刚加入了
Posts: 2
加入: Mon Jul 01, 2019 3:12 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Tue Jul 23, 2019 11:10 am

Hi Guys

Any Feedback on this?
这个问题看起来小,这是一个重要的年代NMP OID required for remote site monitoring, espescially for South African clients using the equipment on their highsites with all of the local Electricity supplier issues.

We have no way of monitoring PSU1 or PSU2 voltages directly via SNMP on our CRS units as the existent oid's has been removed and it would seem that the original issue has not been attended to and been parked for over a year now.

Please advise, sorting this issue out will be much appreciated.
Top
PeS
刚刚加入了
Posts: 1
加入: Tue Oct 22, 2019 12:36 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Tue Oct 22, 2019 1:22 pm

Anoher time passed by and no change....while we are doing battery backup setups, this would help us lot to monitor such sites.

[admin@Obedovice - Switch] > /system health print
temperature: 41C
psu1-voltage: 23.6V
psu2-voltage: 0V
[admin@Obedovice - Switch] > /system health print oid
temperature: .1.3.6.1.4.1.14988.1.1.3.10.0
[admin@Obedovice - Switch] > /system routerboard print
routerboard: yes
model: CRS112-8P-4S
serial-number: 9B200A22E7B8
firmware-type: qca8513L
factory-firmware: 3.41
current-firmware: 6.45.6
upgrade-firmware: 6.45.6
Top
joeg321
刚刚加入了
Posts: 5
加入: Fri May 28, 2004 4:08 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Wed Oct 23, 2019 6:35 pm

We are also in need of this bug to get fixed. Just moved to this switch from another Mikrotik switch and no SNMP voltage monitoring. Please fix asap.
Top
KbzA
newbie
Posts: 27
加入: Thu Feb 24, 2011 7:46 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

星期二2月18, 2020 6:15 pm

any news?
Top
用户头像
jose
Frequent Visitor
Frequent Visitor
Posts: 59
加入: Thu Sep 22, 2005 4:56 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

星期二2月18, 2020 6:53 pm

There are some ways to get the volt besides SNMP.
You could get the voltaje through API and call through a script.
Code:Select all
require('routeros_api.class.php'); function getVoltaje($request, $response, $args) { $ip = $request->getAttribute('ip'); $username = "XXXX"; $pass = "YYYYYY"; $API = new RouterosAPI(); if ($API->connect($ip, $username, $pass)) { $ARRAY = $API->comm("/system/health/print", array(".proplist" => "psu1-voltage")); flush(); $float = floatval($ARRAY[0]["psu1-voltage"]); echo ($float * 10); $API->disconnect(); } else { print_r($API->connect($ip, $username, $pass)); echo "no se pudo conectar al servidor:" . $ip . '\n'; return false; } }
Remember to use the last routeros_api.class.php
Top
scampbell
Trainer
Trainer
Posts: 486
加入: Thu Jun 22, 2006 5:20 am
Location:Wellington, NZ
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sun Jun 21, 2020 7:19 am

Any progress on the SNMP Health moniroring please ? Still no Voltage OID's....... 2 years 3 months I reckon since this was first requested ???

[admin@CRS112] /system health> pr
temperature: 34C
psu1-voltage: 24.3V
psu2-voltage: 48.6V
[admin@CRS112] /system health> print oid
temperature: .1.3.6.1.4.1.14988.1.1.3.10.0
[admin@CRS112] /system health>
Top
l0ft13
刚刚加入了
Posts: 23
加入: Wed May 28, 2008 11:22 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Tue Jul 21, 2020 2:19 am

if you use the dude to monitor then you can get this value using a function
Code:Select all
round(ros_command(":put [/system health get psu1-voltage]"))/10
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 4:44 am

if you use the dude to monitor then you can get this value using a function
Code:Select all
round(ros_command(":put [/system health get psu1-voltage]"))/10
Is there something else we need to do? In the Dude or in the router? I'm trying this with a RB1100AHx4 running 6.45.9, and it's not working. The "psu1-voltage" is one of the parameters shown when you do a "/system health print". When I place the command in the device appearance, I get back a 0 instead of the 24 I expect. If I remove the round function and the /10, I get nothing displayed.

Thanks
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 5:22 am

Found my problem. "Router OS" has to be enabled. But the Dude is flaky and doesn't always want to connect when you first check the box and apply. It has to wait until the next connect time, which by default is 24 hours. And rebooting the Dude doesn't connect on the first try either. Arrrr.
Top
phendry
Member Candidate
Member Candidate
Posts: 259
加入: Fri May 28, 2004 4:42 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 5:34 am

Dude is flaky and doesn't always want to connect when you first check the box and apply. It has to wait until the next connect time, which by default is 24 hours.
Tried clicking the 'Reconnect' button in the dude?
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 5:43 am

That works! Thanks!
Top
Elans
Member Candidate
Member Candidate
Posts: 131
加入: Wed Apr 18, 2018 12:41 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 7:12 am

Starting from version 6.47beta19 / 6.47 there have been health improvements. More information can be found under "/system health gauges print" and if you are looking for oid "/system health gauges print oid".
Top
scampbell
Trainer
Trainer
Posts: 486
加入: Thu Jun 22, 2006 5:20 am
Location:Wellington, NZ
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 7:33 am

Thank you Mikrotik !!
RoS 6.47.1

[admin@crs112-8p-test] /system health gauges> print oid
0 name=.1.3.6.1.4.1.14988.1.1.3.100.1.2.7201
value=.1.3.6.1.4.1.14988.1.1.3.100.1.3.7201
type=.1.3.6.1.4.1.14988.1.1.3.100.1.4.7201

1 name=.1.3.6.1.4.1.14988.1.1.3.100.1.2.7202
value=.1.3.6.1.4.1.14988.1.1.3.100.1.3.7202
type=.1.3.6.1.4.1.14988.1.1.3.100.1.4.7202

Name/OID: .1.3.6.1.4.1.14988.1.1.3.100.1.3.7201; Value (Gauge): 287
Name/OID: .1.3.6.1.4.1.14988.1.1.3.100.1.3.7202; Value (Gauge): 486
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Jul 24, 2020 3:49 pm

Starting from version 6.47beta19 / 6.47 there have been health improvements. More information can be found under "/system health gauges print" and if you are looking for oid "/system health gauges print oid".
Too bad that ARM devices (1100x4) randomly lock up and reboot on anything later than 6.43.16.
Top
用户头像
Egate
Long time Member
Long time Member
Posts: 554
加入: Thu May 15, 2008 10:43 am
Location:South Africa

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Nov 19, 2020 1:36 pm

Thank you Mikrotik !!
RoS 6.47.1

[admin@crs112-8p-test] /system health gauges> print oid
0 name=.1.3.6.1.4.1.14988.1.1.3.100.1.2.7201
value=.1.3.6.1.4.1.14988.1.1.3.100.1.3.7201
type=.1.3.6.1.4.1.14988.1.1.3.100.1.4.7201

1 name=.1.3.6.1.4.1.14988.1.1.3.100.1.2.7202
value=.1.3.6.1.4.1.14988.1.1.3.100.1.3.7202
type=.1.3.6.1.4.1.14988.1.1.3.100.1.4.7202

Name/OID: .1.3.6.1.4.1.14988.1.1.3.100.1.3.7201; Value (Gauge): 287
Name/OID: .1.3.6.1.4.1.14988.1.1.3.100.1.3.7202; Value (Gauge): 486
I am guessing the value would be 28.7 Volt and not 287. Any way to manipulate this in Dude to show 28.7 instead of 287, or is this only Mikrotik that can fix this?
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Nov 20, 2020 4:53 am

Yay! It works on the RB1100AHx4 now too.

As far as the Dude, I do custom functions to get the OID values and divide that by 10. Then another to create the display which you then place on the device appearance label (One of several functions I've replaced the defaults on the label with. The others include average CPU percentage, ROS version, and Uptime).

Function name=PSU1_Get_ROS
if(string_size(oid_raw("1.3.6.1.4.1.14988.1.1.3.100.1.3.7201",5,5)),oid_raw(1.3.6.1.4.1.14988.1.1.3.100.1.3.7201",5,5)/10,-1)

Function name=PSU2_Get_ROS
if(string_size(oid_raw("1.3.6.1.4.1.14988.1.1.3.100.1.3.7202",5,5)),oid_raw(1.3.6.1.4.1.14988.1.1.3.100.1.3.7202",5,5)/10,-1)

Function name=PSU_Display_ROS
concatenate(if(PSU_Get_ROS()=-1,"----",concatenate(PSU1_Get_ROS(),"vdc"))," / ",if(PSU2_Get_ROS()=-1,"----",concatenate(PSU2_Get_ROS(),"vdc")))

Appearance Label
[PSU_Display_ROS()]
Top
用户头像
Egate
Long time Member
Long time Member
Posts: 554
加入: Thu May 15, 2008 10:43 am
Location:South Africa

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Fri Nov 20, 2020 7:42 am

Great, thanks. Much appreciated.
Top
prawira
Trainer
Trainer
Posts: 353
加入: Fri Feb 10, 2006 5:11 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Jul 15, 2021 8:29 am

Hi all,

I try to read the voltages both of PSU1 and PSU2 plugged into CRS112-8P-4S using OID but still fail.

Here is the screen shoot of both functions and probes made read from winbox
dude voltage.png
i used oid function on dude-3.6 and work find, but it does not work on the recent dude version (6.47.10)

can anyone let me know what's wrong or what that need to change ?

Thank you
You do not have the required permissions to view the files attached to this post.
Top
用户头像
Egate
Long time Member
Long time Member
Posts: 554
加入: Thu May 15, 2008 10:43 am
Location:South Africa

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Jul 15, 2021 9:30 am

These work for me on netPower16P
Image
You do not have the required permissions to view the files attached to this post.
Top
用户头像
rextended
Forum Guru
Forum Guru
Posts: 11581
加入: 星期二2月25, 2014 12:49 pm
Location:Italy
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Thu Jul 15, 2021 10:10 am

I try to read the voltages both of PSU1 and PSU2 plugged into CRS112-8P-4S using OID but still fail.
Have you update the CRS112-8P-4S to latest 6.47.10?
If not, you can't with oid.

PSU1
oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.100.1.3.7201")
PSU2
oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.100.1.3.7202")
Top
prawira
Trainer
Trainer
Posts: 353
加入: Fri Feb 10, 2006 5:11 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sat Jul 17, 2021 3:45 pm

dear Egate,

我需要的是为和图表展现真实的电压received from the psu, such as 24.5V, 24.7, etc.
what value shown on yr dude ? it seems 0 or 1 or 4 ?

hi rextended,

yes, there are 4 CRS112-8P-4S connected to RB1100AHx4 and all of the loaded with ROS 6.47.10 long-term

the value gather from this info (/system health gauge print oid)
psu oid.png
the response appear on device on dude is parse failed

cheers
You do not have the required permissions to view the files attached to this post.
Top
用户头像
rextended
Forum Guru
Forum Guru
Posts: 11581
加入: 星期二2月25, 2014 12:49 pm
Location:Italy
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sat Jul 17, 2021 6:11 pm

...
Last edited byrextendedon Sat Jul 17, 2021 6:17 pm, edited 4 times in total.
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sat Jul 17, 2021 6:15 pm

I was about to point out the extraneous decimal point myself. You can use the full numeric OID if you wish, just drop that leading decimal point.
Top
用户头像
rextended
Forum Guru
Forum Guru
Posts: 11581
加入: 星期二2月25, 2014 12:49 pm
Location:Italy
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sat Jul 17, 2021 6:17 pm

do not use . at start of oid

the OID for PS1 and PS2 work from 6.47.9+ version

rex_oid_voltaggio_psu1 function code

oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.100.1.3.7201")
and

rex_oid_voltaggio_psu2 function code

oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.100.1.3.7202")


check_psu1.png
Top
nje431
Frequent Visitor
Frequent Visitor
Posts: 95
加入: Tue Sep 10, 2013 5:17 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Sat Jul 17, 2021 7:43 pm

I've gone a step further in my monitoring on the Dude. I test for a communications fail, and if it fails, I return a value of -1. Then I have a function the alarm probe uses, that during a communications fail will return a value of 24 if the alarm is already clear, and a value of 0 if it's in alarm. That keeps the alarm from bouncing if there is packet loss, and also keeps from telling you the Power Supply has failed, when in fact you've lost communications to the site, which is better reported by a single dedicated probe. With simpler probes, a communications failure will return a value of 0.

Because of what I do to avoid the alarm bounce on communications failure, by faking a value, I normally use separate probes for alarms and charts, in our case I don't actually chart the PSU voltages. For your case, you'd want to chart the PSU1_Get_ROS and PSU2_Get_ROS functions. Then during communications failure, you'd chart a value of -1, which would make it clear what happened.

PSU 2 uses the same code as PSU 1, but with the appropriate references to the other OID and functions.

PSU1_Get_ROS (Function Code: returns voltage, or -1 on comms fail)
if(string_size(oid_raw("1.3.6.1.4.1.14988.1.1.3.100.1.3.7201",5,5)),oid_raw("1.3.6.1.4.1.14988.1.1.3.100.1.3.7201",5,5)/10,-1)

PSU1_ROS (Function Code: For the probe, returns voltage, or on comms fail +24 if probe clear, 0 if probe down)
if(PSU1_Get_ROS()<0,if(string_find(device_property("ServicesDown"),"PSU1 Alarm ROS")=4294967295,24,0),PSU1_Get_ROS())

PSU_Display_ROS (Function Code: For use on the device display, displays voltage, or "----" if comms fail)
concatenate(if(PSU1_Get_ROS()=-1,"----",concatenate(PSU1_Get_ROS(),"vdc"))," / ",if(PSU2_Get_ROS()=-1,"----",concatenate(PSU2_Get_ROS(),"vdc")))

(Device appearance: Just the voltage function shown)
[PSU_Display_ROS()]

Image
Image
You do not have the required permissions to view the files attached to this post.
Top
prawira
Trainer
Trainer
Posts: 353
加入: Fri Feb 10, 2006 5:11 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Mon Jul 19, 2021 11:24 am

thank you rextended,

i follow your guidance and still got parse failed as seen on the following screen
dude status.png
do i miss something ?
You do not have the required permissions to view the files attached to this post.
Top
sid5632
Long time Member
Long time Member
Posts: 542
加入: Fri Feb 17, 2017 6:05 pm

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Mon Jul 19, 2021 11:37 am

Take the hyphen out of those names.

psu1-volt() reads as psu1 - volt()

No wonder it can't parse it. It's a bit stupid that GUI doesn't prevent stupidity like this in names, but it doesn't.
Multiplying things by 1 is also rather pointless.

And you're a trainer???
Top
prawira
Trainer
Trainer
Posts: 353
加入: Fri Feb 10, 2006 5:11 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Mon Jul 19, 2021 11:54 am

dear sid5632,

thank you for correcting my stupid mistake.

i just correct it and work as expected.

i did made psu1-volt read from oid and psu1volt read from ros command, and did not reliaze the - effect.

here is my final correction
dude power func and probe.png
cheers
You do not have the required permissions to view the files attached to this post.
Top
用户头像
rextended
Forum Guru
Forum Guru
Posts: 11581
加入: 星期二2月25, 2014 12:49 pm
Location:Italy
Contact:

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Mon Jul 19, 2021 2:52 pm

And you're a trainer???
And are you a civic and polite person?
Top
prawira
Trainer
Trainer
Posts: 353
加入: Fri Feb 10, 2006 5:11 am

Re: Can't read Voltage via SNMP on CRS112-8P-4S

Wed Jul 21, 2021 4:19 am

And you're a trainer???
yes, i am.. and still learning till now beside offer the regular training class

cheers
Top

Who is online

Users browsing this forum:Amazon [Bot],dcavni,phascogaleand 14 guests