Interval for updating the service list. By default, sd_dns keeps to use first service list. If you want to update the service list periodically, set interval parameter.
<match pattern>
@type forward
<service_discovery>
@type dns
interval 60s
<entry>
host host.domain
port 80
</entry>
</service_discovery>
</match>
ignore_dns_error
Type: bool
Default: false
Ignore DNS related error or not. This parameter is for multiple <entry> case. By default, sd_dns will stop the update process when raises an error in DNS resolution.
If you want to contine the update process, set ignore_dns_error true
<match pattern>
@type forward
<service_discovery>
@type dns
interval 60
ignore_dns_error true
<entry>
host host1.domain
port 24224
</entry>
<entry>
host host2.domain
port 24225
</entry>
</service_discovery>
</match>
When error happens, sd_dns generates following warning message:
DNS based service discovery plugin for Fluentd
The
dnsservice discovery plugin updates target services by DNS list.This plugin uses
Socket.getaddrinfointernally.Requirements
Installation
Use RubyGems:
Configuration
Use
@type dnsin<service_discovery>.If
host1.domainreturns 3 addresses andhost2.domainreturns 2 addresses,sd_dnsgenerates 5 address entries with given port.e.g.
host1.domainreturns1.2.3.4,1.2.3.5and1.2.3.6host2.domainreturns2.2.3.4and2.2.3.5sd_dnsgenerates1.2.3.4:24224,1.2.3.5:24224,1.2.3.6:24224,2.2.3.4:24225and2.2.3.5:24225.section
Specify host and additional information. Each entry has the following parameters:
host
Hostname for service lookup. This is required parameter
port
Port of service. This is required parameter
address_family
ipv4oripv6)Specify the desired address family. By default,
sd_dnsgets IPv4 and IPv6 addresses. If you want to get only IPv4 or IPv6, set it.shared_key
The shared_key per entry
username
The username for authentication.
password
The password for authentication
weight
The load balancing weight
shared_key,username,passwordandweightare mainly forout_forward.interval
Interval for updating the service list. By default,
sd_dnskeeps to use first service list. If you want to update the service list periodically, setintervalparameter.ignore_dns_error
Ignore DNS related error or not. This parameter is for multiple
<entry>case. By default,sd_dnswill stop the update process when raises an error in DNS resolution.If you want to contine the update process, set
ignore_dns_error trueWhen error happens,
sd_dnsgenerates following warning message:More information