Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaDDash agent plugins and handling JQ parameter #77

Open
arlake228 opened this issue Nov 6, 2019 · 1 comment
Open

MaDDash agent plugins and handling JQ parameter #77

arlake228 opened this issue Nov 6, 2019 · 1 comment

Comments

@arlake228
Copy link
Contributor

JQ parameters that are passed to check_esmond are not properly quoted. Also need to check if the escape / required for quotes makes sense.

Example:

check Plugin json:

"jq": "if .\\\"network-up\\\" then 1 else 0 end",

maddash.yaml:

default: "/usr/lib64/nagios/plugins/check_esmond --measurement-agent %row.map.address --critical 0.1: --timeout 60 --jq if .\"network-up\" then 1 else 0 end --time-range 86400 --warning 0.9: --url %maUrl --event-type pscheduler-raw --metadata-params pscheduler-test-type netreach --metadata-params pscheduler-netreach-network 127.0.0.0/24"
@arlake228
Copy link
Contributor Author

The other issue here is how to handle whitespace in the JQ because going from JSON->YAML->Command-line option->JQ script executed by perl script does not handle it well. Might want to test what happens when escape whitespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant