restart stale icinga automatically
authorPeter Palfrader <peter@palfrader.org>
Fri, 1 Jun 2018 08:51:02 +0000 (10:51 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 1 Jun 2018 08:51:02 +0000 (10:51 +0200)
modules/nagios/manifests/server.pp

index 1bbd576..a634220 100644 (file)
@@ -102,4 +102,12 @@ class nagios::server {
                source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-services.cfg',
                notify => Service['nagios3'],
        }
+
+       concat::fragment { 'dsa-puppet-stuff--nagios--restart-stale-icinga':
+               target => '/etc/cron.d/dsa-puppet-stuff',
+               order  => '010',
+               content  => @(EOF)
+                       */15 * * * * root find /var/lib/icinga/status.dat -mmin +20 | grep -q . && service icinga restart
+                       | EOF
+       }
 }