Use docker-telegraf to collect procstat metrics from docker-app


I have a test docker stand, which contains of app container with /metrics endpoint, telegraf, influxdb and grafana containers. Telegraf extract metrics from app by using http inside of docker network. Now I want to extract information about file descriptors used by my app by using telegraf.procstat plugin. How can I monitor another container’s procstat with telegraf? I’m also considering building a single container with both app and telegram running, but still don’t know how I should do it. (Using inputs.docker don’t look like a solution, especially considering that I will use code later in non-docker production environment, where telegraf runs on the same machine as app instances.)