check_http + headers

af.at.work at gmail.com af.at.work at gmail.com
Fri Jul 29 17:35:18 CEST 2011


I tried multiple -k parameters to add more headers with the same
result.  This is the output from Nagios with a 400 Bad Request status.
I assume that is because the cookie is effectively broken.

GET http://mywebsite.com/home.aspx HTTP/1.1
User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15)
Connection: close
Host: mywebsite.com
Cookie: user=4reqrerqwr
userlogin=123adsfjlk324


cURL via the CLI is almost identical, but the Cookie: is kept on one line.

GET http://mywebsite.com/home.aspx HTTP/1.1
Connection: close
Host: mywebsite.com
Cookie: user=4reqrerqwr;userlogin=123adsfjlk324



On Fri, Jul 29, 2011 at 10:49 AM, Ton Voon <tonvoon at gmail.com> wrote:
>
> On 29 Jul 2011, at 14:35, af.at.work at gmail.com wrote:
>
>> I am trying to mimic this in Nagios with check_http like so:
>>
>> ./check_http -H mysite.com -u http://mysite.com/home/index.aspx -f
>> follow -s Welcome -k 'Cookie: user=4reqrerqwr;userlogin=123adsfjlk324'
>> -v
>
> You should use multiple -k to add more headers.
>
> Ton
>
>
> ------------------------------------------------------------------------------
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list