Windows Azure Storage (24) 启用Azure Blob日志
《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日志的更多相关文章
- Windows Azure Storage (20) 使用Azure File实现共享文件夹
<Windows Azure Platform 系列文章目录> Update 2016-4-14.在Azure VM配置FTP和IIS,请参考: http://blogs.iis.net/ ...
- Azure Storage用法:使用Blob Storage
Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table. 笔者在C# 消息队列-Microsoft Azure ...
- [New Portal]Windows Azure Storage (14) 使用Azure Blob的PutBlock方法,实现文件的分块、离线上传
<Windows Azure Platform 系列文章目录> 相关内容 Windows Azure Platform (二十二) Windows Azure Storage Servic ...
- Windows Azure Storage (23) 计算Azure VHD实际使用容量
<Windows Azure Platform 系列文章目录> 对于A系列和D系列的虚拟机来说,使用的是普通存储. 普通存储的存储资源,是按照每GB每月计费的.Microsoft Azur ...
- Windows Azure Storage (19) 再谈Azure Block Blob和Page Blob
<Windows Azure Platform 系列文章目录> 请读者在参考本文之前,预习相关背景知识:Windows Azure Storage (1) Windows Azure St ...
- Azure Blob Storage 基本用法 -- Azure Storage 之 Blob
Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table. 笔者在<Azure Table storage ...
- 【Azure Developer】使用 Python SDK连接Azure Storage Account, 计算Blob大小代码示例
问题描述 在微软云环境中,使用python SDK连接存储账号(Storage Account)需要计算Blob大小?虽然Azure提供了一个专用工具Azure Storage Explorer可以统 ...
- Azure File Storage 基本用法 -- Azure Storage 之 File
Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table. 笔者在<Azure Blob Storage 基 ...
- Azure Table storage 基本用法 -- Azure Storage 之 Table
Azure Storage 是微软 Azure 云提供的云端存储解决方案,当前支持的存储类型有 Blob.Queue.File 和 Table,其中的 Table 就是本文的主角 Azure Tabl ...
随机推荐
- linux command1
#列出指定用户(当前用户)的组信息 groups #将指定的用户添加(-a)到指定的组内(改组必须已经存在)或指定用户从指定的组中删除(-d) gpasswd –a/-d username grou ...
- XDCTF2015_re100
去年做的一道 CTF,清理文档 0x01 The .init and .fini Sections 参考下面链接:http://www.ru.j-npcs.org/usoft/WWW/www_debi ...
- msp430板子接485接口的气体传感器问题及处理
现象:板子的485有问题(能收但是不能发) 485的方向位没有设置因此485芯片一直处于接收的状态,而发送不了处理方法:在需要发送时,把485方向位置于发送,发送完后再把方向位置回接收.但注意,要在发 ...
- [LeetCode&Python] Problem 896. Monotonic Array
An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is mono ...
- TLS编程
最近测试广州电信的电话会议平台,该平台接入采用HTTPS协议,于是有了本文.09年培训时写过一个简单的TLS C/S结构交互,采用openssl的ssl相关接口,但与生产相去胜远.本文采用openss ...
- 洛谷P2568 GCD(线性筛法)
题目链接:传送门 题目: 题目描述 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. 输入输出格式 输入格式: 一个整数N 输出格式: 答案 输入输出样例 ...
- 自定义bootbox:dialog方法
<script src="static/ace/js/bootbox.js"></script>bootbox.dialog({ message: '< ...
- No setter found for property 'cronExpression' in class 'org.springframework.scheduling.quartz.CronTriggerBean'
今天想写个Spring集成Quartz的小Demo,结果报错cronExpression未定义,通过差错,原来是因为Spring 3.0.5与Quartz2.2.2不兼容,Spring3.1以下的只能 ...
- oracle 数据库中(创建、解锁、授权、删除)用户
上文我们已经建立了名为orcl66的数据库. 想要在数据库中创建.修改用户需要我们以管理员权限登录到数据库中. 首先我们通过sqlplus命令登录连接数据库. 输入sqlplus命令--用户名: sy ...
- $trainClassLayer.find('input[name=data-item-checkbox]').eq(index).change();//激活第index+1那个checkbox
☆ $.each(data, function (index, org) { if (org.alreadySent) { $trainClassLayer.find('input[name=data ...