aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/monitor
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-02-08 03:36:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-02-08 03:36:43 -0200
commita9c544369f3999b868cfc1eb0dcb10e050defcc1 (patch)
tree2f06ad6d179f2677368b2ec7d0932d5aaa0ad2ea /manifests/subsystem/monitor
parent6097bca6f5302765007f65a52f87999dbaefcff9 (diff)
downloadpuppet-nodo-a9c544369f3999b868cfc1eb0dcb10e050defcc1.tar.gz
puppet-nodo-a9c544369f3999b868cfc1eb0dcb10e050defcc1.tar.bz2
Initial cleanup
Remove munin, fstab, crypttab, gdm and old subsystems. This major change is motivated by the fact that the configuration has grown too much along the years and is difficult to maintain. Simplification is then necessary to keep going.
Diffstat (limited to 'manifests/subsystem/monitor')
-rw-r--r--manifests/subsystem/monitor/interface.pp14
-rw-r--r--manifests/subsystem/monitor/mail.pp6
-rw-r--r--manifests/subsystem/monitor/master.pp118
-rw-r--r--manifests/subsystem/monitor/munin.pp30
4 files changed, 0 insertions, 168 deletions
diff --git a/manifests/subsystem/monitor/interface.pp b/manifests/subsystem/monitor/interface.pp
deleted file mode 100644
index be630aa..0000000
--- a/manifests/subsystem/monitor/interface.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-define nodo::subsystem::monitor::interface(
- $ensure = 'present',
- $hour = "*",
- $minute = "*",
-)
-{
- cron { "ifcheck-${name}":
- command => "/usr/local/sbin/ifcheck ${name} &> /dev/null",
- user => 'root',
- hour => $hour,
- minute => $minute,
- ensure => $ensure,
- }
-}
diff --git a/manifests/subsystem/monitor/mail.pp b/manifests/subsystem/monitor/mail.pp
deleted file mode 100644
index 913991b..0000000
--- a/manifests/subsystem/monitor/mail.pp
+++ /dev/null
@@ -1,6 +0,0 @@
-class nodo::subsystem::monitor::mail {
- nagios::service { "check_rbl":
- ensure => present,
- check_command => "check_rbl",
- }
-}
diff --git a/manifests/subsystem/monitor/master.pp b/manifests/subsystem/monitor/master.pp
deleted file mode 100644
index dd6defa..0000000
--- a/manifests/subsystem/monitor/master.pp
+++ /dev/null
@@ -1,118 +0,0 @@
-class nodo::subsystem::monitor::master {
- file { '/etc/nagios-plugins/check_rbl.ini':
- ensure => present,
- owner => root,
- group => root,
- source => 'puppet:///modules/nodo/etc/nagios-plugins/check_rbl.ini',
- require => Package['nagios'],
- }
-
- $main = hiera('nodo::role::master::main', false)
- $ensure = $main ? {
- true => 'present',
- default => 'absent',
- }
-
- # Legacy configuration
- file { '/etc/apache2/conf.d/munin':
- ensure => absent,
- }
-
- # Munin configuration for apache
- file { '/etc/apache2/conf.d/munin.conf':
- ensure => present,
- owner => root,
- group => root,
- mode => 0644,
- source => 'puppet:///modules/nodo/munin/apache.conf',
- require => Package["apache"],
- notify => Service["apache"],
- }
-
- # See http://www.jethrocarr.com/2012/05/26/munin-performance/
- file { "munin_graph_performance":
- ensure => $ensure,
- path => "/var/lib/puppet/modules/munin/nodes/00-performance",
- content => "max_graph_jobs 1\nmax_cgi_graph_jobs 1\n",
- require => $main ? {
- true => Concatenated_file['/etc/munin/munin.conf'],
- default => undef,
- },
- }
-
- # See https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html
- file { '/usr/local/bin/munin-graph':
- ensure => $ensure,
- owner => root,
- group => root,
- mode => 0755,
- source => 'puppet:///modules/nodo/bin/munin-graph',
- }
-
- file { '/etc/cron.d/munin-graph':
- ensure => $ensure,
- owner => root,
- group => root,
- mode => 0644,
- content => "10 * * * * munin if [ -x /usr/local/bin/munin-graph ]; then /usr/bin/ionice -c 3 /usr/bin/nice -n 19 /usr/local/bin/munin-graph; fi\n",
- require => File['/usr/local/bin/munin-graph'],
- }
-
- # We won't mess with the package, so we distribute our own munin-cron
- file { '/usr/local/bin/munin-cron':
- ensure => $ensure,
- owner => root,
- group => root,
- mode => 0755,
- source => 'puppet:///modules/nodo/bin/munin-cron',
- }
-
- file { '/etc/cron.d/munin':
- ensure => $ensure,
- owner => root,
- group => root,
- mode => 0644,
- source => 'puppet:///modules/nodo/etc/cron.d/munin',
- require => File['/usr/local/bin/munin-cron'],
- }
-
- #
- # See https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html
- # https://munin.readthedocs.org/en/latest/master/rrdcached.html
- # http://kuszelas.eu/~eyck/log/Howto/Munin.Rrdcached.html
- # http://munin-monitoring.org/wiki/rrdcached
- #
- package { 'rrdcached':
- ensure => $ensure,
- }
-
- file { '/etc/default/rrdcached':
- ensure => $ensure,
- owner => root,
- group => root,
- source => 'puppet:///modules/nodo/etc/default/rrdcached',
- require => Package['rrdcached'],
- notify => $main ? {
- true => Service['rrdcached'],
- default => undef,
- },
- }
-
- # Munin configuration for rrdcache
- file { "munin_rrdcache":
- ensure => $ensure,
- path => "/var/lib/puppet/modules/munin/nodes/00-rrdcache",
- content => "rrdcached_socket /var/run/rrdcached.sock\n",
- require => $main ? {
- true => Concatenated_file['/etc/munin/munin.conf'],
- default => undef,
- },
- }
-
- if $main == true {
- service { 'rrdcached':
- ensure => running,
- require => Package['rrdcached'],
- }
- }
-}
diff --git a/manifests/subsystem/monitor/munin.pp b/manifests/subsystem/monitor/munin.pp
deleted file mode 100644
index c2f461a..0000000
--- a/manifests/subsystem/monitor/munin.pp
+++ /dev/null
@@ -1,30 +0,0 @@
-# Define a munin node
-define nodo::subsystem::monitor::munin(
- $manage = hiera('nodo::munin_node::manage', True),
- $port = hiera('nodo::munin_node::port', '4949'),
- $allow = hiera('nodo::munin_node::allow', ''),
- $host = hiera('nodo::munin_node::host', $::fqdn),
- $listen = hiera('nodo::munin_node::listen', '*'),
- $config = hiera('nodo::munin_node::config', [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10' ])
-) {
-
- if $manage == true {
- case $allow {
- '': { fail("Please set nodo::munin_node::allow in your config") }
- }
-
- package { "munin-plugins-extra":
- ensure => "present",
- }
-
- class { 'munin::client':
- port => $port,
- allow => $allow,
- host => $host,
- listen => $listen,
- config => $config,
- }
-
- munin::plugin { apt_all: ensure => present; }
- }
-}