Prometheus port monitoring

Grafana v11.1.0 centos8.2
Prometheus port monitoring, I encountered a problem. There are 100 servers in the production environment, each with a Java application, and I need to monitor the application’s port.
Is there a way to achieve one-to-one correspondence between ports and service names, which can be displayed in Grafana.
Can I store another table for the service name after scanning the host port? Is it feasible to reference service names? I am very confused about this aspect.
It is also possible to separate the port and service name, as I will periodically scan the port, which will overwrite the configuration file and not affect the existence of the service name.

Yes you can…
It’s use blackbox_exporter.
In the blackbox_exporter you can check port using their type, such as http, tcp, ssh, pop, etc.
The trick is create specific job to each port using tcp_module of the blackbox_exporter, so, you can differentiate in the grafana from prometheus labels.

You can read at this URL GitHub - prometheus/blackbox_exporter: Blackbox prober exporter
If you need assistance, you can googling about blackbox_exporter, there’s a lots of discussion, solution and samples.

Regards,
Fadjar