how to get alert on err_too_many_redirects ?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Kwiskas
Posts: 3
Joined: Wed Jun 05, 2019 1:57 am

how to get alert on err_too_many_redirects ?

Post by Kwiskas »

Hello

I need to get an alert when one of our webpages goes on error ERR_TOO_MANY_REDIRECTS

For example I have found a website whith the error and am trying to build the nagios check on it:
http://www.amu-asie.org
and one of it page: http://www.amu-asie.org/5697-2 goes on this error

I would like to show that on Nagios

I tried with -f follow from check_http but nothing.. Just tells me the redirect is fine..

my service:

define service{
use generic-service
host_name amu-asie.org
service_description just-a-test
check_command check_http!/5697-2!-f follow

}

I'm a new guy on nagios by the way :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: how to get alert on err_too_many_redirects ?

Post by scottwilkerson »

Unfortunately the number of allowed redirects isn't something you can gather from the server, it is dependent on the browser setting.

I would suggest setting up a check on the page you are redirecting to and NOT adding the -f command, this way it won't follow

example

Code: Select all

check_command check_http!/5697-2!-f critical
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Kwiskas
Posts: 3
Joined: Wed Jun 05, 2019 1:57 am

Re: how to get alert on err_too_many_redirects ?

Post by Kwiskas »

Hi
Tried that, not working
Is that possible to do continuous followup and get a limit for a critical? Example, follow max 3 times then stop
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: how to get alert on err_too_many_redirects ?

Post by scottwilkerson »

Kwiskas wrote:Hi
Tried that, not working
Is that possible to do continuous followup and get a limit for a critical? Example, follow max 3 times then stop
You would have to write that logic into a custom plugin, that functionality isn't built in.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Kwiskas
Posts: 3
Joined: Wed Jun 05, 2019 1:57 am

Re: how to get alert on err_too_many_redirects ?

Post by Kwiskas »

Finally I foundfrom where was the issue :) I had to do a define command{} and to enter everything manually to get it work

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

Re: how to get alert on err_too_many_redirects ?

Post by scottwilkerson »

Kwiskas wrote:Finally I foundfrom where was the issue :) I had to do a define command{} and to enter everything manually to get it work

Thanks
Glad you found a solution.

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked