2

I am trying to forward MongoDB logs from several remote servers to a central logging server. To do this, I changed my mongod.conf files to use syslog like so:

systemLog:
  destination: syslog
  syslogFacility: local3

I then configured rsyslog to forward messages like so:

if($syslogFacility-text == "local3") then{
  if($syslogTag contains "mongod") then{
    action(type="omfwd" target="MY.SYSLOG.SERVER.IP" port="PORT" protocol="udp")
    stop
  }
}

My logging server is configured to write any messages sent at that port to my central mongod.log file.

My question is; is there a better way to do this? For example, could I specify my logging server's IP/PORT in mongod.conf so I don't have to rely on each Mongo server's local rsyslog?

1 Answer 1

0

It does not seem like it. According to the manual, the systemlog.destination option only accepts file and syslog.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .