Telegraf integration with Dynatrace

Hi everyone.
I’m trying to integrate Dynatrace as an input method for Telegraf, to read it’s metrics from Dynatrace’s API REST and output it’s measurements to InfluxDB.
I found the httpjson input plugin, but it only reads numeric values and Dynatrace post some of its measurements as strings.
I would like to know if httpjson is the plugin i’m really needing, or if there’s another alternative. (Including making my own plugin if it’s the only option).
I have searched on the forums and github for someone who tried to do the same but had no luck.
Thanks!

The httpjson input currently only supports collecting strings as tags, using the tag_keys option. Every point will need at least one field too, which will need to be a numeric type. Are you using the events feed?

Hi @daniel
Thanks for replying.

Im using Dynatrace’s Timeseries. I need to get the metrics posted on the API and post them into a database. Thats why i was trying to use Telegraf and InfluxDB. But i had no luck with the httpjson plugin, i can’t make it work. I also couldnt find any examples to maybe check if what im doing is right in the first place.

Based on these docs, I think you would either need to write a custom plugin or an exec script.

Good morning Daniel:

We’ve succeeded reading metrics of Dynatrace REST API with Exec Plugin, now we are facing a different issue. We need to do an HTTP POST from Dynatrace to Telegraf, and we thought HTTP_Listener plugin was the correct plugin to do this. Using Postman, when we do a POST request to “host”:8186/write with a JSON Body, we get a “400” response: “bad request”. With a GET request, we get a “204” response: “no content”.

Is HTTP_Listener the correct plugin for this integration?
Any ideas of what are we doing wrong?

Thank you in advance,

Ignacio from Performen

The http_listener plugin only accepts data in line protocol format, it was named early in Telegraf’s development and we would probably name it influxdb_listener today. Unfortunately we don’t have a plugin that listens over HTTP and accepts any supported data_format today, but there is an issue open that you can watch for updates.

Thank you Daniel for all your replies!