mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 12:21:58 +00:00
puppet: Complete several more of our nagios TODOs.
(imported from commit 239cbe1606cc077119b65b3dc18b519b09b021a4)
This commit is contained in:
@@ -20,20 +20,34 @@ class humbug::nagios {
|
|||||||
group => "root",
|
group => "root",
|
||||||
mode => 644,
|
mode => 644,
|
||||||
source => "puppet:///modules/humbug/nagios3/",
|
source => "puppet:///modules/humbug/nagios3/",
|
||||||
|
notify => Service["nagios3"],
|
||||||
|
}
|
||||||
|
|
||||||
|
service { "nagios3":
|
||||||
|
ensure => running,
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/usr/local/bin/pagerduty_nagios.pl':
|
||||||
|
ensure => file,
|
||||||
|
mode => 755,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
source => 'puppet:///modules/humbug/pagerduty_nagios.pl',
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { "fix_nagios_permissions":
|
||||||
|
command => "dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw",
|
||||||
|
unless => "bash -c 'ls -ld /var/lib/nagios3/rw | grep ^drwx--s--- -q'",
|
||||||
|
notify => Service["nagios3"],
|
||||||
|
}
|
||||||
|
exec { "fix_nagios_permissions2":
|
||||||
|
command => "dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3",
|
||||||
|
unless => "bash -c 'ls -ld /var/lib/nagios3 | grep ^drwxr-x--x -q'",
|
||||||
|
notify => Service["nagios3"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# TODO: Install our API
|
# TODO: Install our API
|
||||||
# TODO: Install the pagerduty_nagios cron job (pagerduty config is already in puppet)
|
# TODO: Install the pagerduty_nagios cron job /var/spool/cron/crontabs/nagios
|
||||||
|
|
||||||
# TODO: Add munin configuration
|
# TODO: Add munin configuration
|
||||||
# TODO: Actually restart Nagios when files change
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user