Page 1 of 1

PORTS

Posted: Fri Jun 05, 2015 11:35 am
by ariarlet
How I can monitor ports on a server?

Thanks

Re: PORTS

Posted: Fri Jun 05, 2015 11:37 am
by tmcdonald

Re: PORTS

Posted: Mon Jun 08, 2015 8:53 am
by ariarlet
In nagios XI

Return: conection refused

Who are the arguments?

COMMAND: /usr/local/nagios/libexec/check_tcp -H $HOSTADRESS$ -p $ARG1$ $ARG2$
OUTPUT: Connection refused

Thanks

Re: PORTS

Posted: Mon Jun 08, 2015 9:20 am
by tmcdonald
All of the arguments are listed on the page I linked. For example, if you want to check port 2048 you would put that as ARG1.

Re: PORTS

Posted: Mon Jun 08, 2015 9:21 am
by ariarlet
COMMAND: /usr/local/nagios/libexec/check_tcp -H IP -p 80
OUTPUT: Connection refused

:(

Re: PORTS

Posted: Mon Jun 08, 2015 9:29 am
by jdalrymple
Are you sure that your host isn't broken?

Code: Select all

[jdalrymple@nagios libexec]$ ./check_tcp -H localhost -p 80
TCP OK - 0.001 second response time on port 80|time=0.001315s;;;0.000000;10.000000
[jdalrymple@nagios libexec]$ ./check_tcp -H localhost -p 81
Connection refused
[jdalrymple@nagios libexec]$ ./check_tcp -H 8.8.8.8 -p 80
CRITICAL - Socket timeout after 10 seconds
[jdalrymple@nagios libexec]$ ./check_tcp -H google.com -p 80
TCP OK - 0.020 second response time on port 80|time=0.020324s;;;0.000000;10.000000

Re: PORTS

Posted: Mon Jun 08, 2015 9:48 am
by ariarlet
sorry, my problem is that port 80 not open for nagios


For 5666 and 1521 that yes open. This run.

Thanks for you help, if you want, you can lock post