locked
Query on Azure storage data mismatch RRS feed

  • Question

  • Hi All,

    I have created Internal module to monitor Azure storage Blob but seeing a data mismatch when we monitor using Get-AzureRmMetric

    Basically we have used two different approach to monitor Azure Storage CI

    1.       General purpose storage

    We are monitoring General purpose storage (Blob) by querying a storage table $MetricsHourPrimaryTransactionsBlob  which are lying in azure cloud but those table are hidden .

    Please find the example of saspectrumprotectddccifs.

    Below is the screenshot of saspectrumprotectddccifs table taken from storage explorer .

    We have executed  Azure storage command manually on windows machine to test whether there is any data mismatch in Azure portal & data fetched using Azure storage module but both shows same number of byte as TotalEgress .

    Please find the screenshot taken from storage explorer for storage saspectrumprotectddccifs at time PartitionKey: 20180111T0900 .

    PS C:\Users\Administrator> Invoke-IPwinCheck -Session $session -Command {Check-AzureStorage  -Warning 300 -Critical 500 -web_user xxxx -web_password xxxx -Name saspectrumprotectddccifs -groupname rg-SpectrumProtect -tableName '$MetricsHourPrimaryTransactionsBlob' -ColumnName RowKey -operator Equal -metricName TotalIngress -value 'user;All' -SubscriptionID xxxxxxxxx -ID 1}

    StdOut         : PartitionKey: 20180111T0900, AccessType & TransactionType: user;All, Name: TotalIngress, Value: 1038 | counter=1038;300;500

    StdErr         :

    Id             : 1

    RetCode        : 2

    PSComputerName : 10.7.254.50

    RunspaceId     : 502c257a-4256-4cbc-892c-744f8800b622

    1.       Blob Storage

                  We have used AzureRm cmdlets command Get-AzureRmMetric to get azure resource metric data as we cannot access azure storage table($MetricsHourPrimaryTransactionsBlob) when storage type is Blob storage.

                    Note : Get-AzureRmMetric does not query storage table to get metric of storage blob

         

                Please find the example of saspectrumprotectddc

               When we have executed  azure module  manually to get azure storage metric data using cmdlet (Get-AzureRmMetric). we found there was a difference in output between manual run and Azure portal

               Please find the output of manual run & screen shot of Azure portal for storage saspectrumprotectddccifs

    PS C:\Users\Administrator> Invoke-IPwinCheck -Session $session -Command {Check-AVMPerformance -vmName saspectrumprotectddc -resgrpName rg-spectrumprotect -MetricName Egress -Warning 105 -Critical 110 -web_userxxxxx -web_password xxxxx -timeGrain 01:00:00 -SubscriptionId xxxxx -ID 1}

    StdOut         : CRITICAL: Egress 53915237 Bytes exceeds threshold 110 at Time: 01/11/2018 11:42:00 | counter=53915237;105;110

    StdErr         :

    Id             : 1

    RetCode        : 2

    PSComputerName : 10.7.254.50

    RunspaceId     : 502c257a-4256-4cbc-892c-744f8800b623

    Can any one help me here to explain why the data difference when we are correctly following all the steps to retrieve data for azure storage using Get-AzureRmMetric.


     Thanks,

    Surya

    Thursday, January 11, 2018 2:08 PM

All replies

  • There are two scenarios. In the first scenario, you checked the metrics in Portal and the metrics from metric table with Azure Storage SDK and you got them matched. We recommend you do so for verification and if you prefer to use PowerShell, you can use PowerShell to read metric table directly.

    Based on the schema, you can refer the following guideline in using PowerShell against Table storage: https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-powershell

    In the second scenario while you checked the metrics in Portal and the metrics from Get-AzureRmMetric and you got them mismatched. This PowerShell command is NOT provided by Azure Storage team

    Get-AzureRmMetric PowerShell only supports non-multi-dimensional metrics today from Azure Monitor Metrics REST API.  I suspect this is likely the discrepancy that you are seeing between the Portal and PowerShell.

    Azure Storage Analytics is entirely separate.

    -----------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    Saturday, January 13, 2018 11:43 AM