@John Sebastian Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
Monitoring Archive storage capacity
Monitoring Archive total usage : With Storage metrics, you can gain the capacity statistics on storage account level. For Archive storage, you can use BlobCapacity and BlobCount in conjunction with BlobTier dimension equal to Archive. With Azure Portal, you can:
- Go to Portal > Storage Account > Metrics
- Select Blob in Metric Namespace and select Blob Capacity in Metric
- Click “Add metric” and add a metric in the same chart
- Select Blob in Metric Namespace and select Blob Count in Metric
- Click “Add filter” and add a dimension to filter
- Select Blob Tier in Property and select Archive in Values
The following is an example of monitoring Archive usage with above steps:
If you need to analyze with metric data, you can use Azure Monitor metrics API/Powershell/CLI to read metric data. See more in Monitoring Azure Blob Storage - Accessing metrics.
Monitoring Archive usage on container level
As Storage metrics are aggregated on storage account level, it won’t work for you if you need deeper level insights, for example, usage on container level. Storage Inventory captures comprehensive blob properties including AccessTier and Content-Length. You import inventory data to any analytics solutions, and aggregate total count and total size based on these two properties on container level.
With Azure Synapse Analytics, you can:
- Enable inventory and setup Azure Synapse Analytics based on guideline.
- Run the following SQL Query SELECT LEFT([Name], CHARINDEX('/', [Name]) - 1) AS Container, COUNT(CASE WHEN [AccessTier] = 'Archive' THEN 1 END) As ArchiveTierBlobCount, SUM(CASE WHEN [AccessTier] = 'Archive' THEN [Content-Length] END) As ArchiveTierBlobSize FROM openrowset(
) AS Source GROUP BY LEFT(Name, CHARINDEX('/', [Name]) - 1)bulk 'https://{YourStorageAccountName}.blob.core.windows.net/inventory/2021/09/07/21-58-19/DefaultRule-AllBlobs.csv', format='csv', parser_version='2.0', header_row=true
You can see the aggregated usage per container. The following is an example:
Monitoring Archive early deletion applicable usage
Blob that is moved to the Archive tier is subject to an Archive early deletion period of 180 days. You may need to monitor the usage in such cases to prevent early deletion charges. Storage Inventory captures comprehensive blob properties including AccessTier, Content-Length and AccessTierChangeTime. You can import inventory data to any analytics solutions, and aggregate total count and total size for blobs that are within 180 days since last archiving time.
With Azure Synapse Analytics, you can:
- Enable inventory and setup Azure Synapse Analytics based on guideline.
- Run the following SQL Query SELECT LEFT([Name], CHARINDEX('/', [Name]) - 1) AS Container, COUNT(CASE WHEN [AccessTierChangeTime] < DATEADD(day, -180, GETDATE()) AND [AccessTier] = 'Archive' THEN 1 END) As EarlyDeletionApplicableCount, SUM(CASE WHEN [AccessTierChangeTime] < DATEADD(day, -180, GETDATE()) AND [AccessTier] = 'Archive' THEN [Content-Length] END) As EarlyDeletionApplicableSize FROM openrowset(
) AS Source GROUP BY LEFT(Name, CHARINDEX('/', [Name]) - 1)bulk 'https://{YourStorageAccount}.blob.core.windows.net/inventory/2021/09/07/21-58-19/DefaultRule-AllBlobs.csv', format='csv', parser_version='2.0', header_row=true
- The archive tier has a minimum charge of 180 days storage, You can adjust above based on your file patterns and price per selected region.
In addition to the per-GB, per-month charge, any blob that is moved to the Archive tier is subject to an Archive early deletion period of 180 days. Additionally, for general-purpose v2 storage accounts, any blob that is moved to the Cool tier is subject to a Cool tier early deletion period of 30 days. This charge is prorated. For example, if a blob is moved to the Archive tier and then deleted or moved to the Hot tier after 45 days, the customer is charged an early deletion fee for 135 (180 minus 45) days of storage in the Archive tier.
- Azure storage offers different access tiers, which allow you to store blob object data in the most cost-effective manner. See more in Azure Storage blob tier. The supported values include:
See Monitoring Azure Storage(Capacity metrics) for details on collecting and analyzing monitoring data for Azure Storage.
For more information on outbound data transfer charges, see Data Transfers Pricing Details.
Please let us know if you have any further queries. I’m happy to assist you further.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Please do not forget to and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.