Per the Nagios doc, I also tried putting the ; in a $USERn$ variable & passed that in my check but it still drops the second cookie value to another line.
On Fri, Jul 29, 2011 at 10:14 AM, <af.at.w...@gmail.com> wrote: > Wrapping in quotes still made pushed the second value to another line. > Cookie: > "AwarenessNETUserLogin_8800=04dDHmcJjn2vfcvP97i+z9yBGic0y4BIhNfDo8wN1fE= > username=admin" > > Can the ; be escaped? I can't pass anything else. > > On Fri, Jul 29, 2011 at 10:03 AM, Gary Every <gev...@gmail.com> wrote: >> Try using something besides a ; to separate the user and userlogin or >> better yet encapsulate them in quotes??? >> 'Cookie: "user=4reqrerqwr;userlogin=123adsfjlk324"' >> >> On Fri, Jul 29, 2011 at 6:35 AM, <af.at.w...@gmail.com> wrote: >>> >>> With cURL, I can successfully log into the website I ultimately want >>> have Nagios test by passing --cookies. >>> >>> Something like this: curl --cookie >>> "user=4reqrerqwr;userlogin=123adsfjlk324" >>> http://mysite.com/home/index.aspx -v | grep Welcome >>> >>> I know it is successful because, 1, I can visually see the rendered >>> code and 2, the grep search for Welcome would only be seen if the >>> authentication was successful. >>> >>> 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 >>> >>> One big difference I see is that in cURL the cookie is set on 1 line >>> but the verbose response from check_http shows the cookie on two >>> lines. >>> >>> Cookie: user=4reqrerqwr;userlogin=123adsfjlk324 vs >>> >>> Cookie: user=4reqrerqwr >>> userlogin=123adsfjlk324 >>> >>> I am open to suggestions and of course alternatives. I have checked >>> out WebInject but this seems to be SO close I hate to drop it. >>> >>> Lastly, I have tried check_curl, and extended it to support cookies. >>> This DOES work but I am getting (null) on the responses and the grep >>> never causes Nagios to fail regardless of a valid result being >>> returned. >>> >>> >>> ------------------------------------------------------------------------------ >>> 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@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 >> >> >> >> -- >> Gary Every >> "Pay it Forward!" >> >> >> ------------------------------------------------------------------------------ >> 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@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@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