nshttpd / mikrotik-exporter

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

different features per device #119

Open joukio opened 3 years ago

joukio commented 3 years ago

hi,

I just tried to use it on my switch (CRS112-8P-4S) which doesn't have any wireless packages enabled, which failed with the below message: {"device":"switch","error":"from RouterOS device: no such command or directory (wireless)","level":"error","msg":"error fetching wireless interface names","time":"2021-07-27T13:00:22+02:00"} {"level":"error","msg":"ERROR: switch collector failed after 2.207442s: from RouterOS device: no such command or directory (wireless)","time":"2021-07-27T13:00:22+02:00"}

I know it would be possible to run an exporter for every different configuration/device, but IMHO it would be very convenient if one could enable the features per device.

regards Jouk

nshttpd commented 3 years ago

This is a good idea. I haven't pointed my collector yet at the cloud switch because I don't really have a lot of stuff plugged into it. Let me see if I can figure out a good clean way to do it without to much configuration changes for what's in the wild.

laurivosandi commented 3 years ago

I think graceful failure per feature would be okay approach for me, perhaps export metrics per device which features were unavailable on a particular target