Service serves savvy server stats.
Project description
Service 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
pip3 install service-stats
# Setup Slack ENV variables (optional)
cp .env.example .env
Usage
Grab all server data and send it to Slack.
Usage:
service --boot --cpu --disk --memory --network --system --slack
Options:
-b, --boot Show boot 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 (must configure ENV variables)
-h, --help Show package usage help
Cron
crontab -e
0 9 * * 1 service --boot --cpu --disk --memory --network --system --slack
Development
Install project with dev depencencies:
pip3 install -e ."[dev]"
Lint the project:
pylint service/*.py
Attribution
Based on this article.
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
service-stats-1.0.1.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for service_stats-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d1288316f8cd7431b73c64ea4854781938516199f0ad69fb798c5ba790faaa7 |
|
MD5 | 39601cb945e4f7ec0c3c404054c11b5d |
|
BLAKE2b-256 | ea8eff5986c718a646b86395b2bc42154374d5281f49565711e3ab36cebffd97 |