Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SysSight - Linux Host Resource Manager (Mini-Observer)

This project implements a complete, full-stack solution for collecting, ingesting, storing, and visualizing real-time system metrics (CPU, Memory, Disk, Network) from remote Linux hosts. It is designed around a three-phase architecture: a lightweight Go agent, a robust Node.js ingestion server, and a dynamic React/TypeScript frontend dashboard.

Project Objectives

Phase Component Objective
Phase 1 Linux Agent (Go) Continuously collect essential host metrics (CPU, Memory, Disk, Load) and push them efficiently to the central server using minimal resources.
Phase 2 Central Server (Node.js/Express) Ingest real-time metrics, store historical data (in-memory for this prototype), and expose APIs for live and historical data retrieval.
Phase 3 Frontend Dashboard (React/TSX) Visualize metrics on a dynamic dashboard with host selection, real-time live updates, and historical graphing capabilities.

Phase 1: Linux Agent on the Host

The agent is implemented in Go for performance, minimal overhead, and easy compilation for various Linux distributions.

Feature Implementation Detail
Language/Libs Go (main.go) using gopsutil for metric collection.
Metric Collection Periodically gathers CPU utilization, Memory usage (percent), Disk usage, Network I/O, and Load Averages (1, 5, 15 min).
Push Mechanism Supports two configurable modes: HTTP POST (default) or WebSocket (for continuous streaming).
Configuration Uses a configurable config.yaml to set server_url, interval_seconds, auth_token, and host ID.
Efficiency Designed to be low-footprint, leveraging Go's concurrency model for non-blocking metric collection.

Phase 2: Central Server Setup & Metrics Storage

The server is implemented in Node.js/Express to handle metric ingestion and data serving.

Feature Implementation Detail
Platform Node.js (Express) (server.js).
Ingestion Endpoint POST /metrics: Receives JSON payload from the Go agents.
Storage Metrics are stored in a simple, capped in-memory array (metricsData) for this prototype, automatically dropping the oldest entries to prevent overflow. (Note: A production environment would use a dedicated time-series database like Prometheus, InfluxDB, or TimescaleDB).
API Endpoints GET /metrics: Returns the latest metrics for all hosts. GET /metrics/:host_id: Returns historical data for a specific host ID.
Authentication Basic placeholder; assumes a token or API key check would be implemented in a production environment middleware.

Phase 3: Frontend Dashboard & Graphs

The client-side application visualizes the collected data in an interactive dashboard.

Feature Implementation Detail
Platform/Libs React with TypeScript (App.tsx), Tailwind CSS for styling, and potentially a charting library like Recharts or Nivo.
Dashboard View Displays a list of available hosts and the latest key metrics (CPU %, Memory %, Uptime, Load).
Host Selection Dropdown for selecting an individual host to view its detailed historical graphs.
Real-Time Updates Uses useEffect with setInterval to poll the server's API (GET /metrics/:host_id) every few seconds, providing a near-live view.
Visualizations Displays time-series charts for: CPU Usage, Memory Usage, Load Average, and Disk Usage percentage.

Setup and Execution (Direct access given below)

To run the complete stack, you must start the Server, then the Agent, and finally the Frontend.

1. Start the Central Server (Phase 2)

# Assuming required dependencies (express, body-parser, cors) are installed
node server.js
# Server runs on http://localhost:8080

2. Run the Linux Agent (Phase 1)

Before running, ensure your config.yaml or environment variables point to the correct server URL (e.g., http://localhost:8080/metrics).

# Build the Go binary
go build main.go

# Run the agent (will start pushing metrics every configured interval)
./main

(OR)

#directly run agent

go run main.go

3. Launch the Frontend Dashboard (Phase 3)

# Assuming standard React/Vite/CRA setup
npm install
npm run dev
# The dashboard will open, configured to fetch data from http://localhost:8080

Output Preview

Screen.Recording.2025-10-24.at.10.28.54.PM.1.mov

Direct Access

Frontend deployed on Vercel and backend (central) server deployed on render

Access application here: https://sys-dashboard-1.vercel.app/

Note: You have to run the linux agent in your system for the server to fetch metrics

Key Takeaways and Conclusion

This project successfully demonstrates the implementation of a full-stack, distributed monitoring pipeline. Key achievements include:

  • Efficient Data Collection: Using a lightweight Go agent to reliably collect and transmit host-level data with minimal performance impact on the monitored hosts.

  • Centralized Ingestion: Establishing a robust Node.js server that efficiently handles concurrent metric ingestion from multiple remote agents.

  • Real-Time Visualization: Building a responsive React dashboard capable of consuming both real-time data streams and historical archives to provide actionable insights into system health.

This three-tiered architecture (Agent -> Server -> Frontend) is the standard model for scalable observability systems, proving a solid foundation for future enhancements like persistent database integration (e.g., PostgreSQL or InfluxDB) and advanced alerting features.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages