|
From: Subhendu G. <sg...@sg...> - 2002-09-04 13:04:01
|
Ummm... spaces in argument that is no quoted. Try the following command def and service def... command[check_http_url_content]=$USER1$/check_http $ARG1$ -s $ARG2$ service[www.something.com]=service_asp;0;24x7;4;1;1;rickgroup;10;24 x7;1;1;1;;check_http_url_content;"-H www.something.com -u /extranet/default.asp -w 5 -c 10"!"remark 1" -sg On Wed, 4 Sep 2002, Rick M wrote: > When i execute the following commands, they work. I want to have an alert if > "remark 1" is NOT found on the page. And these commands do that: > > [root@netsaint libexec]#./check_http -H www.something.com -u > /extranet/default.asp -w 5 -c 10 -s "remark 1" > HTTP ok: HTTP/1.1 200 OK - 0 second response time > > [root@netsaint libexec]#./check_http -H www.something.com -u > /extranet/default.asp -w 5 -c 10 -s "remark 2" > HTTP CRITICAL: string not found > > When i add this command (with the necessary changes to my hosts.cfg in the > services section as follows, i dont get the desired output. > > service[www.something.com]=/extranet/default.asp;0;24x7;4;1;1;rickgroup;10;2 > 4x7;1;1;1;;check_http! -H www.something.com -u /extranet/default.asp -w 5 -c > 10 -s "remark 1" > > Regardless of the String of text i type in to search in the > /extranet/default.asp (e.g. "remark 1" "remark 2" "anythingatall" for, in > netsaint i get the following: > > HTTP ok: HTTP/1.1 200 OK - 0 second response time > > The host entry corresponding with www.something.com in the hosts.cfg is: > host[www.something.com.au]=homecare_web_server;203.24.113.17;;check_http;5;1 > 0;24x7;1;1;1; > > Status Log: > [1031123071] > SERVICE;www.homecare.com.au;/extranet/default.asp;OK;1/4;HARD;1031123031;103 > 1123091;ACTIVE;1;1;1;1031121072;0;OK;1070;0;0;0;0;0;1;0;0;1;0;0.00;0;HTTP > ok: HTTP/1.1 200 OK - 0 second response time > > Does anybody know what the problem is here? please help! Thanks Again! > > Regards, > > Rick. > > ----- Original Message ----- > From: "Subhendu Ghosh" <sg...@sg...> > To: "Rick M" <ric...@ho...> > Sent: Wednesday, September 04, 2002 11:53 AM > Subject: Re: [Netsaintplug-help] check_http OK > > > > Can you run the plugin on the caommand line with the "-v" verbose option > > to see what the page content looks like to the plugin.. > > > > -sg > > > > On Wed, 4 Sep 2002, Rick M wrote: > > > > > I have changed my page now, so that i can search for something that IS > > > there. If it ISN'T there then i get an error. But there's a problem - > When > > > it ISNT there im > > > getting an HTTP-OK back to netsaint. Which has me a bit confused. > > > > > > The following is my service entry: > > > > > > > service[www.something.com]=my_extranet;0;24x7;4;1;1;rickgroup;10;24x7;1;1;1; > > > ;check_http! -u /extranet/default.asp -p 80 -w 5 -c 10 -s "remark 1" > > > > > > I have followed the instructions and can't seem to see the problem... > can > > > you please tell me whats wrong? > > > > > > Thanks again, > > > > > > Rick. > > > ----- Original Message ----- > > > From: "Subhendu Ghosh" <sg...@sg...> > > > To: "Rick M" <ric...@ho...> > > > Sent: Tuesday, September 03, 2002 11:22 AM > > > Subject: Re: [Netsaintplug-help] check_http OK > > > > > > > > > > Sorry - I guess I meant is there somthing to match when don't want an > > > > alert, but does not match when you do want an alert. > > > > > > > > couple issues with the service definition... > > > > > > > > if you have spaces in arguments, always enclose them in quotes. > > > > > > > > if the string you want to match has spaces, enclose that in quotes as > > > > well. > > > > > > > > since you can't have quotes inside quotes, break up the arguments into > > > > separate ARG!, ARG2, etc. > > > > > > > > Otherwise the the arguments look ok. When "string of text" is found, > > > > should return OK otherwise CRITICAL. > > > > > > > > If you want the opposite behavior, a little shell wrapper should do > the > > > > trick. > > > > > > > > -sg > > > > > > > > > > > > On Tue, 3 Sep 2002, Rick M wrote: > > > > > > > > > Thanks for your response. > > > > > Yes there is something unique on the page to find if i DO want an > alert. > > > How > > > > > would i raise the alert? > > > > > > > > > > I have the following command set up. Even when the 'string of text' > is > > > not > > > > > found, the status check_http sends back is an OK. Why is this? could > it > > > be > > > > > monitoring the server itself, or only checking for a http/1.1 or > > > something > > > > > similar other than the www.something.com/qa/default.asp? > > > > > > > > > > service[www.something.com] > > > > > monitor1;0;24x7;4;1;1;rickgroup;10;24x7;1;1;1;;check_http! -u > > > > > /qa/default.asp -p 80 -w 5 -c 10 -s string of text > > > > > > > > > > Thanks again... > > > > > > > > > > > > > -- > > > > > > > > > > > -- > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Netsaintplug-help mailing list > Net...@li... > https://lists.sourceforge.net/lists/listinfo/netsaintplug-help > http://netsaintplug.sf.net/ > http://sf.net/projects/netsaintplug/ > -- |