Not possible to run DHCPv6 only and collect stats with Prometheus
- Kea version: 2.4.1
- Stork: which version? 1.15.0
- OS: Debian 11
I have an issue with the prometheus exporter. I had enabled DHCPv4/DHCPv6/D2 in my kea-ctrl-agent as well as installed the KEA DHCPv4 server. However this server only serves DHCPv6 request. If I remove the DHCPv6/D2 entries in the Kea-ctrl-agent.conf and deinstall KEA DHCPv4 server, I am not able to see my DHCPv6 PD stats (kea_dhcp6_pd_assigned_total) anymore.
I get this error message in the log on the server
stork-agent[929757]: time="2024-03-19 11:54:23" level="error" msg="Problem parsing DHCPv4 labels from Kea: problem with content of DHCP labels response from Kea: forwarding socket is not configured for the server type dhcp4
isc.org/stork/agent.(*SubnetList).UnmarshalJSON
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:82
encoding/json.(*decodeState).array
/builds/isc-projects/stork/tools/golang/go/src/encoding/json/decode.go:507
encoding/json.(*decodeState).value
/builds/isc-projects/stork/tools/golang/go/src/encoding/json/decode.go:364
encoding/json.(*decodeState).unmarshal
/builds/isc-projects/stork/tools/golang/go/src/encoding/json/decode.go:181
encoding/json.Unmarshal
/builds/isc-projects/stork/tools/golang/go/src/encoding/json/decode.go:108
isc.org/stork/agent.(*lazySubnetNameLookup).fetchAndCacheNames
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:274
isc.org/stork/agent.(*lazySubnetNameLookup).getName
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:291
isc.org/stork/agent.(*lazySubnetNameLookup).getNameOrDefault
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:303
isc.org/stork/agent.(*PromKeaExporter).setDaemonStats
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:772
isc.org/stork/agent.(*PromKeaExporter).collectStats
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:877
isc.org/stork/agent.(*PromKeaExporter).statsCollectorLoop
/builds/isc-projects/stork/backend/agent/promkeaexporter.go:724
runtime.goexit
/builds/isc-projects/stork/tools/golang/go/src/runtime/asm_amd64.s:1650" file=" promkeaexporter.go:276 "
After installing the KEA DHCPv4 server again and reeneabling the KEA DHCPv4 server in kea-ctrl-agent these log message don't appear anymore and the Prometheus stats collection works again.
Is it possible to remove the DHCPv4 server and keep the stats working for DHCPv6
regads, Rinse
Edited by Slawek Figiel