In here we would need to change the command line arguments of the balena daemon: dockerd -H tcp://0.0.0.0:2376 -H fd:// --tlsverify=true --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem
How would we achieve this? If possible?
We are aware of the existence of telegraf, datadog, netdata, etc… which send data from the device towards a central cloud. However this is not how PRTG works, it instead collects metrics data from the devices (starting from the central cloud).
Step 2: create a container that will forward the unix socket to a tcp socket
create a container with the io.balena.features.balena-socket label, this will make the balenad socket available in the container at /var/run/balena.sock;
expose the tcp port 2376 in this container;
install socat in that container;
run socat like socat openssl-listen:2376,reuseaddr,fork,cert=xxx.pem,cafile=xxx.crt UNIX-CONNECT:/var/run/balena.sock (use the xxx.pem and xxx.crt files created in step1)
check you can connect to the tcp socket from another computer with: docker -H <balena device ip>:2376 --tlscert path/to/xxx.crt --tlskey path/to/xxx.key --tls info (use the xxx.crt and xxx.key files created in step1)