Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
Service Stats is completely configurable, allowing you to request data about boot time, CPU usage, disk usage, memory usage, network usage, and system information. You can send all this right to Slack. Great for a daily/weekly server snapshot of what's going on. Build custom logic to warn you about high CPU/memory usage or low available disk space.
Install
# Install Service Stats
pip3 install service-stats
# Install locally
make install
# Setup Slack ENV variables (optional)
cp .env.example .env
# Get Makefile help
make help
Usage
Grab all server data and send it to Slack.
Usage:
service-stats --boot --cpu --disk --memory --network --system --slack
Options:
-h, --help show this help message and exit
-b, --boot Show boot time stats.
-c, --cpu Show CPU stats.
-d, --disk Show disk stats.
-m, --memory Show memory stats.
-n, --network Show network stats.
-s, --system Show system stats.
-sl, --slack Send Service report to Slack.
Environment Variables (optional):
SLACK_BOT_TOKEN The Slackbot token to use for authentication
SLACK_CHANNEL The channel to post a message to
Development
# Lint the project
make lint
# Run tests
make test
# Run test coverage
make coverage
# Run the scripts locally
venv/bin/python service_stats/app.py --help
Attribution
Based on this article.
Metadata
Release files for service-stats 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| service-stats-2.1.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| service_stats-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / service-stats-2.1.0.tar.gz
| Download URL | service-stats-2.1.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e775589fa9fa0b75edb511cc92921a62bdb4685e39bdab5421d214198a3b661
|
|
BLAKE2b-256 checksum How to use checksums |
184e1f7b7f4c65e71134f591ff462c09e2bb5ecfd31d09e239681ebb590b8d59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / service_stats-2.1.0-py3-none-any.whl
| Download URL | service_stats-2.1.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4aa106084d902df53ffa7be0a37b9cf9526f71d502e1687ea3c059ae36c9773
|
|
BLAKE2b-256 checksum How to use checksums |
3a48f7a91791c244ad1e944dd8c9b48ef4f3cce878b47ae2341bf98ed6c3ff51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|