Skip to content

Monitoring plugin to check JSON from REST APIs and files with Icinga, Nagios and other compatible monitoring solutions

Notifications You must be signed in to change notification settings

DinoTools/monitoring-check_json

Repository files navigation

check_json

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/

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

License

GPLv3+

About

Monitoring plugin to check JSON from REST APIs and files with Icinga, Nagios and other compatible monitoring solutions

Topics

Resources

Stars

Watchers

Forks

Languages