Monitoring TCP connection/port to other remote hosts from my monitored host (running check_mk_agent)

I am working on migrating some old, mostly manual monitoring scripts to CMK and I got stuck trying to add a simple TCP connection or just some remote machine’s port availability monitoring.

Looking around the docs I think this is the closest to what I want

but this is, as far as I can tell, monitoring the monitored host’s own ports, basically the netstat command.

I know I could rewrite my bash script (it is pretty much just a grepped output of a netcat command like nc -vz 1.2.3.4 1234), but I was wondering if there is any native solution/service/plugin I could choose instead.

check_tcp would be a good fit here. You can use MRPE to run the TCP check from Host A towards Host B.
The TCP check on Host A will be executed by the Checkmk agent.

2 Likes

Thats not how it works. An Active is run on the checkmk server and is targeting the server(s) you have for the rule and will do exactly what you want

1 Like