https://github.com/cumulus13/diskspacemon
Monitoring space of directory/path/drive then send notification to growl and syslog/remote syslog with multiple host and port
https://github.com/cumulus13/diskspacemon
disk-space disk-usage monitoring
Last synced: 5 months ago
JSON representation
Monitoring space of directory/path/drive then send notification to growl and syslog/remote syslog with multiple host and port
- Host: GitHub
- URL: https://github.com/cumulus13/diskspacemon
- Owner: cumulus13
- Created: 2025-02-03T02:36:33.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-03T03:31:59.000Z (about 1 year ago)
- Last Synced: 2025-08-23T19:16:05.414Z (6 months ago)
- Topics: disk-space, disk-usage, monitoring
- Language: Python
- Homepage: https://github.com/cumulus13/diskspacemon
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://pip.pypa.io/en/stable/quickstart/):
```bash
$ pip install diskspacemon
```
## Example
```python
>>> 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
```bash
$ 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](mailto:cumulus13@gmail.com)
[](https://www.buymeacoffee.com/cumulus13)
[](https://ko-fi.com/cumulus13)
[Support me on Patreon](https://www.patreon.com/cumulus13)