Page 1 of 1

Check the URL with portnumber using check_http command

Posted: Fri Jul 18, 2014 1:07 am
by rashmi
Hi ,

I have problem checking the status of the websit which has port number is it

if i try below command

./check_http -H https://something:8016/abc/ it gives me error message as

Name or service not known
HTTP CRITICAL - Unable to open TCP socket

could you please let me know how can i solve this issue ?

Re: Check the URL with portnumber using check_http command

Posted: Fri Jul 18, 2014 9:55 am
by tmcdonald
You can specify the port with the -p flag like so:

Code: Select all

./check_http -H https://something/abc/ -p 8016
Pass just the --help flag to get full help output.

Re: Check the URL with portnumber using check_http command

Posted: Mon Jan 12, 2015 2:18 am
by rashmi
Hi ,

Giving command as mentioned by you gives me "Name or service not know" it is still not passing by however URL will be still reachable via Browser. I have tried increasing time out to 30 seconds that does not help to solve the error.

could you please advise ?

My command looks like this commands.cfg file

# 'check-https-nettv' (ssl) command definition
define command{
command_name check-https-nettv
command_line $USER1$/check_http -H $ARG1$ $ARG2$ -S -f follow -t 30 -A "xxxxxxxxxxxxx"
}

and my config file from where URLis monotired looks like this

# --- --- Banaxi Cyprus- ---

define host{
use nettv-host-production
host_name Banaxi Cyprus
display_name Banaxi Cyprus
address something.com
hostgroups DE, GR
}

define service{
use generic-service
host_name Banaxi Cyprus
check_command check-http-nettv!something.com!-u /index.xhtml -p 7020
}

actual URL http://something.com:7020/index.xhtml

Regards,
Rashmi

Re: Check the URL with portnumber using check_http command

Posted: Mon Jan 12, 2015 2:20 pm
by lgroschen
command_line $USER1$/check_http -H $ARG1$ $ARG2$ -S -f follow -t 30 -A "xxxxxxxxxxxxx"
What is the $ARG2$ reffering to in the above command? Also the '-S' flag uses default port 443 to connect via SSL, other options= (1 = TLSv1, 2 = SSLv2, 3 = SSLv3) so this could be part of the problem, unless you have default SSL settings.

One more thing what is being passed into -A? If its sensitive you can PM it to me, but the user agent is passed here. Just make sure its the correct http header for "User Agent" ie spelling on both sides.