OS: Debian 11
Rsyslog version 8.2102
Squid version 4.13
I am attempted to remote log squid logs without going through a file.
I am using the following logging line for the store log in squid.conf:
cache_store_log syslog:local:6
These store logs appear in journal, so they are skipping the standard log file as intended.
When these logs are generated, they are not meaningfully distinguishable from the squid access logs. So in order to process these logs correctly, I want to add a string to the beginning of all local6 logs, something like squid-store
In rsyslog.conf I have the following relevant lines:
$template squidstore_tagged,"squid-store %msg%\n"
local6.* @192.168.3.2:1514;squidstore_tagged
*.* @192.168.3.2:1514
And although the rsyslog process restarts without error, and the squid store logs do arrive at the remote server, they are not tagged with "squid-store".
I then attempted this configuration for troubleshooting, but the logs still arrived at the remote server:
#$template squidstore_tagged,"squid-store %msg%\n"
#local6.* @192.168.3.2:1514;squidstore_tagged
local6.* /dev/null
*.* @192.168.3.2:1514
How can I tag the logs coming from squid store with some text prior to being sent remotely?