Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit 8f00d9aa authored by Benedikt Wegmann's avatar Benedikt Wegmann
Browse files

monit: template für Dateisysteme

parent e5c32b4b
No related branches found
No related tags found
No related merge requests found
check system $HOST
# if loadavg (5min) > 8 for 4 cycles then alert
# if memory usage > 80% for 4 cycles then alert
# if cpu usage (user) > 80% for 4 cycles then alert
# if cpu usage (system) > 50% for 4 cycles then alert
# if cpu usage (wait) > 50% for 4 cycles then alert
check filesystem root with path /
if space usage > 80% for 5 times within 15 cycles then alert
if inode usage > 80% for 5 times within 15 cycles then alert
if memory usage > 90% for 4 cycles then alert
if cpu usage (wait) > 50% for 4 cycles then alert
class ubuntu_server::monit($admin_user = "madmin", $admin_passwd = "gEt0ffMyL4wn", $admin_emails, $mailserver = "mailer.gwdg.de", $monit_basis_config_template = "ubuntu_server/etc/monit/conf.d/config.erb", $monit_config_dir = "puppet:///modules/ubuntu_server/etc/monit/conf.d") {
class ubuntu_server::monit($admin_user = "madmin", $admin_passwd = "gEt0ffMyL4wn", $admin_emails, $mailserver = "mailer.gwdg.de", $monit_basis_config_template = "ubuntu_server/etc/monit/conf.d/config.erb", $monit_filesystems_config_template = "ubuntu_server/etc/monit/conf.d/filesystems.erb", $monit_config_dir = "puppet:///modules/ubuntu_server/etc/monit/conf.d") {
File{
owner => root,
......@@ -16,6 +16,12 @@ class ubuntu_server::monit($admin_user = "madmin", $admin_passwd = "gEt0ffMyL4wn
require => Package['monit'],
} ~> Service['monit']
file{'/etc/monit/conf.d/filesystems':
ensure => present,
content => template($monit_filesystems_config_template),
require => Package['monit'],
} ~> Service['monit']
service{'monit':
ensure => running,
require => Package['monit'],
......
<% @local_volumes.each do |volume| -%>
check filesystem fs_<%= volume %> with path <%= volume %>
if space usage > 80% for 5 times within 15 cycles then alert
if inode usage > 80% for 5 times within 15 cycles then alert
<% end -%>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment