nlamirault / pihole_exporter

Prometheus exporter for PiHole metrics
Apache License 2.0
76 stars 20 forks source link

Can't store metric into ... #9

Open mikegleasonjr opened 6 years ago

mikegleasonjr commented 6 years ago

Using b3vis/pihole_exporter and pihole/pihole:latest.

pihole-exporter_1    | time="2018-08-10T22:43:36Z" level=error msg="Can't store metric  into Desc{fqName: \"pihole_query_types\", help: \"DNS Query types.\", constLabels: {}, variableLabels: [type]}: strconv.ParseFloat: parsing \"\": invalid syntax" source="pihole_exporter.go:229"
nlamirault commented 6 years ago

Could you try with the develop branch ? I've got no error on my pihole (v3.x) :

$ ./pihole_exporter -log.level debug -pihole http://192.168.1.227                                                                            
INFO[0000] Setup Pihole exporter using URL: %s http://192.168.1.227  source="exporter.go:94"
DEBU[0000] PiHole client creation                        source="client.go:49"
INFO[0000] Register exporter                             source="pihole_exporter.go:73"
INFO[0000] Listening on :9311                            source="pihole_exporter.go:87"
INFO[0011] Pihole exporter starting                      source="exporter.go:122"
INFO[0011] Get metrics                                   source="client.go:65"
DEBU[0011] Metrics response: {"domains_being_blocked":133209,"dns_queries_today":2954,"ads_blocked_today":407,"ads_percentage_today":13.777928,"unique_domains":619,"queries_forwarded":2150,"queries_cached":397,"clients_ever_seen":1,"unique_clients":1,"status":"enabled"}  source="client.go:72"
INFO[0011] PiHole metrics: &pihole.Metrics{DomainsBeingBlocked:133209, DNSQueriesToday:2954, AdsBlockedToday:407, AdsPercentageToday:13.777928, DomainsOverTime:pihole.DomainsOverTime{Stats:map[string]float64(nil)}, AdsOverTime:pihole.AdsOverTime{Stats:map[string]float64(nil)}, TopQueries:map[string]float64(nil), TopAds:map[string]float64(nil), TopSources:map[string]float64(nil), QueryA:0, QueryAAAA:0, QueryPTR:0, QuerySOA:0, Eight844:0, Eight888:0}  source="exporter.go:128"