junos_exporter
junos_exporter copied to clipboard
dynamic interface labels returns empty labels on all interfaces
Say I have an interface with description test [foo=bar] as expected junos_exporter will correctly map foo=bar into its own label:
# some labels omitted for readability
junos_interface_IPv6_receive_packets_total{description="test [foo=bar]",foo="bar",name="xe-0/1/3"} 1234
However a interface with no labelset in the description on the same device, i.e. LINK switch1 ae0 will have an empty foo="" label.:
junos_interface_IPv6_receive_packets_total{description="LINK switch1 ae0",foo="name="ae1"} 5678
This will be done for every label should there be multiple labels defined.
Prometheus seems to drop these "empty labels" on import, however IMO they shouldn't show up in the exporter. Is this intended behavior?
Sadly it is. Since the label count of a metric is fix (as defined in the descrption) we have to add them for interfaces not matching the label regex.