Open Q&A
If there's no good subforum for your question - ask it here!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shipping Beats/Logslash metrics to Dynatarec

henk_stobbe
DynaMight Leader
DynaMight Leader

Hello,

 

Who can help me here?  I want to send Beats/Logstash metrics to /api/v2/metrics/ingest

I can find a lot about logs and openpipeline but who knows how this is accomplished.

Maybe I am missing something or am I the first (-;

@Cbeecher 

KR Henk

 

7 REPLIES 7

t_pawlak
Leader

Hi,

The simplest approach is to use the Dynatrace Logstash output plugin.

It should work



https://www.elastic.co/docs/reference/logstash/plugins/plugins-outputs-dynatrace 
It was built exactly for this use case — it sends Logstash events directly to the Dynatrace Log Ingest API v2 (/api/v2/logs/ingest), so you don’t need to manually build HTTP requests or mappings.

Just install plugin on logstash instance:

bin/logstash-plugin install logstash-output-dynatrace

And add this in output in config:

output {
  dynatrace {
    url => "https://{environmentid}.live.dynatrace.com/api/v2/logs/ingest"
    api_token => "YOUR_TOKEN"
  }
}

henk_stobbe
DynaMight Leader
DynaMight Leader

Hi Pawlak,

Are you sure for metrics also?

KR Henk

Sorry,
I saw Logstash and immediately focused on logs, not metrics.
In this case, IMO you should use an OpenTelemetry Collector and send them via OTLP, which is probably the cleaner long-term approach.
I think a native Metricbeat --> OTLP/HTTP path here without an additional bridge is not possible

Hi @t_pawlak if that was not an option could you format the elastic JSON in to an http message and send to the Dynatrace API end point? Or is that a no go

Thanks

Caroline

Hi,
Technically, it’s possible, but is it worth it?
Dynatrace metrics ingest doesn’t accept raw JSON, so you first need to transform it into the Dynatrace metric ingestion format. It can be done with Logstash + HTTP output, but it requires custom mapping.
That’s also why I mentioned OpenTelemetry, it handles the transformation and protocol side for you, which makes it easier to maintain in the long run.

Featured Posts