EN
Bu içerik dilinizde bulunmamaktadır ancak İngilizce sürümüne buradan bakabilirsiniz.
0 / 1 bunu faydalı olarak değerlendirdi - Bu konuyu değerlendir

Enabling and Configuring Storage Analytics

This topic describes how to enable and configure Storage Analytics for a storage service.

Enabling Storage Analytics

To enable Storage Analytics for your storage account, you must call the Set Blob Service Properties (REST API), Set Table Service Properties (REST API), or Set Queue Service Properties operation. These operations must be called for the applicable storage service to enable Analytics. For example, to enable Analytics for the Blob and Table services, you must call both the Set Blob Service Properties (REST API) and Set Table Service Properties (REST API) operation.

The following example will enable Storage Analytics for the Table service of a fictional account named myaccount.

  1. Configure your request URI and headers to match the following examples. The HTTP method is PUT, and you must apply an authentication scheme to sign the request. For more information about signing your request, see Authentication for the Windows Azure Storage Services.



    PUT https://myaccount.table.core.windows.net/?restype=service&comp=properties HTTP/1.1
    x-ms-version: 2011-08-18
    x-ms-date: Tue, 27 Aug 2011 04:28:19 GMT
    Authorization: SharedKey
    myaccount:Z1lTLDwtq5o1UYQluucdsXk6/iB7YxEu0m6VofAEkUE=
    Host: myaccount.table.core.windows.net
    
  2. Your request also needs a request body, consisting of XML that the storage service will process and use to configure Storage Analytics. The following example enables logging for delete and write requests and sets a retention policy of 7 days. It also enables metrics, excludes API-level summary statistics, and sets a retention policy of 7 days.



    <?xml version="1.0" encoding="utf-8"?>
    <StorageServiceProperties>
        <Logging>
            <Version>1.0</Version>
                  <Delete>true</Delete>
            <Read>false</Read>
            <Write>true</Write>
            <RetentionPolicy>
                <Enabled>true</Enabled>
                <Days>7</Days>
            </RetentionPolicy>
        </Logging>
        <Metrics>
            <Version>1.0</Version>
            <Enabled>true</Enabled>
            <IncludeAPIs>false</IncludeAPIs>
            <RetentionPolicy>
                <Enabled>true</Enabled>
                <Days>7</Days>
            </RetentionPolicy>
        </Metrics>
    </StorageServiceProperties>
    
  3. When this request is sent, it will receive a response that will indicate whether or not Storage Analytics was configured. If the response has an HTTP status code of 202 (Accepted), your Storage Analytics settings have been updated. The following example response indicates that our settings were updated:



    HTTP/1.1 202 Accepted
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Date: Tue, 27 Aug 2011 04:28:20 GMT
    Server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: cb939a31-0cc6-49bb-9fe5-3327691f2a30
    x-ms-version: 2011-08-18
    
    

After you have enabled Storage Analytics with your initial configuration, you can always get your current settings by calling the Get Blob Service Properties (REST API), Get Table Service Properties (REST API), or Get Queue Service Properties operation.

Updating Storage Analytics

If you want to change your Storage Analytics settings for a storage service, call the Set Blob Service Properties (REST API), Set Table Service Properties (REST API), or Set Queue Service Properties operation again. Ensure that your new XML request body retains your desired configuration options, such as enabling/disabling Storage Analytics and/or a retention policy for the service. Each time one of these operations is called, it changes the applicable service’s settings immediately.

See Also

Bunu faydalı buldunuz mu?
(1500 karakter kaldı)
© 2013 Microsoft. Tüm hakları saklıdır.
facebook page visit twitter rss feed newsletter