Re: [Nagios-users] check_http with spaces problem

2013-05-09 Thread Claudio Kuenzler
> > If I use -R "Web" the response is ok but if i use -R "Web somethin" it > returns error! > Because the pattern needs to exist in the source code. ./check_http -H granma.gr -u /index.html -R "Web somethin" HTTP CRITICAL: HTTP/1.1 200 OK - pattern not found - 4342 bytes in 0.126 second response

Re: [Nagios-users] check_http with spaces problem

2013-05-09 Thread Κοκμάδης Δημήτριος
Thank you for the answer, The problem doesn't seem to be at the url but at the -R option If I use -R "Web" the response is ok but if i use -R "Web somethin" it returns error! 2013/5/9 Claudio Kuenzler > > Sun May 5 22:29:03 EEST 2013 /usr/lib64/nagios/plugins/check_http -H >> granma.gr -u htt

Re: [Nagios-users] check_http with spaces problem

2013-05-09 Thread Claudio Kuenzler
> Sun May 5 22:29:03 EEST 2013 /usr/lib64/nagios/plugins/check_http -H > granma.gr -u http://granma.gr/index.html -R "Web " -w 10 -c 20 > Name or service not known HTTP CRITICAL - Unable to open TCP socket > You have to break up the -u argument. -u expects the path, not the complete URI. So in thi

Re: [Nagios-users] check_http with spaces problem

2013-05-05 Thread Κοκμάδης Δημήτριος
Thank you for the replies. I tried to use all these before asking! By the check_debug.sh Sun May 5 22:29:03 EEST 2013 /usr/lib64/nagios/plugins/check_http -H granma.gr -u http://granma.gr/index.html -R "Web " -w 10 -c 20 Name or service not known HTTP CRITICAL - Unable to open TCP socket If i

Re: [Nagios-users] check_http with spaces problem

2013-05-05 Thread Páll Guðjón Sigurðsson
Put your ARG in quotes. So it looks like this: $USER1$/check_http -H '$ARG1$' -s '$ARG2$' -w 10 -c 20 Then it will handle spaces. Alternatively, you can use custom variables to a check command that is more complex, but in return your service definitions will become much more readable. Example

Re: [Nagios-users] check_http with spaces problem

2013-05-05 Thread Sunil Sankar
Please put it within quotes , that should help On Sun, May 5, 2013 at 8:53 PM, Κοκμάδης Δημήτριος wrote: > Hi, > > I am trying to check multiple http sites, so i configure a bash script > which create the service definition but i faced a problem when the expected > string has spaces. > > So the