Also forgot to mention I have a exclude.conf file to stop local7 also going to boot log
:programname, contains, "exlog-" ~
My full rsyslog.conf is (the forwarder is at the end)
# 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 UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on
# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf
#### RULES ####
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
#local7.* /dev/null
# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
*.* @@192.168.201.222:1514
# ### end of the forwarding rule ###
#*.* @@172.30.4.106:1514;RSYSLOG_SyslogProtocol23Format
Which version of rsyslog are you using?
Has the state file been successfully created and updated?
Are there other custom configuration snippets in /etc/rsyslog.d/?
It could also be a side effect of having $InputFilePollInterval and $InputFilePersistStateInterval 1 with the same value (1 second), try setting $InputFilePersistStateInterval to a higher value (5 seconds sounds like a good compromise).
there is a conf file for each log file I am inputting all following the same formats at the one posted,
there is a exclude line as outlined above as it was outputting the same logs to the boot log
and then the oiutput to TCP entry line that I put in the rsyslog.conf file
I havent added anything else, do you think i have missed something?
I’ll try the change you reccomend now for that log file, will be a pain if thats the cause , as I have 90 conf files
Thanks for this, have take a look and altered according to suggested change, no joy Im afraid, is there any way to view the raw input arring ( the spool) that you know of?
The line you mention exists at the end of each file feed in and output config so each log I want sent in addition to standard message log, I add a conf file that matches this
From my understanding , this send the main logs that are included in local 7 by standard, like the messages and securitylogs, and the Confs are also a include?
Each of these statements are sending messages with facility “local7” to 192.168.201.222:1514 and you have this statement in all of your custom configuration snippets.
Ok I removed it, all we lost were the standard logs, its still duplicating the other lines,
I have already stopped all the additional stipulated ones from the rsyslog.conf directory being duplicated by using the exclude file that stops all tagged logs “exlog” from going to boot.log (local7)
exlog-exclude.conf contains the line
:programname, contains, “exlog-” ~ , this stops these files going again under the . directive
??? I havemt merge it, thats not plausible, they have to be seperate so I can control them by scripted site installs , do you mean you want to see all of the config files, or just the one that I am using for this example ?
# 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 UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
#### GLOBAL DIRECTIVES ####
# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on
# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf
##########################################
#testf listed here for include purposes
$ModLoad imfile
$InputFileName /usr/local/expensys/test-f/tomcat/logs/expensys-local-app.log
$InputFileTag exlog-test-f-app
$InputFileStateFile exlog-test-f-app
$InputFileSeverity info
$InputFileFacility local7
$InputRunFileMonitor
$InputFilePollInterval 10
$InputFilePersistStateInterval 0
local7.* @@192.168.201.222:1514
###########################################
#### RULES ####
$RepeatedMsgReduction on
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
q
# Save boot messages also to boot.log
local7.* /var/log/boot.log
#local7.* /dev/null
# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
#*.* @@192.168.201.222:1514
# ### end of the forwarding rule ###
#*.* @@172.30.4.106:1514;RSYSLOG_SyslogProtocol23Format