当天蓝色Blob存储中的文件在定义的时间内不存在时,我需要引发警报 [英] I need to throw an alert when file is not exists for defined period in azure blob storage

查看:76
本文介绍了当天蓝色Blob存储中的文件在定义的时间内不存在时,我需要引发警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种方案,每天将文件添加到我的azure blob存储帐户中.如果没有添加文件,则每天都需要发出警报.

I've a scenario where files will be added to my azure blob storage account on daily basis . I need throw an alert when, for any day if files were not added .

如果持续定义的几天,请说如果连续5天没有连续添加文件,则需要发送具有更高警报优先级的警报.

If it continues for some defined days , let say if no files were added continuously for 5 days need to send alert with increasing priority of alert .

这是可以通过内置的天蓝色警报功能来实现的吗?还是我需要编写某种逻辑应用/azure函数来实现这一目标?

Is this can be achieved by in build azure alerting feature ?? or do I need to write some kind of logic app/azure function to achieve this ?.

请给我一个解决方案.我正在尝试使用Azure逻辑应用程序,但无法从我的Blob存储中获取最新记录.

Please provide me a solution. I was trying out with azure logic apps but not able to fetch latest record from my blob storage . 

推荐答案

简单的PowerShell脚本(通过RunBook)来查询文件的创建日期,并检查是否在(今天-N)天内创建了文件.如果否,请发送警报.

you could do a simple PowerShell script, via a RunBook, to query the creation dates of files and check if any were created within (today - N) days. If no, send an alert.

您是指容器中的Blob还是共享中的文件?

Are you referring to blobs in a container or files in a share?

下面将向您展示如何获得以天为单位的年龄段.

The below will show you how to get the age in DAYS for the blobs.


ResourceGroupName  ='RESOURCEGROUPNAME'
ResourceGroupName  = 'RESOURCEGROUPNAME'


storageAccountName ='STORAGEACCOUNTNAME'
storageAccountName = 'STORAGEACCOUNTNAME'

 if (Get-AzureRmStorageAccount -ResourceGroupName


这篇关于当天蓝色Blob存储中的文件在定义的时间内不存在时,我需要引发警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆