]> xn--ix-yja.es Git - alex.git/commitdiff
Fix monitoring
authoralex <alex@pdp7.net>
Thu, 2 Feb 2023 19:28:14 +0000 (20:28 +0100)
committeralex <alex@pdp7.net>
Thu, 2 Feb 2023 19:28:48 +0000 (20:28 +0100)
* Fix ping on EL/LXC
* Add check_command for hosts

personal_infra/puppet/modules/nagios/manifests/init.pp
personal_infra/puppet/site/00-common.pp

index 8a13f5352aeba40bdf6bb1a5ec183aa0f6f5a709..48aaf0a865f99997dc4d0792a2afe0619f38deb1 100644 (file)
@@ -40,11 +40,17 @@ class nagios {
     notify => Service['nagios'],
     owner => 'nagios',
   }
+
   package {'httpd':}
   ->
   service {'httpd':
     ensure => running,
     enable => true,
   }
+
+  if $facts['virtual'] == 'lxc' {
+    file {'/bin/ping':
+      mode => 'u+s',
+    }
+  }
 }
index 3fa0dc1516de1f60a02b07472c89bf49ef107afe..855d1cd19b0bca152f21d71346f2b9ad55c92c7b 100644 (file)
@@ -13,6 +13,7 @@ nagios_host {$nagios_host:
   address => $facts['networking']['fqdn'],
   max_check_attempts => 5,
   contact_groups => "admins",
+  check_command => "check-host-alive",
 }
 
 nagios_service {"${nagios_host}-ssh":