Aug 31 2018
07:12 AM
- last edited on
Apr 07 2022
05:27 PM
by
TechCommunityAP
Aug 31 2018
07:12 AM
- last edited on
Apr 07 2022
05:27 PM
by
TechCommunityAP
I am trying to add a line into a time chart. The time chart looks at a metric across all stream analytics jobs in the azure metrics table. Each job is represented by a line. I would like to add an artificial threshold line at metric=900 so that it is clear when a job passes 900 or is under 900. Here is a snippet from the table I am querying.
AzureMetrics
| where ResourceProvider == "MICROSOFT.STREAMANALYTICS"
| where MetricName contains "WatermarkDelay"
| project Resource, ResourceGroup, Maximum, MetricName, TimeGenerated
| summarize WatermarkDelay = max(Maximum) by Resource, bin(TimeGenerated, 15m)
I have tried joins of many kinds as well as unions with this constructed table below. I've also played around with moving the summarize statement into both queries and just one or the other. The two queries output tables of the same schema, if I could just concatenate the tables then I could graph the new table and solve the problem.
Constructed table with unique TimeGenerated values:
AzureMetrics
| where ResourceProvider == "MICROSOFT.STREAMANALYTICS"
| where MetricName contains "WatermarkDelay"
| where Resource == "AMSALERTSERVICEMODE"
| extend Maximum = 900
, Resource = "ams_Test"
| project Resource, ResourceGroup, Maximum, MetricName, TimeGenerated
Thank you!
Aug 31 2018 05:35 PM
AzureMetrics
| where ResourceProvider == "MICROSOFT.STREAMANALYTICS"
and MetricName contains "WatermarkDelay"
| summarize WatermarkDelay = max(Maximum), Threshold = 900 by Resource, bin(TimeGenerated, 15m)
This will produce two time series. One called WaterMarkDay and the other Threshold with a constant value of 900 for every time.
Sep 04 2018 11:15 PM
SolutionThis is already documented with lesson:
https://docs.microsoft.com/en-us/azure/log-analytics/query-language/charts#reference-line
Sep 04 2018 11:15 PM
SolutionThis is already documented with lesson:
https://docs.microsoft.com/en-us/azure/log-analytics/query-language/charts#reference-line