bundles/powerdns: fix socket path for telegraf

This commit is contained in:
Franzi 2023-01-29 11:02:49 +01:00
parent ef16a2d081
commit 55bebda4d4
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -43,7 +43,11 @@ if node.has_bundle('telegraf'):
defaults['telegraf'] = {
'input_plugins': {
'builtin': {
'powerdns': [{}],
'powerdns': [{
'unix_sockets': [
'/var/run/pdns/pdns.controlsocket',
],
}],
},
},
'additional_groups': {
@ -186,16 +190,16 @@ def hosts_entries_for_all_dns_servers(metadata):
if rnode.name == node.name:
continue
ip = rnode.metadata.get('external_ipv4')
if ip:
entries[ip] = {
found_ips = repo.libs.tools.resolve_identifier(repo, rnode.name)
for ip in sorted(found_ips['ipv4']):
if not ip.is_private:
entries[str(ip)] = {
rnode.metadata.get('hostname'),
rnode.name,
}
if rnode.metadata.get('powerdns/my_hostname', None):
entries[ip].add(rnode.metadata.get('powerdns/my_hostname'))
entries[str(ip)].add(rnode.metadata.get('powerdns/my_hostname'))
return {
'hosts': {