Files
monlet/deploy/showcase/checks/flap.sh

10 lines
231 B
Bash
Executable File

#!/bin/sh
# Alternates between ok and critical every ~30 seconds to demonstrate flapping.
slot=$(( $(date +%s) / 30 % 2 ))
if [ "$slot" -eq 0 ]; then
echo "critical: flap window down"
exit 2
fi
echo "ok: flap window up"
exit 0