17 Sep 2021 07:06 AM - last edited on 21 Aug 2024 10:03 AM by Michal_Gebacki
Hi All,
We have one 3rd party tool which is tool have REST API capability, Now we want push metrics to Dynatrace using the 3rd party tool REST API.
Is there any way we can Do it.
I saw we have Metric ingestion methodes using Dynatrace API https://www.dynatrace.com/support/help/shortlink/metric-ingestion , But this case we have API from 3rd party tool.
Please provide any suggestions.
Regards,
Venkat
Solved! Go to Solution.
17 Sep 2021 07:17 AM
Hello @VenkataSainath ,
you have several options:
It depends on the particular use case. Pulling from REST API is not (yet) available, but it's on the roadmap as far as I know.
17 Sep 2021 07:27 AM
Thanks you so much for inputs.
And one more option I have here, We have installed oneagent in the target server and here we need Capture more metrics which was not captured By one agent.
In the Case which method Metric ingestion can be used , If any examples of available Please suggest us.
and I went through the https://www.dynatrace.com/support/help/shortlink/metric-ingestion#anchor_local, But still not yet clear.
If you can provide any examples that would be great
Regards,
Venkat
17 Sep 2021 08:38 AM
Yes, for metric ingestion you can also use the local port on OneAgent (typically localhost:14499) or use the oneagent ingest tool available with oneagent. The advantage here is, that you don't need any authorization (Api-Tokens) for sending metrics to Dynatrace. It's probably the best way to ingest the metrics in your case.
You can also create a OneAgent extension and send metrics using the extensions (that's similar to the ActiveGate extension), but the OneAgent extension can bind metrics only to the host itself.
17 Sep 2021 09:35 AM
@Julius_Loman Thanks For your inputs, Could you please provide if any examples are available.
Regards,
Venkat
17 Sep 2021 11:01 AM
One advantage of using ingestion through OneAgent is that you have a free-tier of metrics, which will not exist if you do it through the API:
https://www.dynatrace.com/support/help/shortlink/metric-cost-calculation#included-metrics-per-host-u...
17 Sep 2021 11:55 AM
Hi,
That's actually not an advantage. If you use the metric ingest and assign the metric to a host/process it will first use the free tier metrics.
Mike
20 Sep 2021 06:50 AM
Hi @Julius_Loman ,
Thanks for your information, Today I went Through the OneAgent metric API Document, Once I have Prepared Curl Command , How i need schedule the Command and here the content type is text \Plain.
https://www.dynatrace.com/support/help/shortlink/local-api#example
Could you please provide your inputs here .
Regards,
Venkat
20 Sep 2021 07:09 AM
@VenkataSainath you can one the dynatrace_ingest instead of curl.
For scheduling - it's up to you... use infinite loop in script, cron scheduler, systemd unit (if you are on Linux).
22 Sep 2021 06:20 PM
Hi All,
Thanks for updates,
As per Metrics V2 in Documentation we can able push the Data only in "text" format, In our case , the data which we need to push the metrics to Dynatrace available in Json Format.
Any suggestions for pushing the Data in json format
Venkat
22 Sep 2021 10:05 PM
How does your JSON format look like? You can use utils such as jq or any scripting language to transform the metrics to the line protocol accepted by Dynatrace. Actually, it's very similar to the InfluxDB line protocol.