log analytics - create alerts

Copper Contributor

Hello, I have created log analytics workplace and set up diagnostic settings.

I would like to create an alert that will be triggered everytime when a user/admin access the log analytics workplace. How can I do that ? Should I use query ? Is it possible to do that ? 

 

REgards,

Maciej

1 Reply
You could maybe use AzureActitvity and KQL for this, this is one sikple example and you will need to tune this as there could be a lot of messages.


AzureActivity
| where OperationNameValue startswith 'microsoft.operationalinsights/workspaces/'
| summarize count() by Caller, ActivityStatusValue, CallerIpAddress, Category