Simple and effective server monitoring with easy configuration and multiple notification options
Project description
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)
- Server uptime
- Simple YAML configuration
- Flexible alerting with customizable thresholds
- Multi-channel notifications via Apprise
- Run as a daemon or in the background
- Easy-to-use CLI interface
- Extensible architecture for custom monitors
Installation
pip install server-monitoring-made-easy
Or from source:
git clone https://github.com/yourusername/server-monitoring-made-easy.git
cd server-monitoring-made-easy
poetry install
Quick Start
- Create a configuration file
config.yaml:
monitors:
cpu:
enabled: true
threshold: 80 # Alert when CPU usage > 80%
interval: 60 # Check every 60 seconds
memory:
enabled: true
threshold: 90 # Alert when memory usage > 90%
interval: 60
disk:
enabled: true
threshold: 85 # Alert when any disk is > 85% full
interval: 300 # Check every 5 minutes
ping:
enabled: true
targets:
- google.com
- cloudflare.com
threshold: 200 # Alert when ping > 200ms
interval: 60
notifications:
- type: telegram
token: "your-bot-token"
chat_id: "your-chat-id"
- type: discord
webhook: "your-webhook-url"
logging:
level: INFO
file: /var/log/sme/server-monitor.log
- Start the monitor:
sme start --config config.yaml
- Check status:
sme status
Monitoring using systemd
# Create system user
sudo useradd -r -s /bin/false sme
# Create necessary directories
sudo mkdir -p /etc/sme /var/log/sme /var/run/sme
sudo chown -R sme:sme /etc/sme /var/log/sme /var/run/sme
# Install the package
pip install server-monitoring-made-easy
# Copy config file
sudo cp config.yaml /etc/sme/
# Copy and enable systemd service
sudo cp packaging/systemd/sme.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable sme
sudo systemctl start sme
CLI Usage
sme start: Start the monitoring daemonsme stop: Stop the monitoring daemonsme status: Show current monitoring statussme alerts: List all alerts and their statessme config show: Show current configurationsme config validate: Validate configuration file
Project Structure
app/
├── __init__.py
├── cli.py # CLI implementation
├── config.py # Configuration management
├── core/
│ ├── __init__.py
│ ├── monitor.py # Base monitoring functionality
│ ├── metrics.py # Metric collection
│ └── alerts.py # Alert management
├── monitors/
│ ├── __init__.py
│ ├── cpu.py
│ ├── memory.py
│ ├── disk.py
│ └── ping.py
├── notifiers/
│ ├── __init__.py
│ └── apprise_notify.py
└── utils/
├── __init__.py
└── logging.py
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Container Support
When running in a container:
- Full host metrics support is only available on Linux hosts
- On non-Linux hosts (like macOS), container memory metrics will reflect the VM's memory usage, not the host system
- The container must be run with the following settings:
pid: "host"for accurate system metrics/proc:/host/proc:rovolume mount for host memory metrics- Appropriate capabilities for network monitoring
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file server_monitoring_made_easy-0.1.0.tar.gz.
File metadata
- Download URL: server_monitoring_made_easy-0.1.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa82f07a2e20a60850a2f2dad7e2bc99bd9c7ee7da43699d77aa76cf5d7b07bc
|
|
| MD5 |
ac1ddfc2206bfb25bd1621ca341b02c0
|
|
| BLAKE2b-256 |
304076f7c087331bb417ed37553f627efc699f2dfbb6403c038e3186a704ab7c
|
Provenance
The following attestation bundles were made for server_monitoring_made_easy-0.1.0.tar.gz:
Publisher:
ci.yaml on timmyb824/server-monitoring-made-easy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
server_monitoring_made_easy-0.1.0.tar.gz -
Subject digest:
fa82f07a2e20a60850a2f2dad7e2bc99bd9c7ee7da43699d77aa76cf5d7b07bc - Sigstore transparency entry: 156724203
- Sigstore integration time:
-
Permalink:
timmyb824/server-monitoring-made-easy@d5b4900f0e85a1fb081d1613ceb686e760c76228 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/timmyb824
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@d5b4900f0e85a1fb081d1613ceb686e760c76228 -
Trigger Event:
push
-
Statement type:
File details
Details for the file server_monitoring_made_easy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: server_monitoring_made_easy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b91f74ffe672ccc9f780d9c929a529801ea65d4cdd9522785a187207ea35e63b
|
|
| MD5 |
b59f561108c69405f3990aa132caa83f
|
|
| BLAKE2b-256 |
2fe70b2ed7e8889a360e4d6075c785629fa75e5592c1038dbccc3fd982fb47cb
|
Provenance
The following attestation bundles were made for server_monitoring_made_easy-0.1.0-py3-none-any.whl:
Publisher:
ci.yaml on timmyb824/server-monitoring-made-easy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
server_monitoring_made_easy-0.1.0-py3-none-any.whl -
Subject digest:
b91f74ffe672ccc9f780d9c929a529801ea65d4cdd9522785a187207ea35e63b - Sigstore transparency entry: 156724205
- Sigstore integration time:
-
Permalink:
timmyb824/server-monitoring-made-easy@d5b4900f0e85a1fb081d1613ceb686e760c76228 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/timmyb824
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@d5b4900f0e85a1fb081d1613ceb686e760c76228 -
Trigger Event:
push
-
Statement type: