chech_http Service to be sent as Warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

chech_http Service to be sent as Warning

Post by veeravamsi »

Hi Team,

We are using check_http Service check to check the Agent Status and it triggers as CRITICAL by default. Is it possible to force the severity to be WARNING ( Instead of CRITICAL ) ?

--Vamsi
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: chech_http Service to be sent as Warning

Post by jbrunkow »

The check_http script returns a CRITICAL state by default if the connection is refused or times out. Are you asking if the plugin can be configured to return WARNING in either of those cases?

If you wanted to take a deeper look into the exact logic being used, you could peruse the code linked below. I suppose that you could edit exactly where STATE_CRITICAL is being called, but I don't believe there is a command line option to change the severity like you are talking about.
https://github.com/nagios-plugins/nagio ... eck_http.c
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!
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

Re: chech_http Service to be sent as Warning

Post by veeravamsi »

Yep that is correct. We dont want to edit check_http Service Itself as we just want for One type of Check ( NCPA HTTP Agent Status Check ) to be with lower Priority .
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: chech_http Service to be sent as Warning

Post by tgriep »

If you like, you can create a command and use the negate plugin to change the output of that one check from Critical to Warning.
See this link for details on the negate plugin.
https://support.nagios.com/kb/article/n ... n-287.html

This example will change the status from Critical to Warning it the check_http plugin cannot connect to the server.

Code: Select all

/usr/local/nagios/libexec/negate -c WARNING  -s /usr/local/nagios/libexec/check_http -H server
Try it out and let us know if you have any further questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

Re: chech_http Service to be sent as Warning

Post by veeravamsi »

Impressive :) . thanks for introducing this interesting Plugin to me .

Appreciate your help
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: chech_http Service to be sent as Warning

Post by scottwilkerson »

veeravamsi wrote:Impressive :) . thanks for introducing this interesting Plugin to me .

Appreciate your help
Glad we could be of assistance!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked