2
votes

I am a beginner in Azure and need some help. We are facing a bit of problem with Azure Storage services and are unable to proceed.

Ok now the issue is

http://blogs.msdn.com/b/windowsazurestorage/archive/2014/08/05/microsoft-azure-storage-service-version-removal.aspx

To summarize: We have to inspect the log version of an/all of blobs,tables,queues in case any of them are using the one set for planned removal. I have enabled logging for the webapplication on the azure portal site. I am able to see the three services as under

https://.blob.core.windows.net

https://.table.core.windows.net

https://.queue.core.windows.net

Now in the articles as below I gather that we get the log format as this where they have a version included but have NOT specfied from where to locate the logs and how to gather the logs. I have tried different things from using https://.blob.core.windows.net/$logs but makes no difference.

The logs required should be in this format(sample)

Here is a sample log entry, with the version used highlighted – in this case the request was an anonymous GetBlob request which implicitly used the 2009-09-19 version:

1.0;2011-08-09T18:52:40.9241789Z;GetBlob;AnonymousSuccess;200;18;10;anonymous;;myaccount;blob;"https:// myaccount.blob.core.windows.net/thumbnails/lake.jpg?timeout=30000";"/myaccount/thumbnails/lake.jpg";a84aa705-8a85-48c5-b064-b43bd22979c3;0;123.100.2.10;2009-09-19;252;0;265;100;0;;;"0x8CE1B6EA95033D5";Friday, 09-Aug-11 18:52:40 GMT;;;;"8/9/2011 6:52:40 PM ba98eb12-700b-4d53-9230-33a3330571fc"

Can you please show me a way to view these logs. Any tool to use ?

1
Are you "only" interested in finding out the storage service version your storage account is using? Or do you want to know how to view the storage logs?Gaurav Mantri
I would like to know how to view the storage logs.Sandy W

1 Answers

4
votes

Since these logs are stored in a blob container called $logs, any storage explorer which supports viewing data from this blob container can be used to view the contents. To the best of my knowledge following tools support viewing data from this container: Azure Storage Explorer, Cerebrata Azure Management Studio, Cloud Portam (Disclosure: I am the developer working on this tool).

However before you could view the data you would need to enable logging on your storage account. Only when logging is enabled on the storage account you will see this container show up in your storage account. To enable logging, again you can use Azure Management Studio or Cloud Portam or you could use the code below (the code I mentioned below assumes you have the latest version of Storage Client Library):

    static void SetLoggingProperties()
    {
        CloudStorageAccount account = new CloudStorageAccount(new StorageCredentials(StorageAccount, StorageAccountKey), true);
        LoggingProperties properties = new LoggingProperties()
        {
            LoggingOperations = LoggingOperations.All,
            RetentionDays = 365,
            Version = "1.0",
        };
        ServiceProperties serviceProperties = new ServiceProperties()
        {
            Cors = null,
            HourMetrics = null,
            MinuteMetrics = null,
            Logging = properties,
        };
        var blobClient = account.CreateCloudBlobClient();
        blobClient.SetServiceProperties(serviceProperties);
        var tableClient = account.CreateCloudTableClient();
        tableClient.SetServiceProperties(serviceProperties);
        var queueClient = account.CreateCloudQueueClient();
        queueClient.SetServiceProperties(serviceProperties);
    }

Once logging properties are set, give it some time for logs to show up.