Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Capturing syslog input [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 444

PostPosted: Wed Aug 14, 2013 11:23 pm    Post subject: Capturing syslog input [Solved] Reply with quote

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
Code:
$ nc -l -u -p 514
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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Thu Aug 15, 2013 2:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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