# 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)
Raw data
{
"_id": null,
"home_page": "https://github.com/cumulus13/diskspacemon",
"name": "diskspacemon",
"maintainer": "cumulus13 Team",
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": "cumulus13@gmail.com",
"keywords": "disk space monitor growl syslog",
"author": "Hadi Cahyadi LD",
"author_email": "cumulus13@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/51/50/9159d75da132e63d2b5e1f1af9c39012ed890c0fd43bdf08afd04f5e8c5c/diskspacemon-0.19.tar.gz",
"platform": null,
"description": "# DiskSpaceMon\r\nMonitoring space of directory/path/drive then send notification to growl and syslog/remote syslog with multiple host and port\r\n\r\n## Installing\r\n\r\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\r\n\r\n```bash\r\n$ pip install diskspacemon\r\n```\r\n\r\n## Example\r\n\r\n```python\r\n>>> from diskspacemon import DiskSpaceMon\r\n>>> m = DiskSpaceMon()\r\n>>> m.GROWL_HOST = ['127.0.0.1', '192.168.100.2']\r\n>>> m.SYSLOG_HOST = ['127.0.0.1', '192.168.100.2']\r\n>>> m.monitor_directory(\"/\", 60, 100, True) # parameter: path, interval time sleep, size threshold, verbose\r\n```\r\n\r\nrun on terminal/cmd\r\n\r\n```bash\r\n$ 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]\r\n PATHS\r\n\r\npositional arguments:\r\n PATHS Directory to watching\r\n\r\noptions:\r\n -h, --help show this help message and exit\r\n -t SIZE_THRESHOLD, --size-threshold SIZE_THRESHOLD\r\n Size threshold default = 100 MB\r\n -i INTERVAL, --interval INTERVAL\r\n Interval time\r\n --syslog-host SYSLOG_HOST\r\n Syslog host name/ip, default: 127.0.0.1\r\n --syslog-port SYSLOG_PORT\r\n Syslog port, default: 514\r\n --growl-host [GROWL_HOST ...]\r\n Growl host name/ip, default: 127.0.0.1\r\n --growl-port [GROWL_PORT ...]\r\n Growl port, default: 23053\r\n -v, --verbose Show detail process\r\n```\r\n\r\n## Support\r\n\r\n- Python 3.x\r\n\r\n## Author\r\n[Hadi Cahyadi](mailto:cumulus13@gmail.com)\r\n\r\n[](https://www.buymeacoffee.com/cumulus13)\r\n\r\n[](https://ko-fi.com/cumulus13)\r\n\r\n[Support me on Patreon](https://www.patreon.com/cumulus13)\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Monitoring space of directory/path/drive then send notification to growl and syslog/remote syslog with multiple host and port",
"version": "0.19",
"project_urls": {
"Code": "https://github.com/cumulus13/diskspacemon",
"Documentation": "https://github.com/cumulus13/diskspacemon",
"Download": "https://github.com/cumulus13/diskspacemon/tarball/master",
"Homepage": "https://github.com/cumulus13/diskspacemon"
},
"split_keywords": [
"disk",
"space",
"monitor",
"growl",
"syslog"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0817b52a82796e0a1a0b95e7ef6e1e46f835bb451e8a502156c1d1917b4a9aa9",
"md5": "64a8b8b82db7da9754015f52e8cefcd8",
"sha256": "7587bf5a65ef5c16f98f3f561fc468775fd7a0981fdd83009401fe8e01faf1b1"
},
"downloads": -1,
"filename": "diskspacemon-0.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "64a8b8b82db7da9754015f52e8cefcd8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.0",
"size": 7539,
"upload_time": "2025-02-03T03:32:29",
"upload_time_iso_8601": "2025-02-03T03:32:29.548103Z",
"url": "https://files.pythonhosted.org/packages/08/17/b52a82796e0a1a0b95e7ef6e1e46f835bb451e8a502156c1d1917b4a9aa9/diskspacemon-0.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "51509159d75da132e63d2b5e1f1af9c39012ed890c0fd43bdf08afd04f5e8c5c",
"md5": "43c38fa399979c8dec5fab1c95c5f129",
"sha256": "226f763aeb412daff1b54da1237567fb8557c336504e2c2241d79a914c1fd968"
},
"downloads": -1,
"filename": "diskspacemon-0.19.tar.gz",
"has_sig": false,
"md5_digest": "43c38fa399979c8dec5fab1c95c5f129",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 10693,
"upload_time": "2025-02-03T03:32:31",
"upload_time_iso_8601": "2025-02-03T03:32:31.747968Z",
"url": "https://files.pythonhosted.org/packages/51/50/9159d75da132e63d2b5e1f1af9c39012ed890c0fd43bdf08afd04f5e8c5c/diskspacemon-0.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-03 03:32:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cumulus13",
"github_project": "diskspacemon",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "diskspacemon"
}