《Windows Azure Platform 系列文章目录

  之前有一个业务需求,客户想知道Azure Storage是否有日志功能,可以检查某个Azure Blob文件在某个时间点被删除。

  后来问了相关的同事,其实在Azure ARM Portal里面,可以开启诊断功能,监控具体的操作日志。这里写个Blog记录一下。

  1.我们登录Azure ARM Portal: https://portal.azure.cn

  2.选择某一个存储账户。图略

  3.在存储账户的属性里,选择监视,诊断。如下图:

  

  4.我们打开下图的监控。

  Blob聚合指标是做Blob访问流量、请求数等的监控

  Blob日志是开启Blob访问监控

  保留期:表示监控数据的保存时间。

  

  5.开启Blob日志后,我们可以用Azure Storage Explorer来访问日志数据。下载地址:https://go.microsoft.com/fwlink/?LinkId=708343&clcid=0x409

  具体使用Azure Storage Explorer我这里就不详细介绍了,具体可以参考:http://www.cnblogs.com/threestone/archive/2012/01/23/2328878.html

  

  6.日志手机需要一段时间,请稍等片刻。

  我们就可以在Azure Storage Explorer里面查看到一个Container Name,为$logs。如下图:

  

  7.这个$log里面的内容,都是以年、月、日、小时 (注意小时为UTC时区,北京时间为UTC+8时区,会相差8小时) 生成文件夹。如下图:

  

  8.我们通过Azure Storage Explorer上传一个文件1.jpg。图略。

  

  9.稍等片刻后,我们就可以看到Blob日志。

  

  10.把上图的log文件下载到本地硬盘。可以查看到相关信息:

  1.0;2017-10-31T12:43:12.8084195Z;PutBlob;Success;201;9;8;authenticated;leidemostorage;leidemostorage;blob;"https://leidemostorage.blob.core.chinacloudapi.cn:443/private/1.jpg";"/leidemostorage/private/1.jpg";fc6a062b-001e-0012-3845-52fb99000000;0;114.93.218.188:13156;2017-04-17;683;24912;258;0;24912;"oyiQc2iWAoyADLYdOGNnQA==";"oyiQc2iWAoyADLYdOGNnQA==";""0x8D5205CF3242308"";Tuesday, 31-Oct-17 12:43:13 GMT;;"Microsoft Azure Storage Explorer, 0.9.01, win32, Azure-Storage/2.5.0 (NODE-VERSION v7.9.0; Windows_NT 10.0.15063)";;"0dd86bf0-be39-11e7-914c-392321867fcc"

  可以看到上图中,我们通过Azure Storage Explorer上传的1.jpg图片的操作日志被完整记录下来。

  11.请注意,如果我们生产环境的Azure Storage,客户端访问量很大的时候,日志文件也会变得非常大。最大的甚至要几百兆。

  在如此大量的日志文件中查询相关的信息是比较困难的。

  12.另外Azure Storage日志文件有单独的20TB容量。容量和吞吐量都是单独计算的。不会影响Azure Storage的性能。

  

Windows Azure Storage (24) 启用Azure Blob日志的更多相关文章

  1. Windows Azure Storage (20) 使用Azure File实现共享文件夹

    <Windows Azure Platform 系列文章目录> Update 2016-4-14.在Azure VM配置FTP和IIS,请参考: http://blogs.iis.net/ ...

  2. Azure Storage用法:使用Blob Storage

    Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table. 笔者在C# 消息队列-Microsoft Azure ...

  3. [New Portal]Windows Azure Storage (14) 使用Azure Blob的PutBlock方法,实现文件的分块、离线上传

    <Windows Azure Platform 系列文章目录> 相关内容 Windows Azure Platform (二十二) Windows Azure Storage Servic ...

  4. Windows Azure Storage (23) 计算Azure VHD实际使用容量

    <Windows Azure Platform 系列文章目录> 对于A系列和D系列的虚拟机来说,使用的是普通存储. 普通存储的存储资源,是按照每GB每月计费的.Microsoft Azur ...

  5. Windows Azure Storage (19) 再谈Azure Block Blob和Page Blob

    <Windows Azure Platform 系列文章目录> 请读者在参考本文之前,预习相关背景知识:Windows Azure Storage (1) Windows Azure St ...

  6. Azure Blob Storage 基本用法 -- Azure Storage 之 Blob

    Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table. 笔者在<Azure Table storage ...

  7. 【Azure Developer】使用 Python SDK连接Azure Storage Account, 计算Blob大小代码示例

    问题描述 在微软云环境中,使用python SDK连接存储账号(Storage Account)需要计算Blob大小?虽然Azure提供了一个专用工具Azure Storage Explorer可以统 ...

  8. Azure File Storage 基本用法 -- Azure Storage 之 File

    Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table. 笔者在<Azure Blob Storage 基 ...

  9. Azure Table storage 基本用法 -- Azure Storage 之 Table

    Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table,其中的 Table 就是本文的主角 Azure Tabl ...

随机推荐

  1. DG增量恢复

    本篇文档: 讲述DG环境出现GAP归档缝隙,且主库的该归档日志被删除的情况下,快速恢复DG的连通性 流程讲述: >明确主库增量备份起点 scn 查询备库控制文件current scn ,及v$d ...

  2. [LeetCode&Python] Problem 733. Flood Fill

    An image is represented by a 2-D array of integers, each integer representing the pixel value of the ...

  3. Gym 102091A: Flying Squirrel(RMQ)

    题意:如图,有N个柱子,每次我可以从高柱子X到低柱子Y,而且需要满足中间的柱子都小于X的高度. 思路:现在有Q次询问,每次给定(X,Y),(如果ht[X]<ht[Y],则交换XY),问X为起点, ...

  4. 在windows 上的RedisClient 上连接远程linux redis ("jave.net.ConnectException: Connection refused:connect")

    1.把防火墙禁用掉 2.redis.conf配置文件,注释掉bind 127.0.0.1 3.重启redis服务

  5. PTA——统计区间内质数

    PTA 7-33 统计素数并求和 #include<stdio.h> #include<math.h> int prime(int p); int main() { int m ...

  6. 2018.4.2 flask web

    from flask import Flask,request from flask import jsonify from flask import render_template app = Fl ...

  7. 【湖南师范大学2018年大学生程序设计竞赛新生赛 L】【HDOJ2476】【区间DP】

    https://www.nowcoder.com/acm/contest/127/L L 小小粉刷匠 题目描述 "lalala,我是一个快乐的粉刷匠",小名一边快活地唱着歌,一边开 ...

  8. 斐波那契数列的生成 %1e8 后的结果

    方法一  用数组开,一般开到1e7,1e8 左右的数组就是极限了   对时间也是挑战 #include<bits/stdc++.h> using namespace std; ; int ...

  9. hdu1796 How many integers can you find 容斥原理

    Now you get a number N, and a M-integers set, you should find out how many integers which are small ...

  10. js实现一条抛物线

    抛物线运动解释: 以右开口为例,根据公式  y^2 = 2px .确定p的值,已知x求y. <!DOCTYPE html> <html> <head> <me ...