I'm configuring a URL check using check_http and it's erring. I can access the URL directly to a browser and it works fine, page displays with the text I'm searching for.
Command: /usr/local/nagios/libexec/check_http -H <my DNS> -s "<string to check for>" -f ok -I <my IP> -u "<web page unprotected>" -p 80
OUTPUT: HTTP CRITICAL: HTTP/1.1 302 Moved Temporarily - string '<string to check for>' not found on '<my web page>' - 150 bytes in 0.157 second response time |time=0.156609s;;;0.000000 size=150B;;;0
Well it looks like it can't find the string you are trying to match, unfortunately since you blocked it out, and we likely don't have access to that site, there is not a whole lot we can do to check this. A 302 indicates a redirection issue, are you checking the first page of the primary address that DNS is giving you? Or are you checking a page further down the rabbit hole which you are normally redirected to? check_http has usage output regarding follow/redirect that may be of assistance. Try running the plugin like so to see these options:
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.