Skip to main content

Service serves savvy server stats.

Project description

Service

Service serves savvy server stats.

Build Status MIT Licence

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.2.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

service_stats-1.0.2-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page