The Infrastructure Monitoring Tool is a Python-based solution for real-time system monitoring, alerting, and data visualization. It was created to streamline the process of tracking infrastructure health and responding proactively to issues.

Motivation

As a DevOps practitioner, understanding and monitoring system performance is a core part of my role. This project was an opportunity to:

  • Build a tool that simplifies metric collection and alerting.
  • Experiment with Python libraries and frameworks for system monitoring and web development.
  • Provide a lightweight, user-friendly solution for small-scale infrastructure management.

Features

  1. Metric Collection:

    • CPU Usage
    • Memory Usage
    • Disk Usage
    • Network I/O
  2. Data Storage:

    • Stores collected metrics in a local SQLite database for easy querying and analysis.
  3. Alerting:

    • Configurable thresholds for alerts.
    • Discord webhook integration to deliver instant alerts to a dedicated channel.
  4. Visualization:

    • A basic dashboard built with Flask to visualize metrics in real-time.

What I Learned

  • System Monitoring:

    • Gained experience with Python libraries like psutil for system metric collection.
    • Learned how to handle real-time data and trigger alerts based on threshold violations.
  • Web Development:

    • Built a lightweight Flask-based dashboard to visualize data in an intuitive manner.
  • Alert Integration:

    • Explored Discord webhooks for real-time notifications, making alerts more actionable.
  • Automation:

    • Configured cron jobs to automate metric collection, ensuring seamless operation over time.

Technologies Used

  • Backend: Python (requests, psutil, flask, python-dotenv)
  • Database: SQLite
  • Visualization: Flask dashboard
  • Alerting: Discord webhook integration
  • Automation: Cron jobs / Task Scheduler

Try It Yourself

Clone the repository and follow the setup instructions in the README to deploy the tool in your environment. Ensure you configure the thresholds and webhook URL as per your requirements.

View the Source Code on GitHub


This project was a fun way to explore Python libraries and frameworks for system monitoring and web development which are essential skills in DevOps. If you have any feedback or ideas for improvement, I’d love to hear them!