Purge table data in Log Analytics Workspace forever stuck in pending state using Azure REST API

Nayan Das 71 Reputation points

I tried purging Heartbeat and ContainerLog table data in my Log Analytics Workspace (linked to my AKS cluster) and the task is forever in pending state. I am checking for the status of purge task using the x-ms-status-location header returned on POSTing the purge request. I am using this REST API.

Please help me here to reduce the cost of our logs.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,786 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 19,686 Reputation points

    Hi @Nayan Das

    Welcome to Microsoft Q&A! Thanks for posting the question.

    This might happen when the query/parameters used is incorrect. Do you still see that the operation has not been completed using query in Log Analytics Workspace (i.e., the records that needed to be removed are still present)?

    Also, please check the "Activity logs" for the targeted workspace. It should contain the operation details along with failure information, if any.

    Please let me know if you have any questions.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.