How to enable Syslog-ng authentication with MongoDB
Ibrahim Al Mahfooz <[email protected]> Tue, 15 Aug 2023 16:38:35 +0300
| Newsgroups | gmane.comp.syslog-ng |
|---|---|
| Message-ID | <CAJWXJNjTYE1GJNSnRwgx-MKy+MRgBHis19613VCq7onLpaVNkw@mail.gmail.com> |
Hi,
I would like to harden the security by enabling authentication between
syslog-ng and MongoDB.
I'm using syslog-ng v3.38 and MongoDB v6.0.8
At the destination I tried the below two methods but none of themt worked,
am I doing something wrong? Or the authentication is not supported?
*---> First method:*
destination d_mongodb_01 {
mongodb(
uri("mongodb://SampleUser:[email protected]:27017/syslog-ng_01")
collection("logs")
value-pairs(
pair("datetime" "${S_ISODATE}")
pair("privateip" "${privateip}")
pair("portstatus" "${PORTSTATUS}")
pair("host" "${HOST}"))
);
};
*---> Second method:*
destination d_mongodb_01 {
mongodb(
uri("mongodb://172.16.17.16:27017/syslog-ng_01")
username("SampleUser")
password("SamplePass")
collection("logs")
value-pairs(
pair("datetime" "${S_ISODATE}")
pair("privateip" "${privateip}")
pair("portstatus" "${PORTSTATUS}")
pair("host" "${HOST}"))
);
};
Appreciate your help
Best regards
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq