2013-02-07 22:20:10 +01:00
|
|
|
class humbug::nagios {
|
|
|
|
class { 'humbug::base': }
|
|
|
|
class { 'humbug::apache': }
|
|
|
|
|
|
|
|
$nagios_packages = [ "nagios3", "munin", "autossh" ]
|
|
|
|
package { $nagios_packages: ensure => "installed" }
|
|
|
|
|
|
|
|
apache2site { 'nagios':
|
|
|
|
require => [File['/etc/apache2/sites-available/'],
|
|
|
|
Apache2mod['headers'], Apache2mod['ssl'],
|
|
|
|
],
|
|
|
|
ensure => present,
|
|
|
|
}
|
2013-05-31 21:50:57 +02:00
|
|
|
|
|
|
|
file { "/etc/nagios3/":
|
|
|
|
recurse => true,
|
|
|
|
purge => false,
|
|
|
|
require => Package[nagios3],
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
|
|
|
source => "puppet:///modules/humbug/nagios3/",
|
|
|
|
}
|
|
|
|
|
2013-02-07 22:20:10 +01:00
|
|
|
# Also need to run this sequence to enable commands to set the
|
|
|
|
# permissions for using the Nagios commands feature
|
|
|
|
#
|
|
|
|
# /etc/init.d/nagios3 stop
|
|
|
|
# dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
|
|
|
|
# dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
|
|
|
|
# /etc/init.d/nagios3 start
|
|
|
|
#
|
|
|
|
#
|
2013-02-13 22:19:08 +01:00
|
|
|
# TODO: Install our API
|
2013-05-31 21:50:57 +02:00
|
|
|
# TODO: Install the pagerduty_nagios cron job (pagerduty config is already in puppet)
|
|
|
|
|
|
|
|
# TODO: Add munin configuration
|
|
|
|
# TODO: Actually restart Nagios when files change
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|