We had a web check suddenly begin failing the string match. Capturing the verbose response identified that the check_http plugin is catching a "line break, 'eb2', line break" in the middle of our match string. We can adjust what match string we use for now, but cannot identify why that new break showed up in the web page.
Here is the actual check we were running, the page is public;
./check_http -H wiki.illinois.edu -S -s "Welcome to the Wiki" -u "/wiki/dashboard.action" -v -v
Anyone have a clue?
Issue with check_http inserting a line break
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Issue with check_http inserting a line break
Hello,@efrahm . I'm pretty sure this is happening as a result of the redirection. If you paste wiki.illinois.edu/wiki/dashboard.action in the web browser you'll notice that you get redirected to a slightly different address right away. That's why the check was saying OK, but the string doesn't actually exist at the original destination. I modified the command and this worked for me:
Code: Select all
./check_http -H wiki.illinois.edu --ssl -u "/wiki/" -f follow -s "Welcome to the Wiki"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Issue with check_http inserting a line break
interesting... That updated check string does result in an 'OK', but the odd linebreaks and inserted line are still there. If you do a '-v -v' on the check you will find an out of place linebreak, 'ea2', linebreak that is not in the actual website and does not show in a wget.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Issue with check_http inserting a line break
@efrahm, Yeah, I've seen that too. And at first it was eb2, then it was ea2 or something similar. And then this break showed up not in a middle of a string but in a middle of a <strong> tag. Perhaps this plugin has an odd way of outputting web pages in the command line, I couldn't find a better explanation so far.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.