What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Monitoring closed ports?

Votes:

0

Hi there,

I want to set up a sensor to monitor that a particular port on our remote system is closed, so I thought of using the Port Sensor as it has the different goals setup (port open or closed).

I noticed that the sensor is returning the same result in case the connection is refused (i.e. the port is closed) and in the case when the server cannot be reached. Surely the two scenarios are different and the sensor should take in consideration the response from the server (or a timeout in case the server is down altogether).

Am I missing something obvious? Any thoughts?

Many thanks

Mike

port prtg8 sensor

Created on Dec 6, 2019 3:55:58 PM



3 Replies

Votes:

0

Hello Mike,

If the port is closed, the sensor should show the error message "connection refused".
If the target server cannot be reached, the error message should be "Host not found".

It shouldn't be the same error message here, however in both cases the sensor will go into an error (red) status. You can also use an additional ping sensor to monitor if the server is reachable. Using dependencies, the port sensor can automatically be paused as soon as the server (ping sensor) isn't reachable anymore.

Kind Regards,
Timo Dambach
Paessler Tech Support

Created on Dec 9, 2019 9:16:50 AM by  Timo Dambach [Paessler Support]



Votes:

0

Hi Timo,

many thanks for your reply.

My issue is that, for security reasons that are outside my control, I cannot ping the server.

The only way I can check that the server is up and running is to try to connect to a specific port number and get a connection refused message, which will indicate that the server is up and running.

So, to achieve this, I thought that I could use the Port Sensor and set it to use the goal of "closed" to indicate that the port is reachable. That works fine in normal operations and PRTG displays the port as available.

The problem is that in case the server is not reachable, the sensor is still indicating the port as available because it treats the two errors ("connection refused" and "host not found") the same and thinks the port is still available (i.e. it marks it as closed).

I cannot find a way to change the logic of the sensor according to the error message ("connection refused" = Available/Up, "Host not found" = Unavailable/Down) - any suggestions regarding how to achieve this?

Any thoughts?

Many thanks

Mike

Created on Dec 9, 2019 9:47:10 AM



Votes:

0

Hi Mike,

In this case the sensor will indeed treat both errors the same and the sensor will be displayed as green/ok. I'm afraid this behavior cannot be changed. However Is there any open port on your target server? If so you could monitor this port and switch the goal in the sensors setting to "Open" in order to monitor the availability of your target server.

Created on Dec 9, 2019 12:23:35 PM by  Timo Dambach [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.