3
votes

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"/>
1
any idea anyone?? i find it hard to believe that any type of ESB has no SYSLOG integration...Menyh

1 Answers

1
votes

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:

<udp:inbound-endpoint host="localhost" port="514" exchange-pattern="one-way"/>
<logger level="WARN"/>  <!-- dumps the message metadata -->
<logger level="WARN" message="[#payload:]"/>  <!-- dumps the message payload-->

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.