I’ll be honest, I haven’t touch Rsyslog in a few. My setup was normally collect all my data and configured it to send once.
Example of my old one.
#### RULES ####
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
kern.debug /var/log/firewall.log
# 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 :omusrmsg:*
# 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
##Enable sending of logs over UDP add the following line:
*.* @192.168.0.101:5140
##Enable sending of logs over TCP add the following line:
*.* @@192.168.0.101:5140
##Set disk queue when rsyslog server will be down:
$ActionQueueFileName queue
$ActionQueueMaxDiskSpace 1g
$ActionQueueSaveOnShutdown on
$ActionQueueType LinkedList
$ActionResumeRetryCount -1
Give it a few, maybe some one else here has a better example.
You could check you Firewall to make sure those ports are open, and if your using ports above 1024.
But apart from this I want to send the mongodb logs to rsyslog using a different port.
On the other server I set up, I set rsyslog to send syslog and mariadb log separately, and it works without any problems.
The mongodb input shows only one log at first, and nothing is received after that…
Just an idea, you can use Rsyslog for your mail and install Nxlog for MongoDb logs.
In my lab I have two different log shippers install on one server for testing.
There were a couple reason why I stopped using Rsyslog , specially when I need to use TCP/TLS for INPUT connection.
Thank you for your response.
But I noticed a while ago that the mongo log only has a simple access log…
I think I need to change the settings of this log first so that various information is generated…