Have statsd listen on ipv6 by default

By default we're not listening on an ipv6 address; so any stats sent
there just go missing.  Set up by default to listen to '::' (and add
required ipv6 argument) which, thanks to dual-stack, means ipv4 & 6
packets are all accounted for.

Change-Id: I1fec03b32441a1962190f9bd8e24e8bec2318ab5
This commit is contained in:
Ian Wienand 2018-09-14 14:29:45 +10:00
parent 7ed3967361
commit fb26d09101
3 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,9 @@ class graphite(
}
],
$vhost_name = $::fqdn,
# Have statsd listen on '::' which, thanks to dual-stack,
# gets ipv4 and ipv6 connections.
$statsd_ipv6_listen = true,
) {
$packages = [ 'python-django',
'python-django-tagging',

View File

@ -80,6 +80,8 @@ describe 'puppet-graphite module', :if => ['debian', 'ubuntu'].include?(os[:fami
it { should be_owned_by 'statsd' }
it { should be_grouped_into 'statsd' }
its(:content) { should include 'graphitePort: 2003' }
its(:content) { should include "address: '::'" }
end
describe file('/etc/graphite/carbon.conf') do

View File

@ -56,4 +56,8 @@ Optional Variables:
, port: 8125
, deleteTimers: true
, deleteCounters: true
<% if @statsd_ipv6_listen %>
, address: '::',
, address_ipv6: true
<% end %>
}