Skip to content

Implementation of a monitoring system program to collect and log system metrics, send notifications, and provide a user interface.

License

Notifications You must be signed in to change notification settings

Astrodynamic/MonitoringSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitoring System

Implementation of a monitoring system project.

Introduction

This project is aimed at creating a simple and efficient monitoring system for tracking key indicators of a system using a kernel and dynamic agents. The system should collect metrics from agents, log them, and send notifications to users in case of critical values.

Project Structure

  • src: Contains the C++ code for the monitoring system.
  • agents: Dynamic libraries (*.so) for different agent types.
  • logs: Stores log files generated by the monitoring system.

System Architecture

The monitoring system consists of a kernel and dynamic agents. Agents are lightweight programs collecting metrics and passing them to the kernel, which logs the data. The system notifies users when critical values are reached.

Agent Implementation

Agents are implemented as dynamic libraries (*.so) and can be loaded or unloaded while the system is running. Each agent has an updateMetrics() method to provide actual metrics to the kernel.

Kernel

The kernel periodically calls agent methods, records metrics in a log file, and scans the ./agents/ folder for new agents.

Coding Standards

  • Implemented in C++17.
  • Code located in the src folder.
  • Follow Google style for code formatting.

Build System

  • Use a Makefile with standard GNU targets: all, install, uninstall, clean, dist, tests.
# Build the project
make

# Install the project
make install

# Uninstall the project
make uninstall

# Clean the project
make clean

GUI Implementation

  • Implement GUI using Qt GUI library with API for C++17.

MVC Pattern

  • Implement the system using the MVC pattern.
  • No business code in the view.
  • No interface code in the controller and the model.
  • Thin controllers.

Agents and Metrics

  • Provide at least three types of agents: CPU, Memory, Network.
  • Each agent collects specific metrics.

Agent Configuration

  • Agents are configured via a configuration file.
  • Configuration includes agent name, type, critical metrics values, and update time.

Notifications

  • Use a Telegram bot to send notifications about critical situations.
  • Include computer name, metric name, and value in the notification.
  • Enable/disable email notifications in the interface.

Additional Agent

  • Implement an agent with special metrics.

Build Instructions

# Build a specific agent
make cpu_agent
make memory_agent
make network_agent
make system_agent

# Build and run cppcheck
make cppcheck

# Run clang-format
make clang-format

# Create a distribution package
make dist

Documentation

  • Generate documentation using Pandoc.
make dvi

LICENSE

This project is licensed under the MIT License. Feel free to modify and distribute it as per the terms of the license.