31 Dec 2024
01:39 PM
- last edited on
07 Jan 2025
09:46 AM
by
MaciejNeumann
Hello all. Happy New Year's Eve.
Currently we have an on-prem Dynatrace solution, that also connects up to our Azure cloud presence.
Within our Azure instance we see several cloud services such as Blob Storage, App Insights, etc. as well as App Services and several Storage account services and 1 Event Hub. This was all added with the use of the manage services options.
I know that within Dynatrace, all this data is presented based upon what Dynatrace discovers.
However, I am wanting to know if there is an option to target a specific metrics or services that perhaps are not discovered by default with the connection to Azure.
Suppose there is a metric in Azure that I want to target and collect specifically, how can this be done if it is not discovered automatically or listed within the "manage services" list?
Is this done from a command line? How would the metrics be added into Dynatrace so the Dynatrace API could be used to call this value later on? Are there any examples of this done?
At the end of the day, I'm trying to find a way to specifically target a metrics in Azure, store it in Dynatrace, and then call it back with the use of the Dynatrace API.
Thanks to the community for all your help !
Solved! Go to Solution.
31 Dec 2024 07:32 PM
You can always send in your payload via a metric stream so if a metric isn't present out of the box you can target it directly via the stream.
https://docs.dynatrace.com/docs/shortlink/stream-analytics
01 Jan 2025 08:51 PM
@runatyr be sure to check https://docs.dynatrace.com/docs/shortlink/azure-monitoring-guide#create-monitoring-configuration - the built-in integration scrapes metrics for Azure services. New services and metrics are added regularly. If there is by any chance a metric in Azure monitor which is not available in Dynatrace, you have to scrape it by different means. For such purpose, we developed internally a Dynatrace Extension which allows you to scrape data by running KQL queries and ingest them as metrics or log events in Dynatrace. With this method, we can even have metrics in Dynatracre from other data types in Azure monitor such as traces or logs. Reach out to me if you are interested, the extension is not in the HUB.
15 Jan 2025 03:56 PM
Thanks Julius.
Your solution aligns with what we are trying to achieve.
Let me know how I might see or access the extension you mentioned above (running KQl queries)
-runatyr
15 Jan 2025 07:29 PM
@runatyrIt's an Extension 2.0, I believe you will have a pretty good example in the screenshots:
First you define your azure credentials / tenant / proxy and you can add queries:
For each query you can specify the workspace where this will be executed, the KQL query itself and the interval for execution:
Query itself returns a "table" and you can define metric extraction rules. Extension then creates a Dynatrace metric with the given metric key (this example is from a lab, so the metric key is dummy) and you specify the actual column name fro the metric value. Additionally, you can specify metric dimensions - values from other columns from the KQL result which are added to the metric:
Furthermore, you can optionally send the each query response as log lines to Dynatrace. This is useful if the response is not a metric, but a text instead. You can then see the responses as regular log entries in Dynatrace in the Log analytics.
I hope this helps. Basically, data from any KQL response that can be executed in an analytics workspace can be sent to Dynatrace as metrics or log lines. The extension itself uses Azure SDK to access the required Azure APIs.
Would this solve your case?
21 Jan 2025 03:52 PM
Thanks Julius. I have never used a custom extension before. I have the basic Azure monitor set up in Dynatrace. How do I go about creating/accessing the extension you showed above?
When I looked at the name I in the images above I saw in the ribbon:
Dyantrace Hub>> Extensions 2.0 in your Environment>>custom::azure-log-metrics.
How do I access this extension (or do I have to re-create it?)
Thank you so kindly. This is new to me.
06 Feb 2025 10:46 AM
Hi @Julius_Loman ,
I have to monitor Pacemaker cluster in Azure and to create all relevant alerts.
Prometheus exporter is already installed on every node by default as far as I can see from this document:
https://learn.microsoft.com/en-us/azure/sap/monitor/provider-ha-pacemaker-cluster
I have a URL for node: http://ipaddress:9664/metrics that is accessible and I can see the metrics, but I am wondering how to get them in Dynatrace.
Looking at this article: https://www.dynatrace.com/news/blog/simplify-observability-for-all-your-custom-metrics-part-4-promet... sme configuration needs to be changed for the Prometheus and to configure the link for Dynatrace.
Do you have any experience with this?
07 Feb 2025 01:03 AM
Hey @danijela ,
I don't have direct experience with pacemaker. However, since you have metrics exported by a Prometheus exporter, you can create a Dynatrace extension which uses the Prometheus data source https://docs.dynatrace.com/docs/shortlink/prometheus-extension
If you don't have any experience with writing extensions, I recommend using Vscode for that. A tutorial here https://youtu.be/Qy4Ge8HIzEk?si=BRRyZpOC6E5dn4Jr
07 Feb 2025 07:31 AM
Thanks.
So the only solution is custom extension? Those metrics we can get like Azure metrics using Dynatrace resource?
07 Feb 2025 01:54 PM
@danijela if it's available in Azure Monitor, then you can pull it using the built-in Azure interaction or by the extension mentioned. If it's only the Prometheus exporter and it's not in Kubernetes environment, a custom extension is needed.