From bf0edb7d7858df64782719f9e6bcc1ba2de57b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 26 Jul 2018 13:16:55 +0200 Subject: Add force check monitoring script --- modules/profile/templates/monitoring/force_check.sh.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 modules/profile/templates/monitoring/force_check.sh.erb (limited to 'modules/profile/templates') diff --git a/modules/profile/templates/monitoring/force_check.sh.erb b/modules/profile/templates/monitoring/force_check.sh.erb new file mode 100644 index 0000000..e5b2a23 --- /dev/null +++ b/modules/profile/templates/monitoring/force_check.sh.erb @@ -0,0 +1,11 @@ +#!/bin/bash + +date=$(date +%s) +host="<%= @real_hostname %>" +service="$2" + +if [ -z "$service" ]; then + printf "[%lu] SCHEDULE_FORCED_HOST_SVC_CHECKS;$host;%lu\n" $date $date | sudo -u naemon tee /var/lib/naemon/naemon.cmd +else + printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;$host;$service;%lu\n" $date $date | sudo -u naemon tee /var/lib/naemon/naemon.cmd +fi -- cgit v1.2.3