miliceo.blogg.se

Monit alert script
Monit alert script





monit alert script monit alert script

# will be sent if free space is less than 10%. # if free space is less than 20% of available space and a Critical alert # The above script will check free space on /dev/sda1 and disk # Warning and critical thresholds can be passed as command-line parameters # email alert based on threshold defined for warning and critical emails

#Monit alert script for free

# This shell script checks for free disk space for defined disks and send Otherwise copy the below shell script and paste it to a file on your server. In the next steps, I will provide instructions on how to execute it. First copy the shell script on your Linux system. This script required a Bash shell to run. I have written this shell script that is capable of checking for the available free space on given disks and notifying the admin if the disk space is low. Accept inputs as command line parameters.You can set the threshold values for Warning and Critical conditions.You can enable to send an email notification.This script can check available free space for multiple disks.We will use the df command to check the available disk space and the mail command to send the alert. In this article, we will walk through the process of creating a shell script that monitors the disk space and sends an alert when the available space falls below a certain threshold.







Monit alert script