Is it possible to return a Warning status instead of the default Critical status when the response does not = 200 for the below service check?
check command: check_xi_service_http
$ARG1$: -f ok -H examplehost -u '/login' -S --sni -p 443
Check_xi_service_http Response Status
-
- Posts: 101
- Joined: Tue Aug 06, 2019 7:49 am
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Check_xi_service_http Response Status
Hi Megan,
That check command is using the check_http plugin, and here's how it handles the different conditions and state types.
That behavior cannto be changed without altering the plugin, however, you can use the negate plugin to change the output from warning to critical.
See: Using The Negate Plugin
So for example:
Let me know if that would work for you.
Best Regards,
Benjamin
That check command is using the check_http plugin, and here's how it handles the different conditions and state types.
See: The check_http PluginThis plugin will attempt to open an HTTP connection with the host.
Successful connects return STATE_OK, refusals and timeouts return STATE_CRITICAL
other errors return STATE_UNKNOWN. Successful connects, but incorrect response
messages from the host result in STATE_WARNING return values.
That behavior cannto be changed without altering the plugin, however, you can use the negate plugin to change the output from warning to critical.
See: Using The Negate Plugin
So for example:
Code: Select all
/usr/local/nagios/libexec/negate -w CRITICAL -s /usr/local/nagios/libexec/check_http -f ok -H examplehost.com -u '/login' -S --sni -p 443
Best Regards,
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!