2

The run feature seems to be disabled for me when I go to the Logs tab in the Azure Portal in Cosmos db. I have been meaning to run the built in query to get the top queries by consumed RSU units.

Also, I have enabled the "Full-text query" feature in the diagnostic setting tab. Is there anything else that I need to do. Am I missing some access.

To give some context, we have been getting Alerts that we put in to warn us when the cosmos db total request is high. I wanted to investigate this issue further.

Here are some screenshots from diagnostic settings tab and logs tab. enter image description here

enter image description here

Thanks.

dove
  • 20,469
  • 14
  • 82
  • 108
Aragon
  • 43
  • 3
  • Enabling Full-text search should not have any impact running the queries through Logs. Could you please clarify if you are not receiving any result or is the Run button itself is disabled? If possible, please add the screenshot for better clarity. – AnuragSharma-MSFT Jan 24 '22 at 07:21
  • Hi Anurag, thank you for taking a look. I have added some screenshots. The run button itself is disabled. – Aragon Jan 25 '22 at 15:57

1 Answers1

1

Under the Diagnostic Settings tab in portal you will get a splash screen about either enabling or disabling full-text query as you note.

Beneath this you should see a Not Now button, click it. Then you you will be able to "Add a diagnostic setting". In your case DataPlaneRequests and QueryRunttimeStatistics would be a good start. "Send to Log Analytics workspace" and it is more cost effective to write to a Resource Specific destination table (so instead of your queries using AzureDiagnostics they would use CDBQueryRuntimeStatistics or the like).

Here is a good reference for some resource specific queries https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/diagnostic-queries?tabs=resource-specific

dove
  • 20,469
  • 14
  • 82
  • 108