Initial commit

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2024-04-27 15:18:41 +02:00
parent d547c7f607
commit 096a3e0540
No known key found for this signature in database
GPG key ID: A2EB1F2CA8E3F677
69 changed files with 1650 additions and 0 deletions

15
files/nagios/check_timesyncd Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
/usr/bin/timedatectl status | grep -q "NTP service: active"
if [ $? -ne 0 ] ; then
echo "NTP service not active"
exit 1
fi
/usr/bin/timedatectl status | grep -q "System clock synchronized: yes"
if [ $? -ne 0 ] ; then
echo "System clock not synchronized"
exit 1
fi
echo "NTP is healthy"
exit 0