SOLVED

How to delete table under CustomLogs ingested using HTTP Datacollector API?

%3CLINGO-SUB%20id%3D%22lingo-sub-327788%22%20slang%3D%22en-US%22%3EHow%20to%20delete%20table%20under%20CustomLogs%20ingested%20using%20HTTP%20Datacollector%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-327788%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHow%20to%20delete%20the%20customLog%20table%20%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20created%20a%20custom%20log%20table%20using%20HTTP%20Datacollector%20API.%20How%20do%20I%20delete%20the%20table%20later%3F%3C%2FP%3E%0A%3CP%3EI%20even%20could%20not%20see%20my%20custom%20log%20table%20under%20Advanced%20settings%20-%26gt%3B%20Data%20-%26gt%3B%20Custom%20Logs.%3C%2FP%3E%0A%3CP%3EHowever%20I%20can%20query%20on%20the%20custom%20log%20table%20in%20Log%20search.%3C%2FP%3E%0A%3CP%3EAlso%2C%20What%20is%20the%20retention%20policy%20of%20the%20data%20ingested%20using%20HTTP%20Datacollector%20API%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-327788%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-328002%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20delete%20table%20under%20CustomLogs%20ingested%20using%20HTTP%20Datacollector%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328002%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EFirst%20the%20retention%20policy%20of%20custom%20data%20is%20the%20retention%20policy%20of%20any%20data%20in%20your%20Log%20Analytics%20workspace.%20By%20default%20workspace%20have%20retention%20of%2031%20days%20but%20that%20is%20configurable%20setting%20so%20it%20depends%20on%20what%20you%20have%20changed%20it%20to%20if%20you%20had%20at%20all.%20You%20can%20remove%20the%20custom%20log%20from%20Log%20Analytics%20blade%20-%20%26gt%3B%20Advanced%20Settings%20-%20%26gt%3B%20Data%20-%26gt%3B%20Custom%20Fields.%20There%20you%20can%20see%20all%20your%20custom%20fields%20for%20your%20custom%20log%20data.%20Once%20you%20remove%20the%20custom%20fields%20for%20the%20custom%20log%2C%20when%20you%20query%20the%20custom%20log%20you%20will%20get%20only%20records%20with%20Time%20Generated.%20Deleting%20data%20from%20Log%20Analytics%20is%20also%20possible%20but%20be%20careful.%20Read%20the%20instructions%20carefully%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Fpersonal-data-mgmt%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Fpersonal-data-mgmt%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20menu%20that%20you%20are%20describing%20is%20for%20custom%20logs%20feature%20but%20not%20for%20logs%20from%20Ingestion%20API.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2108313%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20delete%20table%20under%20CustomLogs%20ingested%20using%20HTTP%20Datacollector%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2108313%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F263110%22%20target%3D%22_blank%22%3E%40Vino55%3C%2FA%3E%26nbsp%3BThis%20has%20bothered%20me%20for%20years%2C%20and%20surprise%20-%20MS%20quietly%20added%20an%20API%20for%20this%20last%20March%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Floganalytics%2Fdata%2520collector%2520logs%2520(preview)%2Fdelete%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Floganalytics%2Fdata%2520collector%2520logs%2520(preview)%2Fdelete%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Hi,

 

How to delete the customLog table ? 

I have created a custom log table using HTTP Datacollector API. How do I delete the table later?

I even could not see my custom log table under Advanced settings -> Data -> Custom Logs.

However I can query on the custom log table in Log search.

Also, What is the retention policy of the data ingested using HTTP Datacollector API?

 

Thanks.

 

2 Replies
Best Response confirmed by Stanislav Zhelyazkov (MVP)
Solution

Hi,

First the retention policy of custom data is the retention policy of any data in your Log Analytics workspace. By default workspace have retention of 31 days but that is configurable setting so it depends on what you have changed it to if you had at all. You can remove the custom log from Log Analytics blade - > Advanced Settings - > Data -> Custom Fields. There you can see all your custom fields for your custom log data. Once you remove the custom fields for the custom log, when you query the custom log you will get only records with Time Generated. Deleting data from Log Analytics is also possible but be careful. Read the instructions carefully:

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/personal-data-mgmt

 

The menu that you are describing is for custom logs feature but not for logs from Ingestion API.

@Vino55 This has bothered me for years, and surprise - MS quietly added an API for this last March: https://docs.microsoft.com/en-us/rest/api/loganalytics/data%20collector%20logs%20(preview)/delete