system-config/modules/openstack_project/manifests/graphite.pp
Jeremy Stanley 81150c837e Allow statsd hosts to connect to graphite via IPv6
* modules/openstack_project/manifests/graphite.pp: New zuul wants to
connect to graphite's statsd service using IPv6, so let it.

Change-Id: I80ea47e5bee754edbc79bdd4b04a5bae58decf09
2014-01-08 16:14:02 +00:00

28 lines
920 B
Puppet

# Class to configure graphite on a node.
# Takes a list of sysadmin email addresses as a parameter. Exim will be
# configured to email cron spam and other alerts to this list of admins.
class openstack_project::graphite (
$sysadmins = [],
$graphite_admin_user = '',
$graphite_admin_email = '',
$graphite_admin_password ='',
$statsd_hosts = [],
) {
# Turn a list of hostnames into a list of iptables rules
$rules = regsubst ($statsd_hosts, '^(.*)$', '-m udp -p udp -s \1 --dport 8125 -j ACCEPT')
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443],
iptables_rules6 => $rules,
iptables_rules4 => $rules,
sysadmins => $sysadmins,
}
class { '::graphite':
graphite_admin_user => $graphite_admin_user,
graphite_admin_email => $graphite_admin_email,
graphite_admin_password => $graphite_admin_password,
}
}