Question
I want to use "$" as input to a check_command in check_command_args. How can I do this?
Answer
You can do this by encapsulating the argument containing "$" in double quotes: "", and escape the sign $ with another one so that the input is not interpreted as a variable.
See the example below with the plugin "check_oracle":
Function | Value |
---|---|
check_command | USER1$/check_oracle -l "$ARG1$" -u "$ARG2$" -p "$ARG3$" -o QUERY -a "$ARG4$" -w $ARG5$ -c $ARG6$ |
check_command_args | oracle-01!user!password!select 1 from v\$$database where 'value123' = 'value123'!2!3 |
Output
_USER1_/check_oracle -l "oracle-01" -u "user" -p "password" -o QUERY -a "select 1 from v\$database where 'value123' = 'value123'" -w 2 -c 3Result code: OKOK - Query returned: 1|result=1;2;3
Comments
0 comments
Please sign in to leave a comment.