Page 1 of 1

check_http & ssl

PostPosted: Fri Aug 16, 2019 3:41 am
by crechet51
Hi,

I have a site httpS, which I need to check with check_http and find a line in it that contains a specific word.

I do:
Code: Select all
check_http! -S -s "123"!

As I understand it: S - use https instead of http

I get:
Code: Select all
HTTP CRITICAL: HTTP/1.1 301 Moved Permanently - string '123' not found on 'https://site.com:443/'

Re: check_http & ssl

PostPosted: Fri Aug 16, 2019 6:47 am
by scottwilkerson
it looks like the site you are pointing check_http to has a redirect, it would be easiest to set check_http to follow the redirect with the -f follow flag

Code: Select all
check_http! -S -s "123" -f follow!

Re: check_http & ssl

PostPosted: Fri Aug 16, 2019 8:14 am
by crechet51
I set

Code: Select all
check_http!-f -s "123"!

and I get:

Code: Select all
check_http: Invalid onredirect option - -s


:roll:

Re: check_http & ssl

PostPosted: Fri Aug 16, 2019 8:27 am
by scottwilkerson
You missed the word follow
Code: Select all
check_http!-f follow -s "123"!

Re: check_http & ssl

PostPosted: Fri Aug 16, 2019 8:48 am
by crechet51
Great! It's works. Thank you.

Re: check_http & ssl

PostPosted: Fri Aug 16, 2019 8:51 am
by scottwilkerson
crechet51 wrote:Great! It's works. Thank you.

Great!

Locking