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
chech_http Service to be sent as Warning
Re: chech_http Service to be sent as Warning
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
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!
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
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 .
Re: chech_http Service to be sent as Warning
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.
Try it out and let us know if you have any further questions.
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 serverBe 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
Impressive
. thanks for introducing this interesting Plugin to me .
Appreciate your help
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
Glad we could be of assistance!veeravamsi wrote:Impressive. thanks for introducing this interesting Plugin to me .
Appreciate your help