This repository contains a shell script to analyze the health of an Ubuntu virtual machine based on CPU, memory, and disk space utilization.
The script checks the following parameters:
- CPU Utilization: The percentage of CPU being used.
- Memory Utilization: The percentage of memory being used.
- Disk Space Utilization: The percentage of disk space being used.
If any of these parameters are more than 60% utilized, the script declares the state as "Not healthy". Otherwise, it declares the state as "Healthy".
- Save the script to a file named
vm_health_check.sh. - Make the script executable with the command:
chmod +x vm_health_check.sh
- Run the script to check the health status:
./vm_health_check.sh
- Run the script with the
explainargument to get detailed reasons for the health status:./vm_health_check.sh explain
To check the health status of the virtual machine:
./vm_health_check.shTo check the health status with explanations:
./vm_health_check.sh explainThis repository is licensed under the MIT License.