Add script to exclude a time slot from monitoring
This commit is contained in:
parent
d9bf95e7b3
commit
44de2b84ec
14
nagios-nrpe/files/plugins/exclude-time-slot-wrapper.sh
Normal file
14
nagios-nrpe/files/plugins/exclude-time-slot-wrapper.sh
Normal file
|
@ -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
|
Loading…
Reference in a new issue