mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Add ressources monitoring and fix backup status check
This commit is contained in:
parent
76cb401c53
commit
27c912a613
2 changed files with 8 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ ONGOING_FILE="/backups/backup-ongoing"
|
|||
|
||||
if [ -f "$ONGOING_FILE" ]
|
||||
then
|
||||
if test `find "$ONGOING_FILE" -mmin +1`
|
||||
if test `find "$ONGOING_FILE" -mmin +180`
|
||||
then
|
||||
LAST_MODIFICATION_HOURS=`expr "$(($(date +%s) - $(date +%s -r $ONGOING_FILE)))" / 3600`
|
||||
echo "Backup not finished after more than $LAST_MODIFICATION_HOURS hours"
|
||||
|
|
|
|||
|
|
@ -256,6 +256,10 @@ check system $HOST
|
|||
# if write rate > 500 operations/s for 5 cycles then alert
|
||||
# if service time > 10 milliseconds for 3 times within 5 cycles then alert
|
||||
# group server
|
||||
|
||||
check filesystem root with path /
|
||||
if SPACE usage > 90% then alert
|
||||
|
||||
#
|
||||
#
|
||||
## Check a file's timestamp. In this example, we test if a file is older
|
||||
|
|
@ -295,8 +299,8 @@ check system $HOST
|
|||
## Check a network link status (up/down), link capacity changes, saturation
|
||||
## and bandwidth usage.
|
||||
#
|
||||
# check network public with interface eth0
|
||||
# if failed link then alert
|
||||
check network public with interface eno1
|
||||
if failed link then alert
|
||||
# if changed link then alert
|
||||
# if saturation > 90% then alert
|
||||
# if download > 10 MB/s then alert
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue