Page 1 of 1

NagiosXi "Run Check Command" problem detected

Posted: Fri Oct 16, 2020 5:36 am
by Branigan
Hi Team,

Noticed a weird issue recently,

When using check command "http_xi_service_http" on certain string/content checks on webpages, the following occurs:

Service is currently added to NagiosXi successfully, however when using the "Run Check Command" below "CRITICAL" result is seen.

Response:
"/usr/local/nagios/libexec/check_http -H api.kickbox.com -s "true" -f ok -H api.kickbox.com -u "/v2/verify?email=[email protected]&apikey=test_" -S --sni -p 443
HTTP CRITICAL: HTTP/1.1 404 Not Found - string 'true' not found on 'https://api.kickbox.com:443/v2/verify\\ ... ikey=test_' - 193 bytes in 1.033 second response time |time=1.033374s;;;0.000000 size=193B;;;0

NB: a valid email add is applied to the check.

When looking at the actual Item via "Service State", its in an Ok state: PSA Document

Can you kindly share some insight with regards to this error as it seems to be a false positive result currently, majority of our current service webpage content checks display errors when "Run check command" is performed however the service state displays "Ok"

NB: Other basic content checks do not display these errors when "Run Check Command" is performed.
Possible that additional characters are being added on when using "Run Check Command" resulting in a Critical result (unsure)

NagiosXi has been upgraded to the latest release available and up to date.

Thanks
Branigan.

Re: NagiosXi "Run Check Command" problem detected

Posted: Fri Oct 16, 2020 2:26 pm
by benjaminsmith
Hi Branigan,

That's right, the additional characters are causing the check to fail when using the Run Check Command button. The reason for this is due to the extra security measure introduced when passing variables to the monitoring engine from the web-based GUI. We are working on this internally to catch these and fix them.

In the meantime, I would recommend cutting and pasting the command provided by the Run Check Command button into the shell to confirm if works or not if you suspect there's an issue passing special characters.

Note, I did some testing on those URL parameters but I suspect it may be a character in your API key.

Benjamin

Re: NagiosXi "Run Check Command" problem detected

Posted: Wed Oct 21, 2020 2:24 am
by Branigan
Hi Benjamin,

Understood, makes sense :lol: thank you for the feedback.
In the meantime, I would recommend cutting and pasting the command provided by the Run Check Command button into the shell to confirm if works or not if you suspect there's an issue passing special characters.

Note, I did some testing on those URL parameters but I suspect it may be a character in your API key.
- That would be correct, also I did not provide the complete key here. I did test via shell and result is successful.

Kindly advise once a fix has been implemented.

Branigan.

Re: NagiosXi "Run Check Command" problem detected

Posted: Wed Oct 21, 2020 2:22 pm
by benjaminsmith
Hi Branigan,

Your welcome! If you continue to have issues with this in future upgrades, please don't hesitate to open a forum post and let us know.

Benjamin