Re: [systemd-devel] What is the recommended way of announcing a TCP port?

2021-06-25 Thread John Ioannidis
On Tue, Jun 15, 2021 at 1:45 AM Mantas Mikulėnas wrote: > If you only care about processes on the same system – why not put the > actual socket in /run, as an AF_UNIX socket? That's mostly what /run is for. > I thought of that, but Prometheus cannot scrape AF_UNIX addresses. Thanks though,

Re: [systemd-devel] What is the recommended way of announcing a TCP port?

2021-06-25 Thread John Ioannidis
On Mon, Jun 14, 2021 at 9:29 PM Kevin P. Fleming wrote: > You might consider having systemd itself create the listening sockets > and then pass them into the service; if you did that, then systemd > would already know the port number that was allocated for the socket. > > I can't; a .socket unit

Re: [systemd-devel] What is the recommended way of announcing a TCP port?

2021-06-14 Thread Mantas Mikulėnas
If you only care about processes on the same system – why not put the actual socket in /run, as an AF_UNIX socket? That's mostly what /run is for. On Tue, Jun 15, 2021, 04:18 John Ioannidis wrote: > I have an instanced service that gets started and stopped by another > service: *alice.service

Re: [systemd-devel] What is the recommended way of announcing a TCP port?

2021-06-14 Thread Kevin P. Fleming
You might consider having systemd itself create the listening sockets and then pass them into the service; if you did that, then systemd would already know the port number that was allocated for the socket. On Mon, Jun 14, 2021 at 9:17 PM John Ioannidis wrote: > > I have an instanced service