11-16-2020 03:40 PM - edited 11-16-2020 03:41 PM
Hi,
When I run my query on Log Analytics it shows proper result but on dashboard it shows No data for the given query On Azure Dashboard
My query contain Ago.
my Query sample :
12-07-2020 09:19 AM
This was probably a question for the Azure Monitor forum, but in case you don't have an answer, Dashboards default to 24hrs, so you have to change the date on the dashboard to be > 8days so your query can find the data.
I didn't see the need for a Union (based on the query supplied) or the complex itemType, so I have simplified the query - ignore if this isn't required. Thanks
traces
//
| where timestamp between(ago(8d) .. ago(7d))
| extend itemType = iif(itemType == 'availabilityResult',itemType,iif(itemType == 'customEvent',itemType,iif(itemType == 'dependency',itemType,iif(itemType == 'pageView',itemType,iif(itemType == 'request',itemType,iif(itemType == 'trace',itemType,iif(itemType == 'exception',itemType,"")))))))
//
| where itemType in ( 'trace' ,'request','pageView','customEvent' ,'exception' ,'dependency' ,'availabilityResult')
//
| where message startswith 'Single_search_result_common-RCOM'
| project timestamp, message = case(message startswith 'Single_search_result_common-RCOM-true', 'R.com AVL', message startswith 'Single_search_result_common-RCOM-false', 'R.com NO AVL', 'unknown')
| summarize count() by message , bin(timestamp,1h)
| render timechart