# Sol1 Monitoring Plugins Library
Sol1 Monitoring Plugins Library are tools to assist in the creation of monitoring checks for Icinga2 and Nagios.
## MonitoringPlugin
```python
from sol1_monitoring_plugins_lib import MonitoringPlugin
```
The MonitoringPlugin class manages the state, output message and performance data of your check as well as returning this data and exiting the script.
It has been designed so you can add multiple tests and the class will intelligently manage the state and output for you.
__Documentation__
You can find documentation in the [`docs`](./docs/monitoring_plugins.md) folder.
Code usage examples can be found in the [`examples`](./examples/check_day_of_the_week.py) folder.
__Maturity__: Stable.
## Logging
```python
from sol1_monitoring_plugins_lib import initLogging, initLoggingArgparse, DEFAULT_LOG_LEVELS
```
The Logging functions setup loguru based logging for monitoring plugins with settings that allow for simple debugging during development and a short history for production usage by default.
__Documentation__
You can find documentation in the [`docs`](./docs/logging.md) folder.
Code usage examples can be found in the [`examples`](./examples/check_day_of_the_week.py) folder.
__Maturity__: Stable.
# Development
Contributions are welcome, changes need to be backwards compatible.
## Setup
```
python3 -m pip install --upgrade pip setuptools wheel twine pytest
python3 -m pip install -r requirements.txt
```
## Build
```
python3 .\setup.py sdist bdist_wheel
```
## Tests
Install build package to current directory
```
python3 -m pip install -e .
```
Run tests
```
python3 -m pytest tests/
```
Raw data
{
"_id": null,
"home_page": "https://github.com/sol1/sol1-monitoring-plugins-lib",
"name": "sol1-monitoring-plugins-lib",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Matthew Smith",
"author_email": "matthew.smith@sol1.com.au",
"download_url": "https://files.pythonhosted.org/packages/9e/e8/e3c078141599ad6a42bdca08ba29ae841ac12690a418d83e868413d93c73/sol1-monitoring-plugins-lib-1.1.1.tar.gz",
"platform": null,
"description": "# Sol1 Monitoring Plugins Library\r\nSol1 Monitoring Plugins Library are tools to assist in the creation of monitoring checks for Icinga2 and Nagios.\r\n\r\n\r\n## MonitoringPlugin\r\n```python\r\nfrom sol1_monitoring_plugins_lib import MonitoringPlugin\r\n```\r\nThe MonitoringPlugin class manages the state, output message and performance data of your check as well as returning this data and exiting the script.\r\n\r\nIt has been designed so you can add multiple tests and the class will intelligently manage the state and output for you. \r\n\r\n__Documentation__\r\nYou can find documentation in the [`docs`](./docs/monitoring_plugins.md) folder. \r\nCode usage examples can be found in the [`examples`](./examples/check_day_of_the_week.py) folder.\r\n\r\n__Maturity__: Stable.\r\n\r\n## Logging\r\n```python\r\nfrom sol1_monitoring_plugins_lib import initLogging, initLoggingArgparse, DEFAULT_LOG_LEVELS\r\n```\r\n\r\nThe Logging functions setup loguru based logging for monitoring plugins with settings that allow for simple debugging during development and a short history for production usage by default.\r\n\r\n__Documentation__\r\nYou can find documentation in the [`docs`](./docs/logging.md) folder. \r\nCode usage examples can be found in the [`examples`](./examples/check_day_of_the_week.py) folder.\r\n\r\n__Maturity__: Stable.\r\n\r\n# Development\r\nContributions are welcome, changes need to be backwards compatible.\r\n\r\n## Setup\r\n```\r\npython3 -m pip install --upgrade pip setuptools wheel twine pytest\r\npython3 -m pip install -r requirements.txt\r\n```\r\n## Build\r\n```\r\npython3 .\\setup.py sdist bdist_wheel\r\n```\r\n## Tests\r\nInstall build package to current directory \r\n```\r\npython3 -m pip install -e .\r\n```\r\nRun tests\r\n```\r\npython3 -m pytest tests/\r\n```\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Simple Library to manage the output for Nagios and Icinga Monitoring Plugins",
"version": "1.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/sol1/sol1-monitoring-plugins-lib/issues",
"Homepage": "https://github.com/sol1/sol1-monitoring-plugins-lib"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "18a25741a7a234593ba81182f9e87d6e77c58b0e0933fb17d23c0772513b3f3e",
"md5": "30f6536aeb6e1d0ccbbae02755bdfecd",
"sha256": "e97074eb6023108d3ca630bfcdd223fb4fa8164c94bae710a972e5beb655bf3e"
},
"downloads": -1,
"filename": "sol1_monitoring_plugins_lib-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "30f6536aeb6e1d0ccbbae02755bdfecd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 8357,
"upload_time": "2024-02-29T05:40:01",
"upload_time_iso_8601": "2024-02-29T05:40:01.346513Z",
"url": "https://files.pythonhosted.org/packages/18/a2/5741a7a234593ba81182f9e87d6e77c58b0e0933fb17d23c0772513b3f3e/sol1_monitoring_plugins_lib-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9ee8e3c078141599ad6a42bdca08ba29ae841ac12690a418d83e868413d93c73",
"md5": "a5dc7ac7092b1680c6ca10fb1dab8cc3",
"sha256": "832ca6cd467255af6f5b5855c0dddb02fb0eccc8c189afd7556fc5880b7f21d4"
},
"downloads": -1,
"filename": "sol1-monitoring-plugins-lib-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a5dc7ac7092b1680c6ca10fb1dab8cc3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9040,
"upload_time": "2024-02-29T05:40:03",
"upload_time_iso_8601": "2024-02-29T05:40:03.761541Z",
"url": "https://files.pythonhosted.org/packages/9e/e8/e3c078141599ad6a42bdca08ba29ae841ac12690a418d83e868413d93c73/sol1-monitoring-plugins-lib-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-29 05:40:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sol1",
"github_project": "sol1-monitoring-plugins-lib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "loguru",
"specs": []
}
],
"lcname": "sol1-monitoring-plugins-lib"
}