prometheus-community/fortigate_exporter

DNS Latency probe: IPv6 DNS servers cause duplicate metric collision

Ouverte

#393 ouverte le 8 avr. 2026

 (3 commentaires) (0 réaction) (1 personne assignée)Go (119 forks)auto 404
fortigate-issuehelp wanted

Métriques du dépôt

Stars
 (289 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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).

Guide contributeur