@@ -23,13 +23,13 @@ import (
2323func probeNetworkDnsLatency (c http.FortiHTTP , meta * TargetMetadata ) ([]prometheus.Metric , bool ) {
2424 var (
2525 dnsLatency = prometheus .NewDesc (
26- "fortigate_network_dns_latency " ,
26+ "fortigate_network_dns_latency_seconds " ,
2727 "Network dns latency" ,
2828 []string {"service" , "ip" }, nil ,
2929 )
3030 dnsLastUpdate = prometheus .NewDesc (
3131 "fortigate_network_dns_latest_update" ,
32- "Network dns last update" ,
32+ "Network dns last record update" ,
3333 []string {"service" , "ip" }, nil ,
3434 )
3535 )
@@ -52,7 +52,7 @@ func probeNetworkDnsLatency(c http.FortiHTTP, meta *TargetMetadata) ([]prometheu
5252 }
5353 m := []prometheus.Metric {}
5454 for _ , r := range res .Results {
55- m = append (m , prometheus .MustNewConstMetric (dnsLatency , prometheus .GaugeValue , r .Latency , r .Service , r .Ip ))
55+ m = append (m , prometheus .MustNewConstMetric (dnsLatency , prometheus .GaugeValue , r .Latency * 0.001 , r .Service , r .Ip ))
5656 m = append (m , prometheus .MustNewConstMetric (dnsLastUpdate , prometheus .GaugeValue , r .LastUpdate , r .Service , r .Ip ))
5757 }
5858
0 commit comments