I have a service that exposes metrics in statsd format and telegraf instance which picks those metrics and sends them to both Prometheus and Datadog (there are two output plugin configurations for both of these). This works correctly. However, I have a special requirement where I would need to filter certain metrics that will be sent to Datadog. My first inclination was to make change in [[outputs.datadog]] section of telegraf.conf. However, I don't see any specific configuration part where I could, for example, list just metrics that I need to be seen on Datadog.
Is there any way to achieve this?
Thanks.
According to the documentation, this can be achieved using following properties in telegraf.conf:
[[outputs.datadog]]
apikey = "<datadog api key>" # required.
namepass = ["metric_1","metric_2"...etc.]
https://docs.influxdata.com/telegraf/v1.12/administration/configuration/#measurement-filtering
where namepass defines pattern list of points which will be emitted.