Sampler: A Visual Server Monitoring Tool for Linux
Sampler is a Linux visual monitoring tool that runs from a single binary, uses simple YAML files to define widgets such as sparklines and bar charts, and displays real‑time CPU, memory, network, Docker container statistics and other metrics, while being easily extensible to services like MySQL, MongoDB and Kafka.
Sampler is a visual monitoring tool based on shell commands, configurable via simple YAML files, allowing quick inspection of server CPU, memory, network, Docker containers, and more.
Installation (Linux)
# Download sampler package to /usr/local/bin
sudo wget https://github.com/sqshq/sampler/releases/download/v1.1.0/sampler-1.1.0-linux-amd64 -O /usr/local/bin/sampler
# Add execution permission
sudo chmod +x /usr/local/bin/samplerAfter installation, the executable is located in /usr/local/bin .
Usage
Configure monitoring scripts in a yaml file and run:
# Make config file executable
chmod +x config.yml
# Start sampler with config
sampler -c config.ymlExamples of YAML snippets for CPU, RAM, Docker stats, network activity, time, etc., are provided. Each snippet defines a widget (sparklines, barcharts, textboxes, etc.) with sampling commands such as ps -A -o %cpu | awk '{s+=$1} END {print s}' for CPU usage or docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.PIDs}}" for Docker containers.
The article also shows how to combine multiple widgets into a single dashboard, producing a visually appealing monitoring panel.
Conclusion
Sampler offers an intuitive way to monitor server status and can also be extended to monitor middleware like MySQL, MongoDB, and Kafka.
Project URL : https://github.com/sqshq/sampler
Java Tech Enthusiast
Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.