mirror of
https://github.com/ThunixdotNet/monurbox.git
synced 2026-01-24 12:00:19 +00:00
Initial clone
This commit is contained in:
10
monurbox-master/plugins/check_proc
Executable file
10
monurbox-master/plugins/check_proc
Executable 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
17
monurbox-master/plugins/disk
Executable 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
12
monurbox-master/plugins/mem
Executable 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
|
||||
Reference in New Issue
Block a user