From 4f769e8f4c3574ca149d49f22e948f3eb1213e02 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Thu, 7 Feb 2019 00:42:50 +0000 Subject: [PATCH] Added basic monitoring --- checks/{mem => Memory} | 0 checks/imap | 10 ++++++++++ checks/smtp | 10 ++++++++++ hosts/root@thunix.cf | 3 ++- hosts/thunix.cf | 2 ++ monurbox | 2 +- 6 files changed, 25 insertions(+), 2 deletions(-) rename checks/{mem => Memory} (100%) create mode 100755 checks/imap create mode 100755 checks/smtp diff --git a/checks/mem b/checks/Memory similarity index 100% rename from checks/mem rename to checks/Memory diff --git a/checks/imap b/checks/imap new file mode 100755 index 0000000..10823a2 --- /dev/null +++ b/checks/imap @@ -0,0 +1,10 @@ +#!/bin/bash +export SITE=$1 + +timeout 2 bash -c " /dev/null +if [ $? -ne "0" ] +then + exit 1 +else + exit 0 +fi diff --git a/checks/smtp b/checks/smtp new file mode 100755 index 0000000..73754d7 --- /dev/null +++ b/checks/smtp @@ -0,0 +1,10 @@ +#!/bin/bash +export SITE=$1 + +timeout 2 bash -c " /dev/null +if [ $? -ne "0" ] +then + exit 1 +else + exit 0 +fi diff --git a/hosts/root@thunix.cf b/hosts/root@thunix.cf index 1afa9e3..af5cc4f 100644 --- a/hosts/root@thunix.cf +++ b/hosts/root@thunix.cf @@ -1,2 +1,3 @@ sshd -BZFlag_server +BZFlag_Server +Memory diff --git a/hosts/thunix.cf b/hosts/thunix.cf index 073611f..c69fcaa 100644 --- a/hosts/thunix.cf +++ b/hosts/thunix.cf @@ -1,2 +1,4 @@ web_site web_site_https +imap +smtp diff --git a/monurbox b/monurbox index e7ccd71..5b4a892 100755 --- a/monurbox +++ b/monurbox @@ -32,4 +32,4 @@ done fi | column -t sed -i '/^\s*$/d' $FILE -sed -i '/^root//' $FILE +sed -i 's/^root@//' $FILE