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.
Kwiskas
Posts: 3 Joined: Wed Jun 05, 2019 1:57 am
Post
by Kwiskas » Wed Jun 05, 2019 2:07 am
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:
Post
by scottwilkerson » Thu Jun 06, 2019 11:54 am
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
Kwiskas
Posts: 3 Joined: Wed Jun 05, 2019 1:57 am
Post
by Kwiskas » Wed Jun 12, 2019 2:07 am
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:
Post
by scottwilkerson » Wed Jun 12, 2019 6:39 am
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.
Kwiskas
Posts: 3 Joined: Wed Jun 05, 2019 1:57 am
Post
by Kwiskas » Wed Jun 12, 2019 7:35 am
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:
Post
by scottwilkerson » Wed Jun 12, 2019 11:51 am
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