1
votes

How can i perform delete operation on custom log in azure log analytics ? ex : DemoExample_CL enter image description here

I can delete it when create one in Advanced settings>Data>Custom Logs, but when i use "Log Analytics Data collector API", it did not show up.

2

2 Answers

2
votes

AFAIK, this is currently unsupported.

Similar feedback shown here -> (https://feedback.azure.com/forums/267889-log-analytics/suggestions/16434184-delete-custom-logs-sended-by-http-data-collector-a) was shared directly with the responsible Azure feature team. I recommend navigating to the above link and clicking the vote button to raise visibility and priority on this (or) you may raise another feedback which clearly states that you are looking for a feature which helps to 'delete custom log type that is created by Log analytics Data Collector API'.

Just a side note, if you want to delete only content under particular log type then you may try this -> https://docs.microsoft.com/en-us/azure/azure-monitor/platform/personal-data-mgmt#delete purge API. Also please note that this API must not be treated as general-purpose data delete API, but used for GDPR purposes only.

Hope this helps!! Cheers!!

0
votes

I managed to do it following the documentation here:
https://docs.microsoft.com/en-us/rest/api/loganalytics/workspacepurge/purge

You can click on "Try It", then you will have to login, provide the name of resource group, workstation name and table name and it will do the trick.

Not ideal, but at least it's possible somehow.