Mule Syslog 入站端点
我正在尝试创建一个入站 Mule 端点,它将从远程服务器接收 Syslog 消息。使用 UDP 数据包在端口 514 上接收消息。
由于我没有看到内置的 Mule 支持 syslog 数据包,因此我尝试通过在该端口上创建一个简单的 UDP 连接器来接收实际消息来开始处理这个问题。但是,当我提出端点时,我没有看到收到此类消息(将数据输出到 stdio 以进行检查)。当我发送“正常”UDP 消息时,它们确实会出现在该端点上。此外,我安装了系统日志服务器并验证系统日志消息确实被我的主机接收。
我的问题是:如何设置该端点来接收系统日志消息?现在我正在使用这个简单的配置:
<udp:inbound-endpoint host="localhost" port="514" exchange-pattern="one-way"/>
<stdio:outbound-endpoint system="OUT"/>
I am attempting to create an inbound Mule endpoint that will receive Syslog messages from a remote server. The messages are recieved on port 514 using UDP packets.
As I've seen no built-in Mule support for syslog packets, I've tried to start dealing with this by creating a simple UDP connector on that port to receive the actual messages. However, when I raise the endpoint, I see no such messages received (outputed the data to stdio in order to check). When I do send "normal" UDP messages, they do come up on that endpoint. Additionally, I Installed a syslog server and verified that the syslog messages are indeed being received to my host computer.
My question is: how can I go about setting up that endpoint to receive syslog messages? Right now I'm working with this simple configuration:
<udp:inbound-endpoint host="localhost" port="514" exchange-pattern="one-way"/>
<stdio:outbound-endpoint system="OUT"/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的入站端点看起来正确。对于该端点收到的每个 UDP 数据包,它应该收到一条 Mule 消息。消息的有效负载将是包含数据包内容的字节数组。您可以使用以下语法转储每个:
您将看到有效负载是一个字节数组。要将其作为 SYSLOG 消息进行处理,您需要编写(或调用)一些能够理解 SYSLOG 数据包格式的 Java 代码。
Your inbound endpoint looks correct. It should receive a mule message for each UDP packet received by that endpoint. The message's payload will be a byte array containing the packet's contents. You can dump each one with the following syntax:
You'll see the payload being a byte array. To process it as a SYSLOG message, you'll need to write (or call) some Java code which understands the SYSLOG packet format.