Azure上的Stream Analytics的规则引擎 [英] Rules engine for Stream Analytics on Azure

查看:116
本文介绍了Azure上的Stream Analytics的规则引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Azure和分析的新手. 我正在尝试了解流警报规则引擎.我使用了一些样本数据作为输入,并使用查询来过滤数据. 但是我不确定规则引擎是什么意思,它只是查询还是它有什么更多的东西?如果有的话,有没有一种方法可以将所有规则合而为一?

I'm new to Azure and to analytics. I'm trying to understand streaming alert rules engine. I have used some sample data as input and have queries to filter data. However i'm not sure of what rules engine means, is it just queries or is there anything more to it and is there a way we can have all rules in one if yes, how?

推荐答案

为ASA定义逻辑的主要方法是使用SQL,它提供了一种使用SQL语句定义规则的方法(例如SELECT DeviceID ... WHERE temperature> 50).可以在同一查询中使用多个条件,并且可以在同一作业中定义多个查询. 这种方法非常灵活,但是由于ASA将编译作业,因此必须在作业开始之前定义规则本身. 请参阅此处了解一些常见查询模式.

The main way to define logic for ASA is to use SQL, which provide a way to define rules with SQL statements (e.g. SELECT DeviceID ... WHERE temperature>50). Multiple conditions can be used in the same query and multiple queries can be defined in the same job. This approach is pretty flexible, however the rules themselves need to be defined before the job start since ASA will compile the job. See here for some common query patterns.

然后,当我们谈论规则引擎时,用户通常需要规则的更多动态性.为了提供这种动态性,可以动态地向正在运行的作业中插入规则条件,甚至是完整规则(后面的规则适用于高级用户).下面是一些详细信息:

Then, when we talk about rule engine, users often require more dynamicity of the rules. In order to provide this dynamicity, it is possible to dynamically inject rule conditions, or even full rules to a running job (the later one is for advanced users). Below some detailed info:

  • 使用参考数据动态配置阈值规则:ASA可以使用参考数据获取最新条件.查看更多详细信息在此博客文章中
  • 使用JavaScript UDF动态注入规则(这是更高级的方法):用户可以使用JavaScript 功能,使用来自参考数据的代码段. Azure远程监控微服务使用了这种技术(请参见此处在GitHub上).
  • Dynamically configure threshold rules using reference data: ASA can use reference data to get the latest conditions. See more details in this blog post
  • Dynamically inject rules using JavaScript UDF (this is more advanced): users can create a new function using JavaScript Function using code snippets coming from reference data. Such technique is used by Azure Remote Monitoring microservices (see here on GitHub).

让我知道您是否还有其他问题以及我们如何改进.

Let me know if you have any further question and how we can improve.

谢谢

JS(Azure流分析)

JS (Azure Stream Analytics)

这篇关于Azure上的Stream Analytics的规则引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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