Initial clone

This commit is contained in:
Ubergeek
2019-01-31 01:18:23 +00:00
commit 7855af95cc
15 changed files with 894 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/bash
export proc=$1
pgrep $proc > /dev/null
if [ $? -ne "0" ]
then
exit 1
else
exit 0
fi

17
monurbox-master/plugins/disk Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
export SITE=$1
ALERT=90
df -H | grep -vE 'abc:/xyz/pqr | tmpfs |cdrom|Used' | awk '{ print $5 " " $1 }' | while read output; do
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
partition=$(echo $output | awk '{ print $2 }' )
if [ $usep -ge $ALERT ]
then
echo -e $SITE"\t${partition}>${ALERT}%"
exit 1
else
echo -e $SITE"\tGOOD"
exit 0
fi
done

12
monurbox-master/plugins/mem Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
export SITE=$1
ALERT=70
awk '/MemFree/{free=$2} /MemTotal/{total=$2} END{print (free*100)/total}' /proc/meminfo | awk '{printf("%d\n",$1 + 0.5)}' | while read freemem; do
if [ "$freemem" -lt "$ALERT" ]
then
exit 1
fi
done