nshttpd / mikrotik-exporter

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

getting "error parsing interface metric value" #19

Closed esannerud closed 5 years ago

esannerud commented 5 years ago

Hello

When I run this exporter on and Mikrotik 1100AHx4 with v6.42.7 I get: ERRO[0001] error parsing interface metric value device=svgtik error="strconv.ParseFloat: parsing \"\": invalid syntax" interface=ether11 property=tx-error value=" on each interface.

If I try the same exporter on an 1100AHx2 I get no errors.

Any suggestions?

esannerud commented 5 years ago

Just a small update, it just give me errors. The metrics still works

nshttpd commented 5 years ago

Is ether11 enabled? Could it be that it's not enabled and has no metrics? i.e. it's returning no value in the API call?

esannerud commented 5 years ago

Yes, it is enabled.

I posted only one error message. Should have told that it gives the same error messages on all active ports. Sorry about that. But it gives us metrics. So the only error is that it gives an error that is not an error ;-)

It is not a huge problem and it seems to only affect 1100ahx4 dude edition. We have tested this on a 751 and on a 1100ahx2 without problems.

To suppress the errors in the console I just started the exporter like this: ./mikrotik-exporter -config-file tiks.yml >/dev/nul 2<&1

nshttpd commented 5 years ago

@esannerud .. I believe @aeriff just fixed this issue. If you pull and build master and it does go ahead and close this. I'm going to try and get automated builds of binaries at least going here in the next couple of days or so. Working against a deadline at $BILLPAYINGJOB.

nshttpd commented 5 years ago

or, just pull from the releases now that circle-ci builds work. 1.0.0 has the fix from @aeriff in it.