简体   繁体   English

将数据(例如日志消息)从处理器传递到 Slack 或 LogMessage 处理器

[英]Pass data (e.g. log message) from processor to Slack or LogMessage processor

Suppose I want have a processor to send a Slack message and I want to reuse it from many other processors.假设我想要一个处理器来发送 Slack 消息,并且我想从许多其他处理器中重用它。 Eg one might need to send "file received" while another might send "failed to unzip file", etc. I'd rather have a single PutSlack processor and set the Webhook Text property to #{logPrefix} -- ${message} .例如,一个人可能需要发送“文件已收到”,而另一个人可能需要发送“无法解压缩文件”等。我宁愿有一个PutSlack处理器并将Webhook Text属性设置为#{logPrefix} -- ${message} That way all of the other processors can use this single processor to post a message in the Slack channel.这样所有其他处理器都可以使用这个单个处理器在 Slack 通道中发布消息。

Yes, a single PutSlack is enough, you can configure PutSlack processor properties to dynamically evaluate their values from the incoming FlowFile attributes since all the properties Supports Expression Language .是的,一个PutSlack就足够了,您可以配置PutSlack处理器属性以根据传入的 FlowFile 属性动态评估它们的值,因为所有属性都Supports Expression Language

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将错误从处理器传递到 NiFi 中的 PutEmail 处理器 - How to pass error from a processor to PutEmail processor in NiFi 如何在 Nifi 中将 pandas dataframe 从处理器传递到处理器? - How can I pass a pandas dataframe in Nifi from processor to processor? 如何使用Apache Nifi将值从一个处理器动态地传递到另一个处理器 - How to pass values dynamicallly from one processor to another processor using apache nifi LogAttirbute 处理器中的日志前缀属性 - Log prefix property in LogAttirbute processor 如何将验证错误消息从 Nifi 的 ValidateResult 处理器获取到属性中 - How to get Validation error message into a Attribute from ValidateResult Processor of Nifi 将来自 2 个不同处理器的内容和属性传递给 InvokeHttp 处理器 - Pass Content and Attributes from 2 different Processors to InvokeHttp Processor 从处理器获取 ProcessGroup - Get ProcessGroup from processor 如何配置 Apache Nifi logback.xml 文件将 LogMessage 处理器的日志和其他处理器的日志拆分到不同的文件 - How to configure Apache Nifi logback.xml file to split LogMessage Processor`s logs and Other Processors' Logs to different file 自定义等待处理器创建太多日志 - custom wait processor creating too much log 通过 JOLT 处理器从 JSON 数据中删除特殊字符 - Remove special character from JSON data by JOLT processor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM