Skip to main content

Monitoring space of directory/path/drive then send notification to growl and syslog/remote syslog with multiple host and port

Project description

DiskSpaceMon

Monitoring space of directory/path/drive then send notification to growl and syslog/remote syslog with multiple host and port

Installing

Install and update using pip:

$ pip install diskspacemon

Example

>>> from diskspacemon import DiskSpaceMon
>>> m = DiskSpaceMon()
>>> m.GROWL_HOST = ['127.0.0.1', '192.168.100.2']
>>> m.SYSLOG_HOST = ['127.0.0.1', '192.168.100.2']
>>> m.monitor_directory("/", 60, 100, True) # parameter: path, interval time sleep, size threshold, verbose

run on terminal/cmd

$ usage: diskspacemon [-h] [-t SIZE_THRESHOLD] [-i INTERVAL] [--syslog-host SYSLOG_HOST] [--syslog-port SYSLOG_PORT] [--growl-host [GROWL_HOST ...]] [--growl-port [GROWL_PORT ...]] [-v]
                  PATHS

positional arguments:
  PATHS                 Directory to watching

options:
  -h, --help            show this help message and exit
  -t SIZE_THRESHOLD, --size-threshold SIZE_THRESHOLD
                        Size threshold default = 100 MB
  -i INTERVAL, --interval INTERVAL
                        Interval time
  --syslog-host SYSLOG_HOST
                        Syslog host name/ip, default: 127.0.0.1
  --syslog-port SYSLOG_PORT
                        Syslog port, default: 514
  --growl-host [GROWL_HOST ...]
                        Growl host name/ip, default: 127.0.0.1
  --growl-port [GROWL_PORT ...]
                        Growl port, default: 23053
  -v, --verbose         Show detail process

Support

  • Python 3.x

Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

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

diskspacemon-0.18.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

diskspacemon-0.18-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file diskspacemon-0.18.tar.gz.

File metadata

  • Download URL: diskspacemon-0.18.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for diskspacemon-0.18.tar.gz
Algorithm Hash digest
SHA256 6f936796242f6e54d1cf1ca3e2217238b610f2da4f9c8fb0f0044feac170acf4
MD5 f6f207df4f9426aa41415d1151ad0fff
BLAKE2b-256 c36eb4b737ed86d669e090df1ad7a8c4fbf0078b525bab84ab4b1a0c67cf5796

See more details on using hashes here.

File details

Details for the file diskspacemon-0.18-py3-none-any.whl.

File metadata

  • Download URL: diskspacemon-0.18-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for diskspacemon-0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 5008b69ff520dafa783cf4a58368bc9601de0e229789719a47c648924b09f9ca
MD5 ea8ebfe1c6ccf7629c84628993141ac6
BLAKE2b-256 735da1efd61ffa85d0346c627715d49637736cefb78f561c8f74d86aa7091efe

See more details on using hashes here.

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