PORTS

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

PORTS

Post by ariarlet »

How I can monitor ports on a server?

Thanks
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: PORTS

Post by tmcdonald »

Former Nagios employee
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: PORTS

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: PORTS

Post 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.
Former Nagios employee
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: PORTS

Post by ariarlet »

COMMAND: /usr/local/nagios/libexec/check_tcp -H IP -p 80
OUTPUT: Connection refused

:(
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: PORTS

Post 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
ariarlet
Posts: 61
Joined: Wed Apr 22, 2015 11:04 am

Re: PORTS

Post 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
Locked