Hello,
We have been using Nagios XI for well over a year now and so far everything worked great.
However recently we had a request to monitor certain website content that was behind a php based authentication. We used the NAGIOS XI Website Wizard for this. Whilst the authentication worked and the string for the content returned HTTP OK - HTTP/1.1 302 Moved Temporarily the status was on Green.
Now there was a planned maintence of the Website in question. Once the downtime came the status changed to HTTP OK - HTTP/1.1 302 Found, also Green
When it came back up it went back to its previous HTTP OK - HTTP/1.1 302 Moved Temporarily state.
The problem is that although the website was down and status change occured, the Condition was still UP and Green.
Now comes my question: is it possible to modify NAGIOS XI the change the Condition to DOWN when the status changes to HTTP OK - HTTP/1.1 302 Found.
I am no Linux expert so I am a bit lost when it comes to changing configuration settings per shell. Is there a easy way of doing so
Any help here would be helpfull, thanks
Knut Seifert
Changing Condition states for Http(s) checks
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Changing Condition states for Http(s) checks
No. "302 Moved Temporarily" and "302 Found" are identical responses, and it would be incorrect to treat them any differently from each other. Your real question is why you are still getting a valid response from a web site that is supposedly down.
Re: Changing Condition states for Http(s) checks
Thats true,
The Website is question is 80% dynamic in content. my String anchor which I use is a static peace of text from the dynamic content. I should start by defining down first. If the website goes down completely then NAGIOS reports correctly with a socket timeout error, and thats fine. However its mostly that the dynamic parts of the webpage experience difficulities(AJAX Components).
So yes the Website Framework is up but the content is wrong (or missing) hence the 2 status codes. And thats the challenge I have. My Job is the track to see if certain content strings appear in the dynamic part of the website.
And for all intents and purposes NAGIOS does a great job in detecting it, however it only changes from "Moved Temporarily" to "found" and vice versa when the contect is back up.
I hope I made sense
The Website is question is 80% dynamic in content. my String anchor which I use is a static peace of text from the dynamic content. I should start by defining down first. If the website goes down completely then NAGIOS reports correctly with a socket timeout error, and thats fine. However its mostly that the dynamic parts of the webpage experience difficulities(AJAX Components).
So yes the Website Framework is up but the content is wrong (or missing) hence the 2 status codes. And thats the challenge I have. My Job is the track to see if certain content strings appear in the dynamic part of the website.
And for all intents and purposes NAGIOS does a great job in detecting it, however it only changes from "Moved Temporarily" to "found" and vice versa when the contect is back up.
I hope I made sense
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Changing Condition states for Http(s) checks
What method are you using to deal with the authentication and then the content string check currently? If you're not already doing it, I would imagine you would want WebInject for this.
Re: Changing Condition states for Http(s) checks
Hi,
I am using the build in functionality of Nagios. I have never installed a plugin and do not know how to besides using the GUI. What is Webinject and how can I configure it in Nagios?
I am using the build in functionality of Nagios. I have never installed a plugin and do not know how to besides using the GUI. What is Webinject and how can I configure it in Nagios?
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Changing Condition states for Http(s) checks
What method / wizard / fields did you use to set up this particular check though?sievers wrote:I am using the build in functionality of Nagios.
WebInject is a library for executing multiple HTTP requests in sequence, and processing confirmation logic for each step. It lets you do things like loading the login page, supplying credentials, then loading a members-only page, automatically. You'll find some more information about it, plus a sample configuration, in the document on http://library.nagios.com/library/produ ... -nagios-xi.sievers wrote:What is Webinject and how can I configure it in Nagios?