TLDR Simon needed help monitoring specific port reachability on different machines. Prabhat suggested using prometheus blackbox exporter or otel-collector, despite lack of experience with the original tool, telegraf. Simon prefers text instructions over video tutorials.
Is this from a security point of view where you want to cpature which ports are open on which machines?
A specific port on each machine, I wanna know if they're reachable.
Not really security, no.
I have never tried this with telegraf or observability tools
I have used `nmap` for this though which is the perfect tool for this kind of activity. Would that help you?
what is the goal of checking the reachability of the ports? health check of the application ?
Yup
there area a couple of ways to do this.
You can use prometheus blackbox exporter
you could also use otel-collector
Let me get you the right receiver for otel-collector
Looks like otel-collector only has an httpchecker
If you are looking for raw TCP then you can use prometheus blackbox exporter
Yeah, tcp, it's not an http endpoint.
Also available as text somewhere? I don't like videos.
not yet. But you should be able to use prometheus blackbox exporter documentation.
Aye, thanks
Is there a way to have a simple query for open port? prometheus expects a query/response directly, that's a bit much
And the readme
Simon
Tue, 26 Sep 2023 11:44:44 UTCI'm trying to monitor if a certain port is open, for various machines. What's the best way to achieve that? So far I'm experimenting with telegraf &_response,
```[[inputs.net_response]]
protocol = "tcp"
address = "192.168.1.1:5555"
timeout = "1s"
read_timeout = "1s"
[inputs.net_response.tags]
name = "Server"```
However, I'm not sure this is the best way to go about it, displaying the yes/no data is a bit tricky.