This is a monitoring plugin for Icinga, Nagios 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/
- Python 3.6+
- jmespath
- nagiosplugin
- requests
./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.py --url https://example.org/your/json/service --check-value "level;level;1;2"
Use the verbose output to debug if the plugin is unablte to extract the right values.
./check_json.py -vvv ....
- Git-Repository: https://github.com/DinoTools/monitoring-check_json-api
- Issues: https://github.com/DinoTools/monitoring-check_json-api/issues
GPLv3+