Initial commit
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
d547c7f607
commit
096a3e0540
69 changed files with 1650 additions and 0 deletions
15
files/nagios/check_timesyncd
Executable file
15
files/nagios/check_timesyncd
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue