LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2014, 02:35 PM   #1
voncrud
LQ Newbie
 
Registered: Jul 2012
Posts: 7
Blog Entries: 1

Rep: Reputation: Disabled
rsyslog


Im having troubles getting rsyslog to receive logs from servers and send those logs to a file of the same (server) name.

Anyone ever attempt the same?
 
Old 02-04-2014, 04:08 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by voncrud View Post
Im having troubles getting rsyslog to receive logs from servers and send those logs to a file of the same (server) name.
IMHO minimal post contents should contain rsyslog.conf, result from running Rsyslog in debug mode (see manual page) and relevant start up lines in syslog.
 
Old 02-04-2014, 04:24 PM   #3
voncrud
LQ Newbie
 
Registered: Jul 2012
Posts: 7

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Ok, I have what I was trying to accomplish, completed. However... Im not receiving files from external hosts. Running a netstat, I do not see TCP/514 listening.

Again, no errors

# rsyslog v5 configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
$ModLoad immark # provides --MARK-- message capability

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514


#### GLOBAL DIRECTIVES ####

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

$template FILENAME,"/opt/log/%hostname%/%$year%/%$year%-%$month%-%$day%-%hostname%.log"

$FileCreateMode 0640
$DirCreateMode 0755
$FileOwner adm
$FileGroup adm

*.* ?FILENAME

no errors from debug run:

[root@ log]# /sbin/rsyslogd -f /etc/rsyslog.conf -N1
rsyslogd: version 5.8.10, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c5 as the first rsyslogd option.
rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad immark
rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: MarkMessagePeriod 1200
rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad imuxsock
rsyslogd: End of config validation run. Bye.
 
Old 02-04-2014, 04:28 PM   #4
voncrud
LQ Newbie
 
Registered: Jul 2012
Posts: 7

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
# tail /tmp/rsyslog.log
2839.215533142:7fc3abfff700: creating tcp listen socket on port 514
2839.215716877:7fc3abfff700: Allocating buffer for 200 TCP sessions.
2839.215738258:7fc3abfff700: nsdpoll_ptcp uses epoll_create1()
2839.215751058:7fc3abfff700: tcpsrv uses epoll() interface, nsdpol driver found
2839.215760867:7fc3abfff700: Trying to add listener 0, pUsr=0x7fc3a4001350
2839.215771198:7fc3abfff700: adding nsdpoll entry 0/0x7fc3a4001350, sock 7
2839.215783952:7fc3abfff700: Added listener 0
2839.215793325:7fc3abfff700: Trying to add listener 1, pUsr=0x7fc3a4001350
2839.215802486:7fc3abfff700: adding nsdpoll entry 1/0x7fc3a4001350, sock 8
2839.215813188:7fc3abfff700: Added listener 1


Says its there, but netstat shows its not.
 
Old 02-04-2014, 05:17 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Shouldn't the default be
Code:
$ModLoad imudp
$UDPServerRun 514
for traditional remote syslog reception?
If you really need TCP: is some service already listening on TCP/514? Does TCP/1514 work? (Anything > 1024 basically.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rsyslog / graylog help chris@momentfeed.com Linux - Server 2 07-09-2012 04:20 PM
rsyslog cheltz Linux - Software 1 05-25-2012 08:38 AM
Running rsyslog veeruk101 Linux - Newbie 1 10-27-2011 01:00 PM
rsyslog ytd Linux - Newbie 1 02-11-2011 01:43 AM
anyone using rsyslog? slackamp Slackware 1 10-16-2007 09:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration