Hello, <br><br>I have a log message in JSON format that needs to be written to the MongoDB database, such that I should be able to later query the database based on fields in the JSON record.<br><br>However, when I try to use the syslog-ng mongodb destination driver using :<br>
<br><pre><code>destination d_mongodb {
mongodb(
servers("localhost:27017")
database("syslog")
collection("messages")
value-pairs(key("MESSAGE"))
);
};
</code></pre><br>The record appears in the mongodb database as: <br><br>{"MESSAGE":<My JSON formatted message>}<br><br>I do not want the MESSAGE macro to be part of the record in the database, I only want to it's JSON-encoded value to be entered in the database. Is this possible?<br>
<br>Thanks in advance for your help.<br><br>Regards,<br>Raj<br>
<br>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="600"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="right" valign="middle"><table style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;color:rgb(80,103,114)" cellspacing="0" width="100%"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="left" valign="bottom" width="31%"><font face="arial, sans-serif">Twitter: </font><a href="http://twitter.com/#%21/blismobile" style="color:rgb(5,162,207);text-decoration:none" target="_blank">@Blismedia</a><br>BlisMedia <br>32 Percy Street,<br>London W1T 2DE<br><a href="http://www.blismobile.com/" style="color:rgb(236,36,124);text-decoration:none" target="_blank">www.blismedia.com</a></td><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="left" valign="bottom" width="51%"><br></td><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="right" width="18%"><a href="http://www.blismobile.com/" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.blismedia.com/images/blismedia_logo.png"></a></td></tr></tbody></table></td></tr><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="right" valign="middle"><table style="margin-top:5px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(203,219,226)" width="100%"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px" align="left" valign="top"><br>
</td></tr></tbody></table><table style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:18px;margin-top:5px" width="100%"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="left" valign="top" width="18%"><img src="http://www.amandadesign.co.uk/blis/email_signatures/images/bis_emma.gif" height="55" width="90"></td><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="left" valign="top" width="42%"><a href="http://twitter.com/#%21/blismobile" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.amandadesign.co.uk/blis/email_signatures/images/blis_twitter.gif" alt="Follow on Twitter" border="no" height="35" width="120"></a></td><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="right" valign="top" width="40%"><a href="http://www.blismobile.com/" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.amandadesign.co.uk/blis/email_signatures/images/blis_web.gif" alt="Blis Website" border="no" height="60" width="165"></a></td></tr></tbody></table></td></tr><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,Helvetica,sans-serif;font-size:22px;line-height:25px;color:rgb(255,255,255)" align="right" valign="middle"><table style="font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:14px;color:rgb(137,158,168)" width="100%"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif" align="left" valign="top"><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font size="1"><span style="font-family:Calibri">This
communication is from BlisMedia, which is a trading name of
Breeze Tech (UK) Ltd, a company registered in England and Wales with
registered number </span><span style="font-family:Calibri" lang="EN-US">06455773</span><span style="font-family:Calibri">. Its registered office is 32 Percy Street, London W1T 2DE, United Kingdom.</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Calibri"><font size="1"> </font></span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font size="1"><span style="font-family:Calibri">This
communication contains information that is confidential and may also be
privileged. It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please (1) notify <a href="mailto:info@blismobile.com" style="color:rgb(17,85,204)" target="_blank"><span style="color:windowtext;text-decoration:none">info@blismedia.com</span></a> by
forwarding this email and delete all copies from your system and (2)
note that disclosure, distribution, copying or use of this communication
is strictly prohibited. Email communications cannot be guaranteed to be
secure or free from error or viruses. All emails sent to or from a
Blismobile email account are securely archived and stored by an external
supplier. </span><span style="background-image:initial"><font face="Calibri">This
email does not constitute a contractual agreement; such agreements are
in specified contractual or Insertion Order (IO) form only
and exclusively contain all the terms to which Breeze Tech )UK) Ltd will
be bound. </font></span><span style="font-family:Calibri">To the extent
permitted by law, Breeze Tech (UK) Ltd does not accept any liability
for use of or reliance on the contents of this email by any person save
by the intended recipient(s) to the extent agreed in a contract or
Insertion Order.</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Calibri"><font size="1"> </font></span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Calibri"><font size="1">Opinions,
conclusions and other information in this email which have not been
delivered by way of the business of Breeze Tech (UK) Ltd are neither
given nor endorsed by it.</font></span></p></td></tr></tbody></table></td></tr></tbody></table>