englishhilt.blogg.se

Monit alert script
Monit alert script










monit alert script

9.8G Method-1: Shell script to monitor disk space usage in Linux

monit alert script

Test-script.sh: line 7: [: /dev/mapper/vg_2g-lv_root: integer expression expected

monit alert script

Use “df -Ph” (POSIX output format) to deal with this problem. Make a note: When using “df -h” in the shell script in some distributions, you may end up with the below error message as the output is not in the correct format. Refer to this article (embedded link), If you are looking for a bash script to monitor disk space usage on multiple remote Linux systems. These scripts will trigger an email to the corresponding email id when the system reaches a given threshold. We have included three shell scripts below and you can choose the one that suits your need. In this case, it is better to write a shell script based on what you need to monitor in your environment. However, it is suitable for small and large environments, but what is the best approach if you only have a few systems? There are various monitoring tools available that monitor everything, and trigger an email when the system reaches a given threshold. It is an important task for Linux administrators to monitor disk space usage on any system that’s used for hosting critical applications, in order to prevents the system from becoming unresponsive or get into an unknown problem.












Monit alert script