hi,
trying to pass an API key to work w/ a palo alto monitoring plugin.
I have it working through the command line but once i create the XI command and service with the same key it fails. I've tried hardcoding the key to the command, pass it as an $ARG$ and as a $USER$ variable in the resource.cfg file.
I am not sure why the UI doesn't like the same thing the command line accepts.
Command Line:
check_paloalto -H IPaddress -T TOKEN throughput -i interface
THROUGHPUT OK
UI:
check_paloalto -H $HOSTADDRESS$ -t 300 -T $ARG3$ $ARG1$ -i $ARG2$
THROUGHPUT UNKNOWN - Expected status code: 200 (OK), returned status code was: 403
Passing API Key for Plugin
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Passing API Key for Plugin
Hi blariv,
There may be a special character in the API key causing the issue as it does look like the plugin is running otherwise. Is there a $ or ! in the API key? If so try escaping this with a \, see the following guide for more details.
Nagios XI - Special Characters
Additionally, you might try to wrap the API key in single quotes in the arguments field in XI.
If those steps do not correct the issue, please PM the full check command as set in XI or send over your system profile so I can review the configuration. Thanks, Benjamin
There may be a special character in the API key causing the issue as it does look like the plugin is running otherwise. Is there a $ or ! in the API key? If so try escaping this with a \, see the following guide for more details.
Nagios XI - Special Characters
Additionally, you might try to wrap the API key in single quotes in the arguments field in XI.
If those steps do not correct the issue, please PM the full check command as set in XI or send over your system profile so I can review the configuration. Thanks, Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Passing API Key for Plugin
yes there is an equal sign as the last character in the key.
ive tried the escaping and the single quotes. Pm'ing you w/ the details.
ive tried the escaping and the single quotes. Pm'ing you w/ the details.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Passing API Key for Plugin
Hi @blariv,
Thanks for the check command, other than the = sign at the end, I don't see any other characters that would be an issue here. I did notice that the UI command definition has the arguments out of order.
Thanks for the check command, other than the = sign at the end, I don't see any other characters that would be an issue here. I did notice that the UI command definition has the arguments out of order.
Can you PM a screenshot of the command setup in XI, I just want to make sure that $ARG3$ is the API key and the other values match up. I did some testing on my server here and was able to include an = character in the password without an issue using single quotes around the token, so it should work.check_paloalto -H $HOSTADDRESS$ -t 300 -T $ARG3$ $ARG1$ -i $ARG2$
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!