[Twisted-Python] Syslog Listener UDP
dr.marc.byrd at gmail.com
Tue Dec 16 14:55:06 EST 2008
Sorry for the late response.
This has (obviously) been a background, "wouldn't it be cool" type project.
Once I got remote logging over udp working w/ two machines w/ syslog-ng, the
tiwsted python part was easy:
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
def datagramReceived(self, data, (host, port)):
print "received %r from %s:%d" % (data, host, port)
self.transport.write(data, (host, port))
Part of my problem was that I was trying to use syslog on log-client and
syslog-ng on log-server; not sure I (yet) know of any reason why this
wouldn't work, but the point is, I got it working well enough to know that
the twisted stuff is working as expected.
So with syslog-ng on log-clients, all sending to a central log server over
udp, listening w/ twisted - the possibilities are endless!
On Sun, Oct 5, 2008 at 5:12 AM, HG <hackgou at gmail.com> wrote:
> I'm interested with this.
> any more progress?
> On Mon, Sep 29, 2008 at 2:18 AM, Marc Byrd <dr.marc.byrd at gmail.com> wrote:
>> I would like to build a syslog(udp port 514) listener in twisted. The
>> goal is to make it compatible with syslog and syslog-ng, which may be
>> configured on a "client" to send log entries (as they occur) via udp (fire
>> and forget) to a remote server (my twisted server).
>> Is there already something out there that would do this or that would be a
>> good start?
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python