diff options
author | Micah Anderson <micah@riseup.net> | 2015-01-05 15:37:19 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2015-01-05 15:42:11 -0500 |
commit | 9792e035af468e33ec4dd85be3d68f408a41b768 (patch) | |
tree | 8c26a3b03177444083ab8bf92a681b478c1e23f3 /files/puppet/modules/custom_munin_node/manifests | |
parent | 85df3da500357bd95972654b7b92b3fb4b0811ea (diff) |
add custom puppet manifests to add munin to the openvpn nodes so we can
get data on traffic/vpn usage for reporting purposes
Diffstat (limited to 'files/puppet/modules/custom_munin_node/manifests')
-rw-r--r-- | files/puppet/modules/custom_munin_node/manifests/init.pp | 30 | ||||
-rw-r--r-- | files/puppet/modules/custom_munin_node/manifests/openvpn.pp | 35 |
2 files changed, 65 insertions, 0 deletions
diff --git a/files/puppet/modules/custom_munin_node/manifests/init.pp b/files/puppet/modules/custom_munin_node/manifests/init.pp new file mode 100644 index 0000000..449b499 --- /dev/null +++ b/files/puppet/modules/custom_munin_node/manifests/init.pp @@ -0,0 +1,30 @@ +# Munin configuration for all nodes +class custom_munin_node { + package { 'munin-node': + ensure => installed + } + + service { 'munin-node': + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, + require => Package[munin-node]; + } + + file {'/etc/munin': + ensure => directory, + mode => '0755', + owner => root, + group => 0; + } + + file {'/etc/munin/munin-node.conf': + source => 'puppet:///modules/custom_munin_node/munin-node.conf', + before => Package['munin-node'], + notify => Service['munin-node'], + mode => '0644', + owner => root, + group => 0; + } +}
\ No newline at end of file diff --git a/files/puppet/modules/custom_munin_node/manifests/openvpn.pp b/files/puppet/modules/custom_munin_node/manifests/openvpn.pp new file mode 100644 index 0000000..84ce219 --- /dev/null +++ b/files/puppet/modules/custom_munin_node/manifests/openvpn.pp @@ -0,0 +1,35 @@ +# OpenVPN specific stuff +class custom_munin_node::openvpn { + + package { 'munin-plugins-core': + ensure => installed + } + + file {'/etc/munin/plugins': + ensure => directory, + mode => '0755', + owner => root, + group => 0; + } + + file {'/etc/munin/plugins/openvpn': + ensure => 'link', + target => '/usr/share/munin/plugins/openvpn', + before => Package['munin-plugins-core'], + owner => root, + group => 0; + } + + concat{ '/etc/munin/plugin-conf.d/munin-openvpn': + owner => root, + group => root, + mode => '0644'; + } + + concat::fragment{ 'openvpn_udp': + target => '/etc/munin/plugin-conf.d/munin-openvpn', + content => "[openvpn] +user root +env.statusfile /var/run/openvpn-status-udp"; + } +}
\ No newline at end of file |