From e119281a4287e03244a7f3fb8e8479005896dcf7 Mon Sep 17 00:00:00 2001 From: Phrozyn Date: Thu, 11 May 2017 11:11:51 -0500 Subject: [PATCH] Moving mongod to syslog logging. --- config/50-mozdef-filter.conf | 2 ++ config/mongod.conf | 8 ++++---- systemdfiles/web/mongod.service | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/50-mozdef-filter.conf b/config/50-mozdef-filter.conf index 6722b03d..8c873cf8 100644 --- a/config/50-mozdef-filter.conf +++ b/config/50-mozdef-filter.conf @@ -16,4 +16,6 @@ if $programname == 'sso-worker' then /var/log/mozdef/sso.log if $programname == 'cloudtrail-worker' then /var/log/mozdef/cloudtrail.log if $programname == 'alertplugins-worker' then /var/log/mozdef/alertplugins.log if $programname == 'contegix-auditd-worker' then /var/log/mozdef/contegix-auditd.log +if $programname == 'mongod.3002' then /var/log/mozdef/mongo/meteor-mongo.log +if $programname == 'mongod' then /var/log/mozdef/mongo/mongo.log & stop diff --git a/config/mongod.conf b/config/mongod.conf index c8987bb8..179474ed 100644 --- a/config/mongod.conf +++ b/config/mongod.conf @@ -4,10 +4,10 @@ # http://docs.mongodb.org/manual/reference/configuration-options/ # where to write logging data. -systemLog: - destination: file - logAppend: true - path: /var/log/mozdef/mongo/meteor-mongo.log +#systemLog: +# destination: file +# logAppend: true +# path: /var/log/mozdef/mongo/meteor-mongo.log # Where and how to store data. storage: diff --git a/systemdfiles/web/mongod.service b/systemdfiles/web/mongod.service index b20f0254..ece86756 100644 --- a/systemdfiles/web/mongod.service +++ b/systemdfiles/web/mongod.service @@ -8,7 +8,7 @@ PermissionsStartOnly=true ExecStartPre=-/usr/bin/mkdir /var/run/mozdefdb ExecStartPre=/usr/bin/chown -R mozdef:mozdef /var/run/mozdefdb/ PIDFile=/var/run/mozdefdb/mozdefdb.pid -ExecStart=/usr/bin/mongod --storageEngine=mmapv1 --config /etc/mongod.conf +ExecStart=/usr/bin/mongod --storageEngine=mmapv1 --config /etc/mongod.conf --syslog ExecReload=/bin/kill -HUP $MAINPID Restart=always User=mozdef