https://github.com/dinotools/monitoring-check_json
Monitoring plugin to check JSON from REST APIs and files with Icinga, Nagios and other compatible monitoring solutions
https://github.com/dinotools/monitoring-check_json
icinga-plugin icinga2-plugin json nagios-plugin
Last synced: about 1 year ago
JSON representation
Monitoring plugin to check JSON from REST APIs and files with Icinga, Nagios and other compatible monitoring solutions
- Host: GitHub
- URL: https://github.com/dinotools/monitoring-check_json
- Owner: DinoTools
- Created: 2022-08-02T04:22:30.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-17T18:23:37.000Z (over 1 year ago)
- Last Synced: 2025-03-27T08:48:09.570Z (over 1 year ago)
- Topics: icinga-plugin, icinga2-plugin, json, nagios-plugin
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSES/CC0-1.0.txt
Awesome Lists containing this project
README
check_json
==========
This is a monitoring plugin for [Icinga](https://icinga.com/), [Nagios](https://www.nagios.org/) and other compatible
monitoring solutions to check JSON APIs and files. It uses the JMESPath query language to extract the data.
For more information have a look at https://jmespath.org/
Requirements
------------
- Python 3.6+
- jmespath
- nagiosplugin
- requests
Examples
--------
### Check JSON file
```
./check_json.py --file examples/simple_dict.json --check-value "level;level;1;2"
```
```
./check_json.py --file examples/advanced_dict.json --check-text-ok "first_status;results[?component=='first'].status;ok"
```
```
./check_json.py --file examples/advanced_dict.json --check-text-ok "second_status;results[?component=='second'].status;ok"
```
### Check JSON from URL
```
./check_json.py --url https://example.org/your/json/service --check-value "level;level;1;2"
```
Tip
---
Use the verbose output to debug if the plugin is unablte to extract the right values.
```
./check_json.py -vvv ....
```
Resources
---------
- Git-Repository: https://github.com/DinoTools/monitoring-check_json-api
- Issues: https://github.com/DinoTools/monitoring-check_json-api/issues
License
-------
GPLv3+