Skip to content

DNS Latency probe: IPv6 DNS servers cause duplicate metric collision #393

Description

@svengerber

Description

After upgrading from v1.24.1 to v1.25.0 (DNS Latency metric added in #334), probing fails with a duplicate metric error when the FortiGate has IPv6 DNS servers configured.

Error

An error has occurred while serving metrics:
collected metric "fortigate_network_dns_latency_seconds" { label:{name:"ip" value:"32.1.22.32"} label:{name:"service" value:"dns_server"} gauge:{value:0.01}} was collected before with the same name and label values

Root Cause

The FortiGate obtains two IPv6 DNS servers via DHCPv6:

2001:1620:2777:1::10
2001:1620:2777:2::20

The exporter appears to truncate these to IPv4, resulting in both being mapped to the same ip label value(32.1.22.32 in hex is 20:01:16:20 → which is 2001:1620). This causes a duplicate label collision.

Environment

Exporter version: v1.25.0 (worked fine on v1.24.1, which didn't have the DNS Latency probe)
FortiGate: FortiOS 7.4.11
WAN interface: DHCP + DHCPv6

Workaround

Either exclude the probe in fortigate-key.yaml:

probes:
  exclude:
    - System/DNSLatency

Or disable IPv6 DNS on the FortiGate (disable "Override internal DNS" on the WAN interface).

Metadata

Metadata

Assignees

Labels

fortigate-issueSomething that is an issue in FortiOS that we need to work aroundhelp wantedExtra attention is needed

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions