nshttpd / mikrotik-exporter

prometheus mikrotik device(s) exporter
BSD 3-Clause "New" or "Revised" License
558 stars 153 forks source link

RouterOS 7.1 and LTE interface statistics #128

Open amossam opened 2 years ago

amossam commented 2 years ago

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,
baragoon commented 2 years ago

Also temperature and voltage information are gone after upgrade to 7.1

encryptblockr commented 2 years ago

@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

elico commented 7 months ago

Anyone is working or worked on this?