Send metrics in 2 outputs

Hello,
I would like to send my telegraf metrics into 2 outputs which are: Prometheus and ElasticSearch (Kibana 5)
Is it possible? I try to configure my /etc/telegraf/telegraf.d/output.conf like that but my metrics are sent only in one

[[outputs.prometheus_client]]
    listen = ":9126"
    path="/metrics"


[[outputs.socket_writer]]
    address = "tcp://myclusteraddress:5005"

    keep_alive_period = "5m"

    data_format = "json"

Thank

You should be able to configure multiple outputs within Telegraf as you describe.

Can you confirm which plugin is working?

Are you receiving data at tcp://myclusteraddress:5005?

Can you view the Prometheus metrics by visiting the /metrics endpoint in your browser?

I am receiving data in my Kibana but for the prometheus metrics I can only reach them from the localhost

Try using http://0.0.0.0:9126 as the listen address in your Prometheus output configuration:

[[outputs.prometheus_client]]
    listen = "http://0.0.0.0:9126"
    path="/metrics"

This looks like an issue with your network or network configuration. Can you please share more details about your deployment environment? Are you using Docker? Kubernetes?

Yes, my bad sorry I forgot to disabled my firewalld …