Yes, I see that you want to mark this as a duplicate, and I appreciate that, but please read to the end.
I've found this question several places, and the answers are either too vague for a noob to rsyslog to understand...like this
Waaay too difficult to possibly be an easy to understand way to do what I want to do....like this
Or very close to what I'm looking for, but not quite....like this
Anyway, to the specific question.
Server X = Centralized syslog server, running rsyslog.
Server Y = A server that runs Redmine
I have already configured Y to send the default log files to X. I used these instructions, combined with some others.
X /etc/rsyslog.conf :
# /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
#$ModLoad immark # provides --MARK-- message capability
# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
# This one is the template to generate the log filename dynamically, depending on the client's IP address.
$template FILENAME,"/var/log/logs/%fromhost-ip%/syslog.log"
# Log all messages to the dynamically formed file. Now each clients log (192.168.1.2, 192.168.1.3,etc...), wil l be under a separate directory which is formed by the template FILENAME.
*.* ?FILENAME
# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on
###########################
#### 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 syslog
#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
As you can see, the logs that are being sent to X are put into a directory named after the IP address they come from.
Y /etc/rsyslog.d/10-rsyslog.conf
*.* @192.168.1.X:514
This all works, and I get everything just fine.
What I'd like to do is have the redmine.access.log file located at /var/log/apache2/redmine.access.log
also sent to the syslog server X
Like I said, I've read lots about this. I'm just not following it, and I need a more simple example.
I'd like to keep the log files on X and Y, so piping them straight anywhere, isn't what I want.
The instructions that I've found that looked the simplest, that I could almost follow were these. The problem with those, is that nothing is really explained, and I'm really wanting to understand how this works.
I don't care if the redmine.access.log gets thrown in with the syslog stuff (although I'd prefer it didn't), or if it gets written somewhere else all together (obviously on X though).
If someone could write up what they think I should do, I'll update my question to have my final config that works, so hopefully other noobs can benefit from my silly questions.
EDIT
This edit is to explain why this isn't a duplicate.
This is a duplicate....There I admitted it.
But I'd really like to see something so simple, to have an actual complete example. So, if this gets marked as duplicate, and removed, that's fine, but I'm going to edit it with a working example at the end anyway.