Monitoring TCP port locally

Hello,

is it possible to check an TCP port locally from within the monitored machine?
In a way a local check…

Regards
CheckMan

yes it is what have you checked ?

I tried the check under Setup > Services > HTTP, TCP, Email, … > Check TCP port connection
But this is not a local check.

What do I need to do to check it locally?

Looks like I did not read properly, I thought you meant locally from the monitor server (not machine)

If your machines ar linux you can copy check_tcp (The active check) as run it as MRPE
Alternative you can write your own check using things like ncap/nmap etc.

1 Like

Hi,

you can write a simple local check with Powershell.

Test-NetConnection [FQDN/IP Address] -Port [port number]

The Rest are five lines of Code…

1 Like

I had this same need some time ago and I`ve created a local script using Test-NetConnection cmdlet on PowerShell.

You can also use this check_tcp.exe binary from Nagios exchange and run this as an MRPE check

If you want to use the bakery, then deploy the exe as a custom file.

Thanks all. check_tcp locally on Linux will do the trick.