Rsyslog not forwarding specific log file to remote server

user2284355


I am going insane trying to get rsyslog to send a specific logfile to a remote server over UDP.
This is the rsyslog.conf file for the sending server:

#  /etc/rsyslog.conf    Configuration file for rsyslog.
#
#                       For more information see
#                       /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
#  Default logging rules can be found in /etc/rsyslog.d/50-default.conf


#################
#### MODULES ####
#################    

$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
#$ModLoad immark  # provides --MARK-- message capability
$ModLoad imfile   # provides imfile module    

# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514


###########################
#### GLOBAL DIRECTIVES ####
###########################

#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# Filter duplicated messages
$RepeatedMsgReduction on

#
# Set the default permissions for all log files.
#
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup adm

#
# Where to place spool files
#
$WorkDirectory /var/spool/rsyslog

#
# Include all config files in /etc/rsyslog.d/    
#
$IncludeConfig /etc/rsyslog.d/*.conf

I then added *.* @remoteserverIP at the end of /etc/rsyslog.d/50-default.conf.
After that I created the file /etc/rsyslog.d/test.conf with the following content:

$ModLoad imfile
$InputFileName /var/log/test
$InputFileTag test
$InputFileStateFile stat-test
$InputFileSeverity info
InputRunFileMonitor
*.* @remoteserverIP

finally I created /var/log/test and did chown syslog; chgrp adm;service rsyslog restart
My server is listening on UDP 514

tcpdump udp on sending server reveals that the logs are not being sent after doing cat "test" >> /var/log/test
logger -t test "My little pony" sends the data over UDP, is seen by tcpdump and appears on my remote server.
On sending server:

rsyslogd -v
rsyslogd 5.8.6, compiled with:
FEATURE_REGEXP:                         Yes
FEATURE_LARGEFILE:                      No
GSSAPI Kerberos 5 support:              Yes
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported:      Yes
64bit Atomic operations supported:      Yes
Runtime Instrumentation (slow code):    No

Does anyone know what I am doing wrong?
Thanks for the help!

dschinn1001

yes - a bit true. Sometimes it helps - or it is necessary - to do :

sudo apt-get install --reinstall rsyslogd*

or instead reboot the machine totally for to reload the daemons (included rsyslogd).

You can look if syslog is scrolling ( means then that rsyslogd is working as daemon ).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Rsyslog not forwarding specific log file to remote server

From Dev

rsyslog not forwarding messages to remote rsyslog server

From Dev

rsyslog conditional forwarding for remote logs de-formatting the date and time in the log file

From Dev

Get rsyslog forwarding messages after remote server restart

From Dev

Get rsyslog forwarding messages after remote server restart

From Dev

how to configure rsyslog to send file from specific program to specific location on remote server

From Dev

how to configure rsyslog to send file from specific program to specific location on remote server

From Dev

rsyslog conditional forwarding for remote logs

From Dev

Rsyslog outputting to custom log file

From Dev

rsyslog not writing dynamic log file

From Dev

How do I configure rsyslog to send logs from a specific program to a remote syslog server?

From Dev

How do I configure rsyslog to send logs from a specific program to a remote syslog server?

From Dev

configure rsyslog server to log incomming messages with time of the rsyslog server

From Dev

rsyslog server template consideration for multiple remote hosts

From Dev

Server 2012 Event log forwarding

From Dev

Logstash vs Rsyslog for log file aggregation

From Dev

Setting permisison of log file in rsyslog configuration

From Dev

Setting permisison of log file in rsyslog configuration

From Dev

Logback is not writing specific log file on the Linux server

From Dev

rsyslog filtering and forwarding

From Dev

Syslog forwarding to Rsyslog

From Dev

Forwarding Data From rsyslog

From Dev

Weblogic : Log errors in a specific log file for a managed server

From Dev

SQL Server - View a specific log entry in transaction log file (ldf)

From Dev

Weblogic : Log errors in a specific log file for a managed server

From Dev

Vagrant forwarding ssh from remote server

From Dev

Remote port forwarding through a jump server

From Dev

How to tail a remote Linux server log file to a local Windows machine

From Dev

Batch file to check the availability of a specific port of a remote server

Related Related

  1. 1

    Rsyslog not forwarding specific log file to remote server

  2. 2

    rsyslog not forwarding messages to remote rsyslog server

  3. 3

    rsyslog conditional forwarding for remote logs de-formatting the date and time in the log file

  4. 4

    Get rsyslog forwarding messages after remote server restart

  5. 5

    Get rsyslog forwarding messages after remote server restart

  6. 6

    how to configure rsyslog to send file from specific program to specific location on remote server

  7. 7

    how to configure rsyslog to send file from specific program to specific location on remote server

  8. 8

    rsyslog conditional forwarding for remote logs

  9. 9

    Rsyslog outputting to custom log file

  10. 10

    rsyslog not writing dynamic log file

  11. 11

    How do I configure rsyslog to send logs from a specific program to a remote syslog server?

  12. 12

    How do I configure rsyslog to send logs from a specific program to a remote syslog server?

  13. 13

    configure rsyslog server to log incomming messages with time of the rsyslog server

  14. 14

    rsyslog server template consideration for multiple remote hosts

  15. 15

    Server 2012 Event log forwarding

  16. 16

    Logstash vs Rsyslog for log file aggregation

  17. 17

    Setting permisison of log file in rsyslog configuration

  18. 18

    Setting permisison of log file in rsyslog configuration

  19. 19

    Logback is not writing specific log file on the Linux server

  20. 20

    rsyslog filtering and forwarding

  21. 21

    Syslog forwarding to Rsyslog

  22. 22

    Forwarding Data From rsyslog

  23. 23

    Weblogic : Log errors in a specific log file for a managed server

  24. 24

    SQL Server - View a specific log entry in transaction log file (ldf)

  25. 25

    Weblogic : Log errors in a specific log file for a managed server

  26. 26

    Vagrant forwarding ssh from remote server

  27. 27

    Remote port forwarding through a jump server

  28. 28

    How to tail a remote Linux server log file to a local Windows machine

  29. 29

    Batch file to check the availability of a specific port of a remote server

HotTag

Archive