czerwonk / junos_exporter

Exporter for devices running JunOS to use with https://prometheus.io/
MIT License
198 stars 81 forks source link

Wrong DOM values for xe-* interfaces #178 #180

Closed Gaste8 closed 2 years ago

Gaste8 commented 2 years ago

Fixes #178.

For interfaces with zero lanes there is the tag "rx-signal-avg-optical-power" instead of
"laser-rx-optical-power" in the xml/json response and vice-versa.

Added clause to fix this. -- If no value is available then try the other one.

Additional Question: some devices use [0.0000 mW / - Inf dBm] and others use [0.0001 mW / -40.00 dBm] as a lower bound for diagnostics values. Should we set a standard and change one of these?

fstolba commented 2 years ago

FWIW we have this patch running on our production cluster for 2+ weeks without any problems 👍 .

It will certainly make sense to standardize on a single value to signify No signal. As far as I can tell, the value that will be reported is dependent on the transceiver model in use (probably transceiver vendor too) and JunOS version. For example 10G-LR shows -40 while 10G-SR shows -Inf in the same box.