sepiropht / alive

htop on the web with history

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alive

This script monitors the top CPU and memory-consuming processes on the host system and stores the data in an SQLite database. It can be run either directly on the host system or inside a Docker container.

Run the agent

1. Build the Docker Image

Clone this repo and build the docker image

$ cd sonde
$ docker build -t top-processes-monitor .

2. Run the Docker Container

  1. Run the Docker container:
$ docker run -d --name top-monitor -v ./database:/database -v /proc/proc top-processes-monitor

This will start the container in detached mode with the name top-monitor.

SQLite Database

The SQLite database file (top_processes.db) will be stored in the specified directory (database) and will contain two tables.

View data in web

A go app that read the sqlite database app, render a web view to show you the data

  1. Build the Docker image:
# go back to the root

 $ cd ../
$ docker build -t my-go-app .
  1. Run the go app
$ docker run -d -p 8080:8080 --name my-go-app-container -v ./database:/database my-go-app

About

htop on the web with history


Languages

Language:Shell 59.8%Language:Go 24.4%Language:Dockerfile 15.8%