bundles/powerdns: fix socket path for telegraf
This commit is contained in:
parent
ef16a2d081
commit
55bebda4d4
1 changed files with 14 additions and 10 deletions
|
@ -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')
|
||||
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 ip:
|
||||
entries[ip] = {
|
||||
rnode.metadata.get('hostname'),
|
||||
rnode.name,
|
||||
}
|
||||
|
||||
if rnode.metadata.get('powerdns/my_hostname', None):
|
||||
entries[ip].add(rnode.metadata.get('powerdns/my_hostname'))
|
||||
if rnode.metadata.get('powerdns/my_hostname', None):
|
||||
entries[str(ip)].add(rnode.metadata.get('powerdns/my_hostname'))
|
||||
|
||||
return {
|
||||
'hosts': {
|
||||
|
|
Loading…
Reference in a new issue