mikrotik-exporter icon indicating copy to clipboard operation
mikrotik-exporter copied to clipboard

RouterOS 7.1 and LTE interface statistics

Open amossam opened this issue 3 years ago • 3 comments

Hello

I have LHG LTE6 device, and I updated it today to RouterOS 7. After that, LTE statistics stopped working. Problem is that they changed some API Fix is bellow, but it needs to be updated to check for RouterOS version, but I have only one device and very little knowledge about RouterOS API...

Regards

diff --git a/collector/lte_collector.go b/collector/lte_collector.go
index 4baf6f6..95fdbcb 100644
--- a/collector/lte_collector.go
+++ b/collector/lte_collector.go
@@ -71,7 +71,7 @@ func (c *lteCollector) fetchInterfaceNames(ctx *collectorContext) ([]string, err
 }

 func (c *lteCollector) collectForInterface(iface string, ctx *collectorContext) error {
-       reply, err := ctx.client.Run("/interface/lte/info", fmt.Sprintf("=number=%s", iface), "=once=", "=.proplist="+strings.Join(c.props, ","))
+       reply, err := ctx.client.Run("/interface/lte/monitor", fmt.Sprintf("=.id=%s", iface), "=once=", "=.proplist="+strings.Join(c.props, ","))
        if err != nil {
                log.WithFields(log.Fields{
                        "interface": iface,

amossam avatar Dec 08 '21 17:12 amossam

Also temperature and voltage information are gone after upgrade to 7.1

baragoon avatar Dec 24 '21 09:12 baragoon

@amossam @baragoon

you guys mind pasting working grafana dashboard json file? looking to have historical traffic data like how much bandwidth utilized etc like the screenshot below from observium

please reply; will appreciate it thanks!

image

https://github.com/nshttpd/mikrotik-exporter/issues/140

encryptblockr avatar May 15 '22 12:05 encryptblockr

Anyone is working or worked on this?

elico avatar Apr 14 '24 22:04 elico