[rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-03 Thread Marcin Mirosław via rsyslog
Hello! Field msg contains complete json with data. I would like to instert it to mongodb as is. But now rsyslog inserts it as a value of key "msg". So now is: msg: '{"foo":"bar"} a i'd like to insert: only: '{"foo","bar"}' I tried with template: template(name="ui-json" type="string" string="%msg

Re: [rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-03 Thread Marcin Mirosław via rsyslog
s pisze: I do not fully understand the question (maybe language issue on my side), but there is a syntax error: In a string template, properties must be enclosed in percent sign. so: ... string="%msg% HTH Rainer El lun, 3 oct 2022 a las 13:18, Marcin Mirosław via rsyslog () escribió: Hell

Re: [rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-03 Thread Marcin Mirosław via rsyslog
) Marcin W dniu 03.10.2022 o 17:36, Rainer Gerhards pisze: I do not fully understand the question (maybe language issue on my side), but there is a syntax error: In a string template, properties must be enclosed in percent sign. so: ... string="%msg% HTH Rainer El lun, 3 oct 2022 a la

Re: [rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-04 Thread Marcin Mirosław via rsyslog
efault schema is aligned to CEE and project lumberjack. As such, the field names are standard lumberjack field names, and *not* rsyslog property names <https://www.rsyslog.com/doc/v8-stable/configuration/modules/property_replacer.html>." On 3.10.2022 22:02, Marcin Mirosław wrote: W dniu

Re: [rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-05 Thread Marcin Mirosław via rsyslog
t;pid\\" : \\"%procid%\\", \\"level\\" : \\"%syslogpriority-text%\\"") This creates the BSON document needed for MongoDB if no template is specified. The default schema is aligned to CEE and project lumberjack. As such, the field names are standard lumberjack

Re: [rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-05 Thread Marcin Mirosław via rsyslog
te at all. If the template is not specified, it creates a BSON with pre-defined files. If the template is specified, it just dumps a bson object from the message data. On 5.10.2022 11:28, Marcin Mirosław via rsyslog wrote: Hi! If I use omfile then logs contains messages in my desired format

Re: [rsyslog] [ommongodb] how to pass content of %msg as raw insert not as a value

2022-10-07 Thread Marcin Mirosław via rsyslog
16:04, Marcin Mirosław via rsyslog () escribió: It would be easier to fix if it would be my misconfiguration :( Rainer, would you look into ommongodb module, please? Marcin W dniu 2022-10-05 12:20, Mariusz Kruk via rsyslog napisał(a): > There is also some inconsistency within the documentation