简体   繁体   中英

Azure App Service app service logs blob retention not working

Screenshot of Settings

I have configured my azure app service app service logs settings as above image attached.

As expected the logs are stored in Azure Blob storage but it is not deleting the log files even after retention period is completed.

Any solution will be helpful

APPROACH-1 :

Based on this MS Doc . It is possible with Azure blob storage lifecycle policy

  • Transition blobs from cool to hot immediately when they are accessed, to optimize for performance.
  • Transition blobs, blob versions, and blob snapshots to a cooler storage tier if these objects have not been accessed or modified for a period of time, to optimize for cost. In this scenario, the lifecycle management policy can move objects from hot to cool, from hot to archive, or from cool to archive.
  • Delete blobs, blob versions, and blob snapshots at the end of their lifecycles.
  • Define rules to be run once per day at the storage account level.
  • Apply rules to containers or to a subset of blobs, using name prefixes or blob index tags as filters.

APPROACH-2 : We can use Azure logic app to delete files older than X number of days from Azure Blob Storage .

For more information please refer this Microsoft Documentation: Blob rehydration from the archive tier

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM