monitoring url

Cook, Garry GWCOOK at mactec.com
Thu Aug 26 23:32:24 CEST 2004


Sandoval, Julio wrote:
> Considered Garry,
> 
> I try the following:
>  root at monitorRH root]# /usr/lib/nagios/plugins/check_http -H achsnet
> -I 192.168.0.16 -u
> http://achsnet.achs.cl/ACHS2/SITIOWEB/INICIOV3.NSF/\(PARTIDA\)
> ?OPENAGENT\&LOGIN  
> 
> 
> and sorprise, the response:
> HTTP ok: HTTP/1.0 200 OK - 0.66 second response time |time=0.66

Looks like that works, perhaps you should use that command for your
check?

 
> Good, and now i like logon in the lotusnotes server for test.
> I try the following:
> ....-u
> http://achsnet.achs.cl/ACHS2/SITIOWEB/INICIOV3.NSF/\(PARTIDA\)
> ?OPENAGENT\&LOGIN -a $USER3$:$USER4$
> 
> Response:
> HTTP ok: HTTP/1.0 200 OK - 0.11 second response time |time=0.11

This one appears to work too, and would be safer to use because the
user/pass are stored in the resource.cfg which should not be accessible
by regular users. I would use this method to check your http service.

 
> Well, after i try with only $USERX$, how below:
> ...-u $USER1$ -a $USER3$:$USER4$
> 
> #$USER1$=http://achsnet.achs.cl/ACHS2/SITIOWEB/INICIOV3.NSF/\(
> PARTIDA\)?OPENAGENT\&LOGIN 
> 
> Response:
> HTTP WARNING: HTTP/1.0 400 Bad Request
> 
> Please, it tell me what your you think.

I'm not sure what to think about this. I don't think it is a good idea
to change the $USER1$ macro though, as that should point to your
<path_to_nagios>/libexec/ directory. If you change this, then all of the
definitions in checkcommands.cfg may begin to fail. Not good.


> Thank,
> Julio Sandoval Schwartzmann
> 
> 
> 
> -----Mensaje original-----
> De: Cook, Garry [mailto:GWCOOK at mactec.com]
> Enviado el: jueves, 26 de agosto de 2004 15:38
> Para: Sandoval, Julio
> CC: nagios-users at lists.sourceforge.net
> Asunto: RE: [Nagios-users] monitoring url
> 
> 
> I would not call that 'without success'. It appears as though
> the plugin
> now runs properly in both instances, and returns output.
> Compared to the
> failed execution that you saw before, I would call this 'limited
> success'. 
> 
> Now that the plugin is working, you need to figure out why it is not
> returning the output that you expect.
> It looks to me like the plugin is choking on the LOGIN command.
> 
> Read 'check_http --help' for further information on how this plugin
> expects arguments. The -a (authorization) flag might be of use to you.
> 
> I can't add much more help here, as I don't use this plugin
> to check any
> sites requiring login.
> 
> -g
> 
> 
> Sandoval, Julio wrote:
>> Thank,
>> I try the two alternatives, but without success.
>> In the fisrt case:
>>  root at monitorRH root]# /usr/lib/nagios/plugins/check_http -H achsnet
>> -I 192.168.0.16 -u
>> http://achsnet.achs.cl/ACHS2/SITIOWEB/INICIOV3.NSF/\(PARTIDA\)?O
>> PENAGENT&LOGIN  
>> 
>> ..the Reponse:  bash: LOGIN : command not found
>> HTTP WARNING: HTTP/1.0 404 Not Found
>> 
>> In the second case:
>> root at monitorRH root]# /usr/lib/nagios/plugins/check_http -H achsnet
>> -I 192.168.0.16 -u $USER5$ #with modified resource.cfg, including
>> $USER5$ = http://achsnet.achs.cl/ACHS2/SITIOWEB.....
>> 
>> Reponse: HTTP WARNING: HTTP/1.0 400 Bad Request
>> 
>> Thank for your help.
>> JSS
>> 
>>> -----Mensaje original-----
>> De: Cook, Garry [mailto:GWCOOK at mactec.com]
>> Enviado el: jueves, 26 de agosto de 2004 13:55
>> Para: Sandoval, Julio
>> CC: nagios-users at lists.sourceforge.net
>> Asunto: RE: [Nagios-users] monitoring url
>> 
>> 
>> Julio,
>> It looks like that URL argument is not interpreted correctly by the
>> plugin, due to the '(' and ')'.
>> Try using a backslash to escape the parens, like so: \(PARTIDA\)
>> 
>> If that doesn't work, you might want to try adding the URL to
>> a $USERx$
>> macro in the resource.cfg file, and then call the plugin like this
>> (where 'x' matches the number in resource.cfg):
>> 
>> root at monitorRH root]# /usr/lib/nagios/plugins/check_http -H achsnet
>> -I 192.168.0.16 -u $USERx$ PENAGENT&LOGIN
>> 
>> Hope this helps.
>> 
>> -g
>> 
>> Sandoval, Julio wrote:
>>> Thank,
>>> I run the followind command in RH9:
>>> root at monitorRH root]# /usr/lib/nagios/plugins/check_http -H achsnet
>>> -I 192.168.0.16 -u
>>> http://achsnet.achs.cl/ACHS2/SITIOWEB/INICIOV3.NSF/(PARTIDA)?O
>>> PENAGENT&LOGIN 
>> 
>> The system response:
>> bash: syntax error near unexpected token '('
>> 
>> I think that link is the problem. This link is Lotus Notes link.
>> 
>> I hope for yours comments.
>> 
>> Thank.
>> Julio Sandoval
>> CNA,MCP.
>> 
>> 
>> -----Mensaje original-----
>> De: Cook, Garry [mailto:GWCOOK at mactec.com]
>> Enviado el: Jueves, 26 de Agosto de 2004 13:26
>> Para: Sandoval, Julio; nagios-users at lists.sourceforge.net
>> Asunto: RE: [Nagios-users] monitoring url
>> 
>> 
>> Sandoval, Julio wrote:
>>> Hi everybody,
>>> 
>>> I have installed Nagios 1.2 in RH9.
>>> I'm trying to monitor a especific URL, but i have not been able....
>>> Well i hope for yours help . 
>>> 
>>> Thank
>>> Julio Sandoval
>> 
>> If you really want help, it would be a good idea to post some more
>> information. 
>> 
>> Eg.
>> What does your service template/command look like?
>> What is the result returned by the plugin from Nagios?
>> What is the result returned by the plugin when you run it from the
>> command line? Etc. 
>> 
>> Also, if you send your email in plain text instead of HTML,
>> more people
>> on the list will read it and possibly respond.



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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