diff --git a/nagios-nrpe/files/plugins/exclude-time-slot-wrapper.sh b/nagios-nrpe/files/plugins/exclude-time-slot-wrapper.sh new file mode 100644 index 00000000..59619030 --- /dev/null +++ b/nagios-nrpe/files/plugins/exclude-time-slot-wrapper.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# timestamp modulo 1 day. +time=$(($(date +"%s") %86400)) + +# pour trouver les valeurs : prendre l'heure en *UTC* +# et faire H * 3600 + M * 60 + S +if [ $time -ge 7200 ] && [ $time -lt 10800 ]; then + echo "In excluded time slot." + exit 0 +else + $@ + exit $? +fi