SystemGuard Architecture#

This is the architecture of the project.

SystemGuard Architecture

SystemGuard Project Architecture#

Note

Click on the image to view it in full size.

Central Server#

  1. SystemGuard (Central):
    This is the core of the SystemGuard system that aggregates and manages monitoring data from different Server Nodes. The SystemGuard (Central) component handles communication with multiple SystemGuard (Server) components and displays the gathered data through a unified SystemGuard UI.
  2. SystemGuard UI (Central):
    This UI allows administrators to visualize metrics collected from various server nodes, providing an interface to monitor and analyze system health and performance.
  3. Prometheus (Central):
    This instance of Prometheus is configured to collect metrics from different Server Nodes. It uses the Pull method to gather data from the nodes, ensuring that the metrics are up to date.
  4. AlertManager:
    This component is responsible for managing alerts generated by the Prometheus instance. It sends notifications based on pre-defined rules, typically using communication channels like Email, Discord, or Slack. The alerts are “pushed” to the AlertManager, which can then take action based on thresholds or conditions.
  5. System Metrics Alerts:
    These alerts are generated based on the system metrics being monitored. When a metric crosses a threshold, the AlertManager triggers alerts, which can be sent through different messaging systems like Email, Discord, or Slack.
  6. Grafana UI:
    The Grafana UI connects to Prometheus (Central) and provides visualization dashboards to monitor system metrics in a user-friendly interface. This helps administrators track the health of the entire system in real-time.

Server Node#

  1. Server OS:
    The operating system running on the physical or virtual server. This OS hosts the SystemGuard (Server) and Prometheus (Server) components that are responsible for monitoring that specific node.
  2. SystemGuard (Server):
    This local instance of SystemGuard is responsible for monitoring the resources and performance of the server node it resides on. It collects data from the Server OS and integrates it with the Prometheus (Server) instance to push the metrics to the Central Server.
  3. SystemGuard UI (Server):
    A local user interface for monitoring the specific Server Node’s health. It provides a lightweight, localized dashboard that displays data directly from the server.
  4. Prometheus (Server):
    This local instance of Prometheus collects metrics from the Server OS and stores them locally in a Prometheus Database. The data is use to provide a real time visualization of the server in the SystemGuard UI (Server).
  5. SQLite Database:
    A lightweight local database used by Prometheus (Server) to store metrics. This database allows the server to maintain data even when there is no connection to the Central Server.

Communication between Central Server and Server Nodes#

  • Pull Mechanism:
    The Prometheus (Central) instance pulls metrics from the Prometheus (Server) instances on each Server Node. This ensures that the Central Server has up-to-date metrics for monitoring and alerting.
  • Push Mechanism:
    In the reverse direction, alert notifications and actions are “pushed” from the Central Server to the AlertManager, which then routes these alerts to configured receivers (such as Email, Discord, Slack).

  • Central Server collects and aggregates data from multiple Server Nodes, provides visualizations via Grafana UI or SystemGuard UI, handles alerts through the AlertManager.

  • Server Node collects and stores data locally using SystemGuard and Prometheus. The central instance periodically pulls the data for global monitoring.

  • Alerts are triggered and pushed to communication channels when certain system metrics exceed defined thresholds.

This architecture provides a robust system for distributed monitoring, visualization, and alert management across multiple server nodes.