View previous topic :: View next topic |
Author |
Message |
Nicias Guru

Joined: 06 Dec 2005 Posts: 444
|
Posted: Wed Aug 14, 2013 11:23 pm Post subject: Capturing syslog input [Solved] |
|
|
I'm not sure if this is the right forum for this, but this is my situation: I am using metalog as my logger and I am generally satisfied with it. I have a network device (a Boxee Box) that sends out its log's to udp port 514 on a device of my choosing. I can grab these logs as root with
but I would like them to show up nicely logged someplace in /var/log.... so they could be rotated, cleaned, etc. How do I do this?
edit:
Found socat, which works with the command: Code: | socat -u UDP-LISTEN:514 UNIX-SENDTO:/dev/log | I'll put it in my /etc/local.d/network-logging.start or somesuch. |
|
Back to top |
|
 |
eccerr0r Watchman

Joined: 01 Jul 2004 Posts: 7697 Location: almost Mile High in the USA
|
Posted: Thu Aug 15, 2013 2:34 pm Post subject: |
|
|
For anyone running real syslogd/syslog-ng on their main machine instead of metalog, it could be used. Just add a udp source for syslog-ng:
Code: | source extsrc {
udp ();
}; |
a new destination
Code: | destination external { file("/var/log/netlog" owner(root) flush_lines(0) group(wheel) perm(0640) dir_perm(0755) create_dirs(no)); };
|
and start logging
Code: | log { source(extsrc); destination(external); };
|
BTW, yes, syslogd is indeed a really messy in terms of its config file. syslog-ng is a bit better but you have to understand how it wants to work. I've never used metalog before and it seems totally different than the classical syslogs... _________________ Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching? |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|