Server Monitoring Made Easy (SME)
A lightweight, easy-to-configure server monitoring tool that focuses on the metrics that matter most.
Features
- Monitor critical server metrics:
- CPU usage
- Memory consumption
- Disk space
- Network latency (ping)
- Flexible storage options:
- File-based storage with JSON
- PostgreSQL database support
- Advanced alert management:
- Customizable thresholds
- Alert count requirements before triggering
- Automatic alert resolution
- Alert history and pruning
- Comprehensive logging:
- Component-level log configuration
- Configurable log paths
- Debug logging support
- Run modes:
- Daemon mode with proper PID management
- Foreground mode for debugging
- Container support
- Easy-to-use CLI interface
- Extensible architecture for custom monitors
Installation
From source:
git clone https://github.com/timmyb824/server-monitoring-made-easy.git
cd server-monitoring-made-easy
pip install -e .
Configuration
Create a configuration file config.yaml. Here's a complete example with all available options (required options are marked with *):
# Logging Configuration
logging:
level: debug # Global log level (debug, info, warning, error)
components: # Component-specific log levels (all optional)
monitors: debug
alerts: debug
metrics: debug
daemon: debug
storage: debug
alerts: debug
# Path Configuration (all optional - defaults will be used if not specified)
paths:
# Log file path - ensure this directory exists and has proper permissions
log_file: "/path/to/log/server-monitor.log"
# PID file location
pid_file: "/path/to/pid/server-monitor.pid"
# Storage Configuration (required *)
storage: # * At least one storage type must be configured
# Storage type: 'file' or 'postgres' (required *)
type: file
# For file storage:
file_path: "/path/to/alerts.json" # * Required if type is 'file'
# For PostgreSQL storage:
# dsn: "postgresql://user:password@localhost:5432/dbname" # * Required if type is 'postgres'
# Alert pruning configuration (optional)
pruning:
enabled: true
max_age_days: 30 # Remove alerts older than this
max_alerts: 1000 # Keep only the most recent N alerts
# Monitor Configuration (required *)
monitors: # * At least one monitor must be enabled
cpu:
enabled: true # * Required for each monitor
interval: 60 # Check every 60 seconds (optional, default: 60)
threshold: 80 # Alert when CPU usage > 80% (optional, default: 80)
alert_count: 3 # Require 3 consecutive threshold violations (optional, default: 1)
memory:
enabled: true
interval: 60
threshold: 80
alert_count: 1 # Alert immediately on threshold violation
disk:
enabled: true
interval: 300 # Check every 5 minutes
threshold: 85
alert_count: 2
path: / # Monitor specific path (optional, default: /)
ping:
enabled: true
interval: 60
threshold: 200 # Alert when ping > 200ms
alert_count: 5
targets: # * Required if ping monitor is enabled
- 8.8.8.8
- 1.1.1.1
- google.com
# Alert Configuration (optional)
alerts:
# Global alert settings
default_alert_count: 1 # Default threshold violations before alerting (optional)
resolution_time: 300 # Seconds to wait before auto-resolving (optional, default: 300)
{{ ... }}
## CLI Commands
- `server-monitor start [-f/--foreground] [-c/--config PATH]`: Start monitoring
- `-f/--foreground`: Run in foreground instead of as daemon
- `-c/--config`: Specify config file path
- `server-monitor stop`: Stop the monitoring daemon
- `server-monitor status`: Show daemon status
- `server-monitor metrics`: Display current system metrics
- `server-monitor alerts`: Show current and historical alerts
- `server-monitor config show`: Display current configuration
- `server-monitor config validate`: Validate configuration file
- `server-monitor init PATH`: Create new configuration file with defaults
## Running as a Service
### Using systemd
1. Create a systemd service file at `/etc/systemd/system/server-monitor.service`:
```ini
[Unit]
Description=Server Monitoring Made Easy
After=network.target
[Service]
Type=simple
User=your_user
Environment="SME_CONFIG=/path/to/config.yaml"
ExecStart=/path/to/python/bin/server-monitor start --foreground
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
- Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable server-monitor
sudo systemctl start server-monitor
Using Docker
version: "3"
services:
monitor:
build: .
pid: "host" # Required for accurate system metrics
volumes:
- /proc:/host/proc:ro # For host metrics
- ./config.yaml:/app/config.yaml:ro
restart: unless-stopped
Development
For development and testing:
# Install development dependencies
poetry install
# Run tests
poetry run pytest tests/ -v
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
Metadata
Release files for server-monitoring-made-easy 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| server_monitoring_made_easy-0.1.3.tar.gz | 22.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| server_monitoring_made_easy-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.4 kB
Release files / server_monitoring_made_easy-0.1.3.tar.gz
| Download URL | server_monitoring_made_easy-0.1.3.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e10d8f0faaab5583e72218d6a933e32ba27327b9270750ccc6c418210cbe549
|
|
BLAKE2b-256 checksum How to use checksums |
dee7a1c6d77b197020141726b02f93b6b6845c18a5bdf17b1e4f2e80254ca1ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.
Transparency logRelease files / server_monitoring_made_easy-0.1.3-py3-none-any.whl
| Download URL | server_monitoring_made_easy-0.1.3-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f4a7f4f3062301760b108b4b3aa35cfd39063bf02a92e7aec12296b6813db43
|
|
BLAKE2b-256 checksum How to use checksums |
6a577cb28dd9d2000ca56a544425d07fd7e9f13d2fb1cb55c2ed8914fa9ae019
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.
Transparency log