diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-26 13:16:55 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-26 13:22:56 +0200 |
commit | bf0edb7d7858df64782719f9e6bcc1ba2de57b0f (patch) | |
tree | 34427a0d9459c8f680ff2f4a66ef576d9c19d90b /modules/profile/templates | |
parent | 63102a9ba9acce5697d4a0487df038b25ad8f28d (diff) | |
download | Puppet-bf0edb7d7858df64782719f9e6bcc1ba2de57b0f.tar.gz Puppet-bf0edb7d7858df64782719f9e6bcc1ba2de57b0f.tar.zst Puppet-bf0edb7d7858df64782719f9e6bcc1ba2de57b0f.zip |
Add force check monitoring script
Diffstat (limited to 'modules/profile/templates')
-rw-r--r-- | modules/profile/templates/monitoring/force_check.sh.erb | 11 |
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 | |||
3 | date=$(date +%s) | ||
4 | host="<%= @real_hostname %>" | ||
5 | service="$2" | ||
6 | |||
7 | if [ -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 | ||
9 | else | ||
10 | printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;$host;$service;%lu\n" $date $date | sudo -u naemon tee /var/lib/naemon/naemon.cmd | ||
11 | fi | ||