leostereo has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks , I need to grab log lines provided by rsyslog on the same machine.
It seems I have three ways:
1st Using rsyslog omuxsocket module and io::socket::inux perl module to recive.
2nd Using rsyslog to forward to localhost:1514 udp and recive with ip::socket::inet perl module.
3rd Using perl File::Tail module to read from /var/log/messages file.
Currently Im trying with option number 1 since I think it is the proper way to achieve the goal.
I read from rsyslog documentation , that omuxsocket works with datagram socket.
So far I can not succesfully confirm how it works , Im trying to recive messages using "ncat -l -U /tmp/mysock --udp" but nothing happen yet so , it is probably some mistake with rsyslog config.
Method 2 and 3 are working but would like to hear some idea about option 1 and learn a little bit more about unix socket.
Regards,
Leo.
|
---|