Added basic monitoring

This commit is contained in:
Ubergeek 2019-02-07 00:42:50 +00:00
parent ddbe0ba4ee
commit 4f769e8f4c
6 changed files with 25 additions and 2 deletions

10
checks/imap Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
export SITE=$1
timeout 2 bash -c "</dev/tcp/${SITE}/143" > /dev/null
if [ $? -ne "0" ]
then
exit 1
else
exit 0
fi

10
checks/smtp Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
export SITE=$1
timeout 2 bash -c "</dev/tcp/${SITE}/25" > /dev/null
if [ $? -ne "0" ]
then
exit 1
else
exit 0
fi

View File

@ -1,2 +1,3 @@
sshd
BZFlag_server
BZFlag_Server
Memory

View File

@ -1,2 +1,4 @@
web_site
web_site_https
imap
smtp

View File

@ -32,4 +32,4 @@ done
fi | column -t
sed -i '/^\s*$/d' $FILE
sed -i '/^root//' $FILE
sed -i 's/^root@//' $FILE