Skip to content
View ved's full-sized avatar

Block or report ved

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ved/README.md

VM Health Check Script

Overview

This repository contains a shell script that analyzes the health of a virtual machine (VM) based on CPU, Memory, and Disk space utilization.

Files

  • vm_health_check.sh - Main health check script
  • issues.py - Python script for issue tracking analysis

VM Health Check Script

Description

The vm_health_check.sh script monitors three key metrics:

  • CPU Utilization: Percentage of CPU being used
  • Memory Utilization: Percentage of RAM being used
  • Disk Space Utilization: Percentage of root partition (/) being used

Health Status Determination

  • HEALTHY: All three metrics are less than 60% utilized
  • UNHEALTHY: Any one or more metrics are at or above 60% utilized

Usage

Basic Usage

Run the script without arguments to get a simple health status:

./vm_health_check.sh

Output:

HEALTHY

or

UNHEALTHY

Detailed Usage with Explanation

Pass the explain argument to get detailed information about each metric:

./vm_health_check.sh explain

Output example:

VM Health Status: HEALTHY

Detailed Analysis:
==================
CPU Usage: 5%
  Status: OK (below 60% threshold)

Memory Usage: 12%
  Status: OK (below 60% threshold)

Disk Usage: 37%
  Status: OK (below 60% threshold)

Overall: VM is HEALTHY because 
all metrics (CPU, Memory, Disk) are below 60% utilization.

Requirements

  • Ubuntu Linux (or compatible Linux distribution)
  • Standard Unix utilities: top, free, df, awk, sed

Permissions

Make sure the script has executable permissions:

chmod +x vm_health_check.sh

Target Platform

This script is designed for Ubuntu virtual machines but should work on most Linux distributions with standard utilities installed.

Popular repositories Loading

  1. devops-ai-playbook devops-ai-playbook Public

    Forked from vishakhasadhwani/devops-ai-playbook

    TypeScript 1

  2. LLM-Engineers-Handbook LLM-Engineers-Handbook Public

    Forked from PacktPublishing/LLM-Engineers-Handbook

    The LLM's practical guide: From the fundamentals to deploying advanced LLM and RAG apps to AWS using LLMOps best practices

    Python 1

  3. maven-project maven-project Public

    Forked from jleetutorial/maven-project

    Source code for James Lee's Jenkins course

    Java

  4. journaldev journaldev Public

    Forked from WebJournal/journaldev

    JournalDev Projects

    Java

  5. ved ved Public

    Config files for my GitHub profile.

    Python

  6. BPF-tools BPF-tools Public

    Forked from brendangregg/BPF-tools

    Performance Tools using Linux eBPF

    C