aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profile/templates')
-rw-r--r--modules/profile/templates/monitoring/force_check.sh.erb11
1 files changed, 11 insertions, 0 deletions
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 @@
1#!/bin/bash
2
3date=$(date +%s)
4host="<%= @real_hostname %>"
5service="$2"
6
7if [ -z "$service" ]; then
8 printf "[%lu] SCHEDULE_FORCED_HOST_SVC_CHECKS;$host;%lu\n" $date $date | sudo -u naemon tee /var/lib/naemon/naemon.cmd
9else
10 printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;$host;$service;%lu\n" $date $date | sudo -u naemon tee /var/lib/naemon/naemon.cmd
11fi