Skip to main content

Watchdog Host is a tool for automatically managing hosts.

Project description

Watchdog-Host

Watchdog-Host is a daemon designed to monitor bandwidth usage on cloud hosts, helping prevent unexpected charges caused by exceeding monthly traffic quotas.

Features

  • Monthly network traffic accounting for cloud instances
  • Configurable via config.yaml, including:
    • Bandwidth quota limits
    • Usage percentage alert thresholds
  • Multiple notification channels:
    • Email
    • WeCom (WeChat Work)
    • DingTalk
  • Optional automatic shutdown when traffic usage exceeds the configured quota
  • Runs as a systemd service, suitable for long-term unattended operation

Usage Notes

  • Historical network usage prior to the first run cannot be determined:
    • Traffic statistics for the current month will be inaccurate on the first run
    • Accurate statistics will be available starting from the next execution cycle
  • Additional watchdog capabilities may be added in the future

Requirements

  • Must be executed as the root user
  • Running via sudo is not supported
    • This is required due to systemd management and low-level network statistics access

Installation

pip install watchdog-host
watchdog-host init
vim /etc/watchdog/config.yaml
systemctl enable --now <service>.service
systemctl status <service>.service

Uninstallation

systemctl disable --now <service>.service
watchdog-host clean
pip uninstall -y watchdog-host

# Optional
rm -f /etc/watchdog/config.yaml
rm -f /etc/watchdog/*.json

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

watchdog_host-1.0.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watchdog_host-1.0.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file watchdog_host-1.0.0.tar.gz.

File metadata

  • Download URL: watchdog_host-1.0.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for watchdog_host-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8be31e80ce792565c46313f7418bddb6c7c97e965832c1b37c62de454ec63b66
MD5 87bd72cb515aa4661421cd3cc7c097d6
BLAKE2b-256 fbaa01d08876b6a0c2bbbc3a857a4a74bf3fa19c7cb454b556e2c0364e2713a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for watchdog_host-1.0.0.tar.gz:

Publisher: release.yml on znhocn/watchdog-host

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file watchdog_host-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: watchdog_host-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for watchdog_host-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26393fb2c087d3c875e17c45679421ccbd9b6f9af2014ebb92862a888d0cd84f
MD5 ea94c50567a4431b2459a86f0dd95ddd
BLAKE2b-256 27142f3f38ea77dd22bebfa980f701d07c81363a031cab47e42d94fe14a1b735

See more details on using hashes here.

Provenance

The following attestation bundles were made for watchdog_host-1.0.0-py3-none-any.whl:

Publisher: release.yml on znhocn/watchdog-host

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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