<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUADQH4yeip7ImA9WhVUGU4.&quot;"><id>tag:blogger.com,1999:blog-6193377</id><updated>2012-05-25T10:16:11.092+02:00</updated><category term="gplv3" /><category term="logging" /><category term="astronomy" /><category term="postgres" /><category term="logs" /><category term="log analysis" /><category term="relp" /><category term="funding" /><category term="journald" /><category term="iss" /><category term="open source" /><category term="c programming" /><category term="theclouds" /><category term="suse" /><category term="log normalization" /><category term="troubleshooting" /><category term="reliable" /><category term="rgerhards" /><category term="module" /><category term="imuxsock" /><category term="ihe" /><category term="configuration" /><category term="spam" /><category term="journal" /><category term="reliability" /><category term="rsyslog.con" /><category term="adiscon" /><category term="sts-120" /><category term="ommongodb" /><category term="unicode" /><category term="performance" /><category term="solaris" /><category term="syslogappliance" /><category term="kids" /><category term="reporting" /><category term="rfc3195" /><category term="appliance" /><category term="phplogcon" /><category term="rate limiting" /><category term="security" /><category term="ommysql" /><category term="building collapse" /><category term="international" /><category term="philosophy" /><category term="log appliance" /><category term="hdfs" /><category term="monitorware" /><category term="forensics" /><category term="rsyslog.conf" /><category term="rsylsog" /><category term="segfault" /><category term="xmas" /><category term="disaster" /><category term="patent" /><category term="config format" /><category term="eventreporter" /><category term="rsyslog" /><category term="lumberjack." /><category term="software" /><category term="windows event log" /><category term="drm" /><category term="design" /><category term="cee-enhanced syslog" /><category term="plugins" /><category term="enterprise logging" /><category term="sbn" /><category term="json" /><category term="computing" /><category term="google" /><category term="space" /><category term="event normalization" /><category term="syslog appliance" /><category term="nasa" /><category term="shuttle" /><category term="hash chaining" /><category term="moon" /><category term="elasticsearch" /><category term="ietf" /><category term="systemd" /><category term="fedora" /><category term="rainer" /><category term="linux journal" /><category term="Adiscon LogAnalyzer" /><category term="rfc5424" /><category term="logstore" /><category term="carnival of logging" /><category term="libestr" /><category term="lumberjack" /><category term="auditing" /><category term="logtools" /><category term="licensing" /><category term="libeventnorm" /><category term="windows" /><category term="rainerscript" /><category term="cologne" /><category term="apollo" /><category term="libcee" /><category term="human nature" /><category term="log hashing" /><category term="liblogging" /><category term="apache" /><category term="linux" /><category term="liblognorm" /><category term="WinSyslog" /><category term="parallel programming" /><category term="english" /><category term="libee" /><category term="cee" /><category term="syslog" /><category term="sylog" /><category term="config" /><category term="libree" /><category term="time" /><category term="log4j" /><category term="tcp" /><category term="unawe" /><category term="monogodb" /><title>Rainer's Blog</title><subtitle type="html">This Blog is about many things Rainer is interested in. This happens to include syslog, astronomy and other fun things.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.gerhards.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.gerhards.net/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>451</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/cmfi" /><feedburner:info uri="blogspot/cmfi" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-nc-sa/2.0/" /><logo>http://creativecommons.org/images/public/somerights20.gif</logo><entry gd:etag="W/&quot;C08MQH0-eCp7ImA9WhVVGUU.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-6092003233852444986</id><published>2012-05-14T09:51:00.000+02:00</published><updated>2012-05-14T09:51:21.350+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-14T09:51:21.350+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>omudpspoof, threads, and libnet..</title><content type="html">I today ran into a problem with omudpspoof (rsyslog's UDP spoofing output module) that only occured when multiple output threads were used. If that perquisite was given and a larger traffic volume was generated, rsyslog relatively quickly aborted - often even during startup, otherwise very quickly thereafter. Diging down to the potential troublespot, it turned out that libnet is not threadsafe (and I have to admit they do not explicitely claim that). That was a very quick hint, and I now protect libnet calls via a mutex, ensuring that only one thread at a time will ever call into libnet. Of course, this somewhat limits concurrency, but for obvious reasons stability is far more important. There was also recently some discussion on different-kind problems with omudpspoof. While I do not think that this was releated to multithreading (data was malformed, what I could not reproduce), I can not totally outrule that. Will try to follow up with that on the mailing list as well.&lt;br /&gt;
&lt;br /&gt;
The problem probably took quite some while to surface, as people usually have a single UDP spoofing action AND do not run it on multiple threads (given the i/o-boundness of this action, you probably can not gain much be using more than the standard single instance thread).&lt;br /&gt;
&lt;br /&gt;
If you are interested in patching older versions, the &lt;a href="http://git.adiscon.com/?p=rsyslog.git;a=commitdiff;h=131e581845678a30e3dea0e499e78acc429cd5fa" target="_blank"&gt;patch is available via git&lt;/a&gt; (use the raw link to obtain a file usuable with patch). New releases are due soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-6092003233852444986?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/38tNRn7aQQw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/6092003233852444986/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=6092003233852444986" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/6092003233852444986?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/6092003233852444986?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/38tNRn7aQQw/omudpspoof-threads-and-libnet.html" title="omudpspoof, threads, and libnet.." /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/05/omudpspoof-threads-and-libnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8FRHs_eip7ImA9WhVXGU4.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-8317460309612052659</id><published>2012-04-20T16:40:00.001+02:00</published><updated>2012-04-20T16:40:15.542+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-20T16:40:15.542+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rfc5424" /><category scheme="http://www.blogger.com/atom/ns#" term="syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee-enhanced syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>RFC5424 or cee-enhanced syslog?</title><content type="html">I&amp;nbsp; recently got a question if it would be better to implement RFC5424 or cee-enhanced syslog in a new project. This sounds like a though question, but looking at the details helps to ease it a bit.&lt;br /&gt;
&lt;br /&gt;
First of all, RFC5424 has a far broader scope than cee-enhanced syslog. RFC5424 is the base RFC of a new series of syslog RFCs that solve many problems, among them (this list for sure will not be complete):&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;finally a standardized syslog format (no standard exists before, just a weak understanding)&lt;/li&gt;
&lt;li&gt;supports multiple transports, e.g. UDP and TLS (all in their own RFCs)&lt;/li&gt;
&lt;li&gt;solves some long-standing nits, like the date format (RFC5424 supports high precision and demands a year as part of the timestamp)&lt;/li&gt;
&lt;li&gt;increases the syslog message size and permits operators to set an (almost) arbitrary upper limit for message sizes&lt;/li&gt;
&lt;li&gt;supports structured logging via so-called "structured data"&lt;/li&gt;
&lt;/ul&gt;
In contrast, cee-enhanced syslog only cares about the structured logging feature - none of the others is addressed with it. This is the case because its intent is different: the goal here is to have a format that can work with existing technology and still provide the best possible structured logging solution. Depending on circumstances, "best possible" can be quite different. For example, in a scenario where it needs to work with crufty old syslogds, it can mean that message content can not be longer than 1k, a serious restriction. Even more, it is envisioned that cee-enhanced syslog will also work over non-syslog transport, and may even be transported by simply copying (and merging) files.&lt;br /&gt;
&lt;br /&gt;
CEE has long thought about using RFC5424 structured data format for its structured logging needs. However, that would have limited its ability to work with all these older (and deployed) syslog implementations. Thus, the decision was made to use text that purely resides inside the message part and, without transformation, can be used in legacy systems (with given restrictions, of course).&lt;br /&gt;
&lt;br /&gt;
So now back to the question: what to implement? With this facts, I think it boils down to "both". To use the benefits of modern-day syslog (as described above), you definitely need to implement RFC5424 and its helper RFCs (like 5425 for TLS). HOWEVER, the question remains if one should use structured data or cee-enhanced syslog. This, I have to admit, is indeed a though question.&lt;br /&gt;
&lt;br /&gt;
My personal opinion, which can be totally wrong and is solely based on my experience (aka "gut feeling" ;)), cee-enhanced syslog sounds more promising for structured data. The main reason for this is that the format has received very good responses from major players and a lot of work is currently being done by a lot of folks driving important projects in the logging environment. There is also a lot of supporting libraries upcoming AND some of them already available. Most importantly, this effort is thightly integrated with Mitre and&amp;nbsp; it probably is not to far-fetched to assume that cee-enhanced syslog will appear on some purchasing checklists in the not so distant future. RFC5424 structured data does not have this broad backing. So while cee-enhanced syslog is a very fresh project, my personal assumption is that it will take off.&lt;br /&gt;
&lt;br /&gt;
But again, that does not mean that RFC5424 shall not be implemented. I think RFC5424 technology is vital for a number of reasons. Of course, things like TLS can also be obtained without RFC5424, but not in a standards-compliant way. So to ensure interoperability, going the 5424 way is a good idea.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-8317460309612052659?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/0z1lj1EA_-E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/8317460309612052659/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=8317460309612052659" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/8317460309612052659?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/8317460309612052659?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/0z1lj1EA_-E/rfc5424-or-cee-enhanced-syslog.html" title="RFC5424 or cee-enhanced syslog?" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/rfc5424-or-cee-enhanced-syslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMFQH0zfCp7ImA9WhVXGU8.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-594431809364809192</id><published>2012-04-20T15:10:00.000+02:00</published><updated>2012-04-20T15:10:11.384+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-20T15:10:11.384+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="monogodb" /><title>MongoDB, BSON and templates...</title><content type="html">After I have improved the template system yesterday, I have begun to think again about the integration of custom templates (actually field lists) with ommongodb (rsyslog's mongodb output plugin). A "problem" with the mongo interface is that it does not support native JSON but rather BSON, its binary equivalent. So what needs to be done is convert the textual JSON representation to BSON before it can be stored in MongoDB. Given the fact that the JSON representation must be build with the property replacer, this looks like a was of coding/enconding. Assuming that I would take JSON and tansfrom it to BSON (all this in ommongodb), the workflow would be as follows:&lt;br /&gt;
&lt;br /&gt;
text properties -&amp;gt; encode JSON -&amp;gt; decode JSON -&amp;gt; generate BSON&lt;br /&gt;
&lt;br /&gt;
The "encode JSON" step would happen inside the template processr, the "decode JSON" part in ommongodb. In essence, this looks like a quite flexible, but rather slow approach. After all, it would serialize to JSON just for interim needs. What I am actually looking for is this workflow:&lt;br /&gt;
&lt;br /&gt;
text properties -&amp;gt; generate BSON&lt;br /&gt;
&lt;br /&gt;
In that we would replace the JSON format with some internal format. That internal format in a kind already exists, in array passing mode. In this mode, the property text is passed in via an array. As a side-note, some transformations are necessary and desired even in internal format, as the property replacer permits to use not only the raw properties themselves but substrings, case conversions, regexes and the like. The problem with array passing mode is that it provides just the plain values. However, for BSON (and MongoDB) we also need to know the field name - and type information. The latter is probably easy, as rsyslog usually deals with text, only, and so we could stick to strings except maybe for dates. The field name is available since yesterday inside the template structure. However, there currently is no way for a plugin to access this information.&lt;br /&gt;
&lt;br /&gt;
So it looks like the decent thing is to create a new interface that passes in a (description,value) pair to the plugin. The description most probably could be the template structure (or some abstraction if we feel bad about tying things too deeply together). That will prevent the detour via JSON, but still provide otherwise full capabilities. The bad thing, however, is that some complex interface gets yet another option (maybe it is time for a general cleanup?).&lt;br /&gt;
&lt;br /&gt;
Feedback on this issue is appreciated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-594431809364809192?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/NxIypD7B6NI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/594431809364809192/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=594431809364809192" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/594431809364809192?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/594431809364809192?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/NxIypD7B6NI/mongodb-bson-and-templates.html" title="MongoDB, BSON and templates..." /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/mongodb-bson-and-templates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEMQX85cSp7ImA9WhVXGEk.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-1345024529836126374</id><published>2012-04-19T15:53:00.000+02:00</published><updated>2012-04-19T15:54:40.129+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-19T15:54:40.129+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="json" /><category scheme="http://www.blogger.com/atom/ns#" term="elasticsearch" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>rsyslog templates &amp; json</title><content type="html">I today added a simpler method to specify JSON inside rsyslog templates. The new method simplifies specifying JSON-encoded fields. It still looks a bit ugly, but if you look closely enough, you'll quickly notice that it no longer needs "quoting magic" and thus is far easier to work with.&lt;br /&gt;
&lt;br /&gt;
Previously, you had to define a template like this:&lt;br /&gt;
&lt;br /&gt;
$template tpl, 
"{\"message\":\"%msg:::json%\",\"fromhost\":\"%HOSTNAME:::json%\",\"facility\":\"%syslogfacility-text%\",\"priority\":\"%syslogpriority-text%\",\"timereported\":\"%timereported:::date-rfc3339%\",\"timegenerated\":\"%timegenerated:::date-rfc3339%\"}"&lt;br /&gt;
&lt;br /&gt;
The template given above is the default for ElasticSearch. With the new code, this can be replaced by:&lt;br /&gt;
&lt;br /&gt;
$template tpl,"{%msg:::jsonf:message%,%HOSTNAME:::jsonf:fromhost%,%syslogfacility-text:::jsonf:facility%,%syslogpriority-text:::jsonf:priority%,%timereported:::date-rfc3339,jsonf%,%timegenerated:::date-rfc3339,jsonf%}"&lt;br /&gt;
&lt;br /&gt;
It's a bit shorter, but most importantly the JSON field is now generated by the property itself. This is triggered by the "jsonf" (json field) option. If it is given, a&lt;br /&gt;
&lt;br /&gt;
"fieldname"="value"&lt;br /&gt;
&lt;br /&gt;
is automatically generated. The fieldname is either the forth parameter (see "message" in the msg field in the example above) or, if not given, defaults to the property name. If I hadn't insisted on specific field names, I could have written the sample as such:&lt;br /&gt;
&lt;br /&gt;
$template tpl,"{%msg:::json%,%HOSTNAME:::jsonf%,%syslogfacility-text:::jsonf%,%syslogpriority-text:::jsonf%,%timereported:::date-rfc3339,jsonf%,%timegenerated:::date-rfc3339,jsonf%}"&lt;br /&gt;
&lt;br /&gt;
Note that the commas to separate the various JSON fields must still be included inside the template as literal text.&lt;br /&gt;
&lt;br /&gt;
This new system works pretty well within the current template system. The config format will probably become a bit more intuitive when moving it over to the new config language. But the exact how's of that are still to be decided. In fact, I think this string-based way of specifying templates is not so bad. In any case, I am also considering a template option which would take a template of pure field lists and generate proper JSON out of that. But that's work for another day (or so ;)).&lt;br /&gt;
&lt;br /&gt;
This is to be released with 6.3.9 and already available via the git master branch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-1345024529836126374?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/9uub0RF73Mk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/1345024529836126374/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=1345024529836126374" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/1345024529836126374?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/1345024529836126374?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/9uub0RF73Mk/rsyslog-templates-json.html" title="rsyslog templates &amp; json" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/rsyslog-templates-json.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQNRHgycCp7ImA9WhVXFUU.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-983439763155529923</id><published>2012-04-16T16:59:00.003+02:00</published><updated>2012-04-16T16:59:55.698+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-16T16:59:55.698+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="configuration" /><category scheme="http://www.blogger.com/atom/ns#" term="elasticsearch" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>rsyslog &amp; elasticsearch: async replication and timeout</title><content type="html">Today I have added the capability to specify asynchronous replication support and timeout settings to omelasticsearch. Code-wise it's a small change - it just passed the required parameters to ElasticSearch via the proper REST URL parameters. By default, both parameters are not set, that means default timeout and synchronous replication.&lt;br /&gt;
&lt;br /&gt;
To set parameters, use&lt;br /&gt;
&lt;br /&gt;
*.*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action(type="omelasticsearch"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... other params ...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asyncrepl="on" timeout="1m") &lt;br /&gt;
&lt;br /&gt;
If you leave "asyncrepl" out or set it to "off", synchronous replication is used. For greatest flexiblity, the value of the "timeout" parameter is not checked. While this enables you to use anything ElasticSearch supports, invalid values can not be detected by omelasticsearch and thus will cause all inserts to fail (or misbehave). Note that some basic integrity checking is done, but we do not go great length here. So use with care.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-983439763155529923?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/RrJ2lI_E538" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/983439763155529923/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=983439763155529923" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/983439763155529923?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/983439763155529923?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/RrJ2lI_E538/rsyslog-elasticsearch-async-replication.html" title="rsyslog &amp; elasticsearch: async replication and timeout" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/rsyslog-elasticsearch-async-replication.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMBQnk6cCp7ImA9WhVXE08.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-4582262783081271717</id><published>2012-04-13T15:40:00.004+02:00</published><updated>2012-04-13T15:40:53.718+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-13T15:40:53.718+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="elasticsearch" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>rsyslog &amp; ElasticSearch: using dynamic index and type</title><content type="html">Today, I have added support for dynamically taking search index and type from the message itself. It works much like dynafiles do. If dynamic mode is selected (via config params), the index name and type given in the configuration are template names instead of&amp;nbsp; literal ones. That means the rsyslog core will generate the actual name at runtime, based on actual message content. These dynamically generated values will then be used inside the request.&lt;br /&gt;
&lt;br /&gt;
Here is a quick howto:&amp;nbsp; you need to define the templates first, like this:&lt;br /&gt;
&lt;br /&gt;
$template srchidx,"%hostname%"&lt;br /&gt;$template srchtype,"%programname%"&lt;br /&gt;
&lt;br /&gt;
In this example, the hostname (from the message) is used as name for the search index, and the programname (usually part of the syslog tag) is used as searchtype. The full power of templates, including all properties, can be used, so this is highly flexible.&lt;br /&gt;
&lt;br /&gt;
To actually use these dynamic values, omelasticsearch must be called like this (line break do not matter):&lt;br /&gt;
&lt;br /&gt;
*.*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action(type="omelasticsearch"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; searchIndex="srchidx" dynSearchIndex="on"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; searchType="srchtype" dynSearchType="on")&lt;br /&gt;
&lt;br /&gt;
The "dynSearch..." setting tells the engine if it is a dynamic name or not. If set to on, like above, a template name is given and the actual name will be dynamically generated. If set to "off", the literal value will be used ("off" is the default, so the parameters do not need to be specified if "off" is desired). For example:&lt;br /&gt;
&lt;br /&gt;
*.*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action(type="omelasticsearch"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; searchIndex="srchidx"&amp;nbsp;&amp;nbsp; searchType="srchtype")&lt;br /&gt;
&lt;br /&gt;
will use the index "srchidx" and type "srchtype" literally. No template-based name extension will happen in this case. Please note that it is ok for only one parameter to by dynamic. It's not "all or nothing".&lt;br /&gt;
&lt;br /&gt;
I hope this is a useful addition for omelasticsearch. Several folks have indicated that this method can increase throughput in a couple of use cases, for example to split of indexes based on host names, host functions and the like.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-4582262783081271717?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/l0pSZMVd7LA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/4582262783081271717/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=4582262783081271717" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/4582262783081271717?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/4582262783081271717?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/l0pSZMVd7LA/rsyslog-elasticsearch-using-dynamic.html" title="rsyslog &amp; ElasticSearch: using dynamic index and type" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/rsyslog-elasticsearch-using-dynamic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08EQXk6fip7ImA9WhVXEkk.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-1052078749503761999</id><published>2012-04-12T15:41:00.002+02:00</published><updated>2012-04-12T16:43:20.716+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-12T16:43:20.716+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>new rsyslog v5-beta released</title><content type="html">&lt;b&gt;I just released &lt;a href="http://www.rsyslog.com/rsyslog-5-9-6-v5-beta-released/" target="_blank"&gt;rsyslog 5.9.6&lt;/a&gt;, now a beta and no longer a development version&lt;/b&gt;. I have done a big merge today of bug fixes and small enhancements from the v5 branch and combined that all into 5.9.6. The plan is to mature this version as quickly as possible, which could really mean "rather quick". For one, 5.9.5 is released for three month now and seem to have not broken quite a bit. Secondly, there are only very few new features and those that have been added already got their practice drill in some large environments (and such seem to be save for wider consumption).&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;I also sincerely hope that this will conclude the v5-devel branch for the foreseeable future&lt;/b&gt;. Having two active development branches always is a big burden, and merges are both time-consuming and error-prone. So if at all possible, I'll try to refrain from doing any larger-scale development work in v5. It needs to be seen if I can hold to that when it comes to paid custom work. On the other hand, the v6 engine has also gotten both rather stable AND much feature enhanced. So it probably is a good idea to being to ask people to move up to v6. But that's another story, to be written in the not so distant future ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-1052078749503761999?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/VHUe2ieGaKM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/1052078749503761999/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=1052078749503761999" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/1052078749503761999?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/1052078749503761999?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/VHUe2ieGaKM/new-rsyslog-v5-beta-released.html" title="new rsyslog v5-beta released" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/new-rsyslog-v5-beta-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUICQ3s5fyp7ImA9WhVXEk4.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-5175484559099994699</id><published>2012-04-12T15:32:00.002+02:00</published><updated>2012-04-12T15:32:42.527+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-12T15:32:42.527+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>rsyslog group on Facebook</title><content type="html">I just created a &lt;a href="http://www.facebook.com/groups/220520721381073/" target="_blank"&gt;rsyslog group on facebook&lt;/a&gt;. I hope it is useful. It's a very interesting experiment for me. Are the tech folks available there as well? Will it work better than e.g. the rsyslog forum itself? I guess time will (quickly) tell. At best, this could become a nice new channel to get news out and motivate people to try out new versions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-5175484559099994699?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/7KHmcsPxKxg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/5175484559099994699/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=5175484559099994699" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/5175484559099994699?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/5175484559099994699?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/7KHmcsPxKxg/rsyslog-group-on-facebook.html" title="rsyslog group on Facebook" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/rsyslog-group-on-facebook.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4CSXczfCp7ImA9WhVXEEs.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-8524674824347548462</id><published>2012-04-10T15:19:00.000+02:00</published><updated>2012-04-10T15:19:28.984+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-10T15:19:28.984+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="elasticsearch" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>Using different templates with rsyslog's ElasticSearch plugin</title><content type="html">Recently, an experimental ElasticSearch plugin has been added to rsyslog, omelasticsearch. Like all other output plugins, it comes with a canned template, which specifies a default "schema". However, the template engine provides capabilities to use a completely different set of fields. In this blog post, I'll briefly describe how this is done.&lt;br /&gt;
&lt;br /&gt;
Note: all work is based on the current (April, 10th 2012) implementation of both omelasticsearch as well as the rsyslog core. Future implementation changes are expected in an effort to make things more intuitive. This may even break what I describe here. So if you come to this blog post at a later time, it probably is best to check if things have changed by "now" (especially if the procedure does not work ;)).&lt;br /&gt;
&lt;br /&gt;
The current implementation ties into the template system. The default template looks as follows (all on one line, broken for readability):&lt;br /&gt;
&lt;br /&gt;
$template JSONDefault, "{\"message\":\"%msg:::json%\",\"fromhost\":\"%HOSTNAME:::json%\",\"facility\":\"%syslogfacility-text%\",\"priority\":\"%syslogpriority-text%\",\"timereported\":\"%timereported:::date-rfc3339%\",\"timegenerated\":\"%timegenerated:::date-rfc3339%\"}"&lt;br /&gt;
&lt;br /&gt;
The '\"' sequence is needed to represent a quote character inside the template. To format JSON, this is pretty ugly, but that's the way the template processor currently works (and that is one reason why it is under review). As you can see, the JSON is actually "hand-crafted", with the "json" option specifying that property text needs to be properly escaped to be well-formed JSON. If that option is specified, the template processor does the necessary escaping. Note that not all properties have the "json" option. This is purely for performance reasons. For example, time stamps do never include characters that need to be escaped. Consequently, the "json" option is not used there (but could be, e.g. "date-rfc3339,json").&lt;br /&gt;
&lt;br /&gt;
So now let's define a different set of fields to be used. Let's say we just want to have the date from the syslog message and the MSG part of the message itself. That would be as follows:&lt;br /&gt;
&lt;br /&gt;
$template miniSchema, 
"{\"message\":\"%msg:::json%\",\"timereported\":\"%timereported:::date-rfc3339,json%\"}"&lt;br /&gt;
&lt;br /&gt;
Note: I requested JSON formatting in this example just to prove the point - don't use it in a real deployment, as it is nonsense that costs CPU cycles ;)&lt;br /&gt;
&lt;br /&gt;
Now I need to use the template within the omelasticsearch action. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
*.*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action(type="omelasticsearch" template="miniSchema")&lt;br /&gt;
&lt;br /&gt;
Note: the "all" ("*.*") filter of course can be replaced with a different type of filter.&lt;br /&gt;
&lt;br /&gt;
That's all that needs to be done. Please note that you can add several templates and use these in several different elasticsearch output actions. Just exactly the same thing used in other actions. Also keep in mind that the &lt;a href="http://www.rsyslog.com/doc/property_replacer.html" target="_blank"&gt;property replacer&lt;/a&gt; permits to access a wide range of message properties. Most importantly, normalized properties or cee-enhanced syslog properties can be accessed via the CEE family of property names (essentially "$!cee-name" style). Just be sure that you include the "json" option into any property that may contain unsafe characters (which means almost all of the fields). This is not done automatically by the current engine and invalid characters can lead to strange problems, even aborts of ElasticSearch itself!&lt;br /&gt;
&lt;br /&gt;
In the future, a more intuitive syntax is planned for JSON template definitions. Nevertheless, the current code permits full customization but requires taking care of the details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-8524674824347548462?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/KvkWyK0A6-g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/8524674824347548462/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=8524674824347548462" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/8524674824347548462?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/8524674824347548462?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/KvkWyK0A6-g/using-different-templates-with-rsyslogs.html" title="Using different templates with rsyslog's ElasticSearch plugin" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/using-different-templates-with-rsyslogs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcGRHs6fip7ImA9WhVXEEg.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-3754475139000199651</id><published>2012-04-10T12:00:00.000+02:00</published><updated>2012-04-10T12:00:25.516+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-10T12:00:25.516+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="logtools" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>Which command line tools would you like to see for logging?</title><content type="html">As part of project lumberjack, I am considering which tools would be vital to have in your logging infrastructure. Assume that you have a database that contains security relevant events, like syslog data or events from the Windows Event Log. Which tools would you like to have to access (and modify?) the database? Note that I am asking for small things, not something like "I'd like to have a full-blown SIEM" (of course you do). I am more focussed on tools like auditctl, tools that can be made the building blocks of your security system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-3754475139000199651?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/WXml41FHI-w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/3754475139000199651/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=3754475139000199651" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/3754475139000199651?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/3754475139000199651?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/WXml41FHI-w/which-command-line-tools-would-you-like.html" title="Which command line tools would you like to see for logging?" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/04/which-command-line-tools-would-you-like.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMCRX8-eyp7ImA9WhVQEU8.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-5631280700105448268</id><published>2012-03-30T18:54:00.001+02:00</published><updated>2012-03-30T18:54:24.153+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-30T18:54:24.153+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ommongodb" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="monogodb" /><title>Current state of ommongodb default schema</title><content type="html">&lt;b&gt;Rsyslog's ommongodb provides a default schema which is used for syslog data if no other is specified.&lt;/b&gt; It tries to align with the &lt;a href="https://fedorahosted.org/lumberjack/" target="_blank"&gt;lumberjack&lt;/a&gt; project, so the schema may change in the next weeks, as hopefully a standard field set is defined there. I originally started with a very small set of fields (based on early cee/lumberjack schema), but it turned out to be too small to be really useful for real-world applications. So I have added a couple of fields today. The currently supported fields are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;sys - name of the system the message originated from (STRING)&lt;/li&gt;
&lt;li&gt;time - timestamp from the syslog message (UTC_DATETIME)&lt;/li&gt;
&lt;li&gt;time_rcvd - timestamp when the rsyslog instance received the message (UTC_DATETIME)&lt;/li&gt;
&lt;li&gt;msg - the free-form message text (STRING)&lt;/li&gt;
&lt;li&gt;syslog_fac - the syslog facility in numerical form, see RFC5424 to decode (INT32)&lt;/li&gt;
&lt;li&gt;syslog_sever - the syslog severity in numerical form, see RFC5424 to decode (INT32)&lt;/li&gt;
&lt;li&gt;syslog_tag - the traditional syslog tag (STRING) &lt;/li&gt;
&lt;li&gt;procid - the &lt;i&gt;name &lt;/i&gt;of the process that emitted the message (STRING)&lt;/li&gt;
&lt;li&gt;pid&amp;nbsp; - the process id of the the process that emitted the message (STRING)&lt;/li&gt;
&lt;li&gt;level - a severity level based on the lumberjack schema definition (STRING)&lt;/li&gt;
&lt;/ul&gt;
Please also see &lt;a href="http://blog.gerhards.net/2012/03/rsyslog-cee-base-schema-mapping.html" target="_blank"&gt;my previous blog post on cee/lumberjack schema mapping&lt;/a&gt;, which most importantly describes the current level mapping.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Note that the default schema currently does NOT contain data obtained by parsing cee-enhanced syslog JSON part of the message. Current thinking is that we probably best include this as a sub-elements, maybe together with other structured data like RFC5424 structured data. This is currently being worked on. It's less missing time to implement but the desire to avoid re-doing things as the spec changes. Anyhow, I'll probably have a "timeout" after which I will implement at least some idea (after all, not too much work will be lost if things change).&lt;br /&gt;
&lt;br /&gt;
If you use this schema, please keep in mind that it is &lt;b&gt;experimental&lt;/b&gt;. At this stage I will not try to remain backwards compatible when I do changes. So excpect that newer versions may break your things!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-5631280700105448268?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/BdMK5pNKZ2Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/5631280700105448268/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=5631280700105448268" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/5631280700105448268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/5631280700105448268?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/BdMK5pNKZ2Q/current-state-of-ommongodb-default.html" title="Current state of ommongodb default schema" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/current-state-of-ommongodb-default.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIBQns5eip7ImA9WhVQEU8.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-3059685144825261234</id><published>2012-03-30T17:49:00.001+02:00</published><updated>2012-03-30T17:49:13.522+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-30T17:49:13.522+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="monogodb" /><category scheme="http://www.blogger.com/atom/ns#" term="Adiscon LogAnalyzer" /><title>Adiscon LogAnalyzer now supports MongoDB</title><content type="html">I just wanted to share the good news that Andre, &lt;a href="http://loganalyzer.adiscon.com/" target="_blank"&gt;LogAnalyzer&lt;/a&gt;'s development lead, today finished implementing a logstream driver for MongoDB. So this nice tool can now also be used to access MongoDB based data. Andre's lab data was created by rsyslog's ommongo output module (you currently need rsyslog git master branch to make this work). The logstream driver is not yet really optimized and we do not make full use of the NoSQL capabilites (like different schemas inside a single collection and all this). However, there is lots of exciting stuff on the todo list and I thought I mention a first successful step - and probably a quite important one if you "just want to use that thing" ;) So: good news for a Friday!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-3059685144825261234?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/LRL863iPf4E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/3059685144825261234/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=3059685144825261234" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/3059685144825261234?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/3059685144825261234?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/LRL863iPf4E/adiscon-loganalyzer-now-supports.html" title="Adiscon LogAnalyzer now supports MongoDB" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/adiscon-loganalyzer-now-supports.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EBQ30_eSp7ImA9WhVRF0o.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-4146098844960235807</id><published>2012-03-26T18:34:00.001+02:00</published><updated>2012-03-26T18:34:12.341+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-26T18:34:12.341+02:00</app:edited><title>[OT] friend needs help in music contest ;)</title><content type="html">Hi folks, my blog's title says it is about the many thing's Rainer is interested in. If you look at the postings, that seems to mean "syslog". Today is one of the rare occurences that I write about something else, and it is also a request for a little bit of help...&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://translate.google.com/translate?sl=de&amp;amp;tl=en&amp;amp;js=n&amp;amp;prev=_t&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;layout=2&amp;amp;eotf=1&amp;amp;u=www.peszkohogl.de" target="_blank"&gt;Friends of mine&lt;/a&gt; produce fine (non-mainstream) music. They have entered a local contest over here with a re-interpretation of a classical theme. I really enjoy the modern "feeling" of the theme. I would like to invite all of you to listen yourself - and vote for them if you like what you hear. "&lt;a href="http://www.ds5-sound.de/die-abstimmung/song/8970" target="_blank"&gt;Pepper Dance&lt;/a&gt;", as it is called, is available form &lt;a href="http://www.ds5-sound.de/die-abstimmung/song/8970" target="_blank"&gt;this site.&lt;/a&gt; Unfortunately it is in German only, but navigation shouldn't be too hard: the play button is pretty universal ;-). And if you'd like to vote for it, just follow the big "Jetzt Abstimmen" link below the photo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-4146098844960235807?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/k8XSiTFEHPA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/4146098844960235807/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=4146098844960235807" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/4146098844960235807?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/4146098844960235807?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/k8XSiTFEHPA/ot-friend-needs-help-in-music-contest.html" title="[OT] friend needs help in music contest ;)" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/ot-friend-needs-help-in-music-contest.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcMRHYyfSp7ImA9WhVREUk.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-7120789561281020038</id><published>2012-03-19T08:46:00.000+01:00</published><updated>2012-03-19T09:51:25.895+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-19T09:51:25.895+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>rsyslog / CEE base schema mapping</title><content type="html">I am giving a first shot at a &lt;b&gt;mapping of the CEE base schema (as currently described in project lumberjack, NOT on the CEE site!) to rsyslog properties.&lt;/b&gt; The core idea is to use this mapping as the default for ommongodb. Then, rsyslog shall be able to write this schema, while &lt;a href="http://www.logtools.org/" target="_blank"&gt;logtools&lt;/a&gt; (and others) can rely on it. For obvious reasons "rely" is not to be treated literally, as the whole thing currently is a moving target.&lt;br /&gt;
&lt;br /&gt;
So I would deeply appreciate feedback for improving this mapping.&lt;br /&gt;
&lt;br /&gt;
In the following mapping, the cee field name is first, the rsyslog property second.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fields we can always map:&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;srchost -&amp;gt; hostname&lt;/li&gt;
&lt;li&gt;time -&amp;gt; timestamp &lt;i&gt;(rsyslog currently populates subseconds, what seems not to be supported in lumberjack)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;msg -&amp;gt; msg &lt;i&gt;(initially used rawmsg, but decided against this)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;pid -&amp;gt; procid (may not actually be a Linux process ID)&lt;/li&gt;
&lt;li&gt;proc -&amp;gt; app-name&lt;/li&gt;
&lt;li&gt;level -&amp;gt; generated based on syslog severity (value mapping see below)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;Translation of syslog severity to lumberjack level&lt;/b&gt; (not bijective, syslog first, number in parenthesis denotes numerical value):&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;emergency(0) -&amp;gt; FATAL&lt;/li&gt;
&lt;li&gt;alert(1), critical(2), error(3) -&amp;gt; ERROR&lt;/li&gt;
&lt;li&gt;warning(4) -&amp;gt; WARN&lt;/li&gt;
&lt;li&gt;notice(5), informational(6) -&amp;gt; INFO&lt;/li&gt;
&lt;li&gt;debug(7) -&amp;gt; DEBUG&lt;/li&gt;
&lt;li&gt;(never mapped) -&amp;gt; TRACE&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Fields we do not currently provided, but could be in some cases:&lt;/b&gt;&lt;br /&gt;
Note that these fields may or may not be present inside a JSON/BSON document.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;ppid -&amp;gt; parent process ID (SCM_CREDENTIALS, local only?)&lt;/li&gt;
&lt;li&gt;uid -&amp;gt;&amp;nbsp;
(SCM_CREDENTIALS, local only?)&lt;/li&gt;
&lt;li&gt;gid -&amp;gt;&amp;nbsp;
(SCM_CREDENTIALS, local only?)&lt;/li&gt;
&lt;li&gt;tid -&amp;gt; thread ID (questionable, can probably not provided with current logging API)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
As I said, feedback and suggestions are highly welcome. This list ist work in progress and can change in any instant. I'll provide notification when the interface has stabilized. Do not expect this soon.&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-7120789561281020038?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/U18RcCc7SBI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/7120789561281020038/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=7120789561281020038" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/7120789561281020038?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/7120789561281020038?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/U18RcCc7SBI/rsyslog-cee-base-schema-mapping.html" title="rsyslog / CEE base schema mapping" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/rsyslog-cee-base-schema-mapping.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMERnY5fCp7ImA9WhVREEo.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-8060878077206341499</id><published>2012-03-18T12:33:00.001+01:00</published><updated>2012-03-18T12:33:27.824+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-18T12:33:27.824+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><category scheme="http://www.blogger.com/atom/ns#" term="monogodb" /><category scheme="http://www.blogger.com/atom/ns#" term="Adiscon LogAnalyzer" /><title>next steps for ommongodb</title><content type="html">I just wanted to give you a heads-up on my work on ommongodb. During the past couple of days I have converted it to libmongo-client, which gives us a much more solid basis. I have also refactored it to some degree and adopted it to the new v6 config interface. Also, ommongodb will &lt;b&gt;not&lt;/b&gt;&amp;nbsp;be supported on pre-v6 platforms. This enables me to use the v6-exclusive features I am building now, especially great JSON and CEE support. Right now, ommongodb uses a very limited field set, and this set is hardcoded (so you can change it, but that means you need to change code).&lt;br /&gt;
&lt;br /&gt;
My next step is to make ommongodb support the base event (as currently being discussed in project lumberjack). I will also provide a capability to add "extra" information from the cee field set. That's probably not a perfect solution, but the goal is to get ready for some command line tools that are able to extract data from mongodb and thus make the system mimic it is a traditional flat-file syslog format. I have also asked Andre, the lead behind Adiscon LogAnalyzer to consider adding support for MongoDB to loganayzer. I have not yet heard back from him and don't know exactly about his schedule, but I hope we will be able to make this happen very soon.&lt;br /&gt;
&lt;br /&gt;
Only after that - somewhat hardcoded - work is done I'll go back and look at JSON and templates in a more native way (very probably also looking at the contributed JSON string generator in more depth).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-8060878077206341499?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/PBK1_ZJOzzg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/8060878077206341499/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=8060878077206341499" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/8060878077206341499?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/8060878077206341499?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/PBK1_ZJOzzg/next-steps-for-ommongodb.html" title="next steps for ommongodb" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/next-steps-for-ommongodb.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYCQH0_fSp7ImA9WhVSGE0.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-425452606527442852</id><published>2012-03-15T10:02:00.000+01:00</published><updated>2012-03-15T10:02:41.345+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-15T10:02:41.345+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="json" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>JSON and rsyslog templates</title><content type="html">&lt;b&gt;Rsyslog already supports JSON parsing and formatting &lt;/b&gt;(for all cee properties). However, the way formatting currently is done is unsatisfactory to me. Right now, we just take the cee properties as they are and format them into JSON format. In this mode, we do not have any way to specify which fields to use and we also do not have a way to modify the field contents (e.g. pick substrings or do case conversions). Exactly these are the use cases rsyslog invented templates for.&lt;br /&gt;
&lt;br /&gt;
One way to handle the situation is to have the user write the JSON code inside the template and just inject the data field where desired. This almost works (and I know &lt;a href="https://twitter.com/#%21/taotetek" target="_blank"&gt;Brian Knox&lt;/a&gt; tries to explore that route). IT just works "almost" as there is currently no property replacer option to ensure proper JSON escaping. Adding this option is not hard. However, I don't feel this approach is the right route to take: making the admin craft the JSON string is error-prone and very user-unfriendly.&lt;br /&gt;
&lt;br /&gt;
So I wonder what would be a good way to specify fields that shall go into a JSON format. As a limiting factor, the method should be possible within the limits of the current template system - otherwise it will probably take too long to implement it. The same question also arises for outputs like MongoDB: how best to specify the fields (and structure!) to be passed to the output module?&lt;br /&gt;
&lt;br /&gt;
Of course, both questions are closely related. One approach would be to solve the JSON encoding and say that to outputs like MongoDB JSON is passed. Unfortunately, this has strong performance implications. In a nutshell, it would mean formatting the data to JSON, and then re-parsing it inside the plugin. This process could be be somewhat simplified by passing the data structure (the underlaying tree) itself rather than the JSON encoding. However, this would still mean, that a data structure specific for this use would need to be created. That obviously involves a lot of data-copying. So it would probably be useful to have a capability to specify fields (and replacement options) that are just passed down to the module for its use (that would probably limit the required amount of data copying, at least in common cases). Question again: what would be a decent syntax to specify this?&lt;br /&gt;
&lt;br /&gt;
Suggestions are highly welcome. I need to find at least an interim solution urgently, as this is an important building block for the MongoDB driver and all work that will depend on it. So please provide feedback (note that I may try out a couple of things to finally settle on one - so any idea is highly welcome ;)).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-425452606527442852?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/rXW12C-lY8c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/425452606527442852/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=425452606527442852" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/425452606527442852?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/425452606527442852?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/rXW12C-lY8c/json-and-rsyslog-templates.html" title="JSON and rsyslog templates" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/json-and-rsyslog-templates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAHR3c4eyp7ImA9WhVSF04.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-864202453951811509</id><published>2012-03-14T14:45:00.002+01:00</published><updated>2012-03-14T14:45:36.933+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-14T14:45:36.933+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>signifying the local host IP in rsyslog</title><content type="html">&lt;b&gt;I had an interesting enhancement request these days: make rsyslog emit a real interface address with local-generated messages&lt;/b&gt; (inside the fromhost-ip property). Until now, rsyslog always uses the localhost IP (127.0.0.1) when it talks of the local machine being the message source. This request makes a lot of sense and I wonder that I didn't receive it earlier.&lt;br /&gt;
&lt;br /&gt;
We started with the imuxsock module, quickly followed by imklog ... and now some other internal message sources. Thinking of a local "problem" I so far have integrated the functionality into each plugin in question. It works via config directives, which enable to tell which interface's (e.g. eth0) IP is to be used. If not specified, we default back to "127.0.0.1", especially important for backward compatibility reasons (this change could cause a lot of harm to analysis tools!).&lt;br /&gt;
&lt;br /&gt;
The current work can be found in the git v5-devel branch. However, the approach seems to be unsatisfactory: it looks like it is the right path to permit each message source to grab a real IP address. With the way it is currently done, the code for doing that needs to be replicated to all sources. That doesn't look very smart.&lt;br /&gt;
&lt;br /&gt;
So I am thinking about refactoring the refactored code ;) The core idea is that a single global function could be used to provide &lt;b&gt;the&lt;/b&gt; local IP. Then, each plugin could query that function when it needs to know the local IP (much in the same way this currently happens for the hostname). The drawback of this approach is that only a single IP can be used across all sources. &lt;b&gt;Is that a problem or a feature? Please provide comments!&lt;/b&gt; Also, in pre-v6 the config may be somewhat inconsistent depending on where the interface setting is made. The reason is that in pre-v6 we do not have a clear point where we know the config is fully processed (but I may somewhat work around this inside the plugins themselves). Note that this is similar to the max message size config ugliness, where the size must be set right at the top of rsyslog.conf to work properly across all modules (and this causes confusion every now and then). In v6 (6.3 and above to be precise) this is no problem due to the enhanced and much more structured config processing.&lt;br /&gt;
&lt;br /&gt;
Please let me know your thoughts about this issue, so that I can take the right direction!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-864202453951811509?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/34RliYKwxRY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/864202453951811509/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=864202453951811509" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/864202453951811509?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/864202453951811509?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/34RliYKwxRY/signifying-local-host-ip-in-rsyslog.html" title="signifying the local host IP in rsyslog" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/signifying-local-host-ip-in-rsyslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEDRno5eyp7ImA9WhVTGUs.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-3378946206260888355</id><published>2012-03-05T18:21:00.000+01:00</published><updated>2012-03-05T18:31:17.423+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-05T18:31:17.423+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>finally... rsyslog agent for windows released</title><content type="html">It's done! &lt;b&gt;We have finally released the &lt;a href="http://www.rsyslog.com/windows-agent/"&gt;rsyslog Agent for Windows&lt;/a&gt;&lt;/b&gt;, a nice piece of software that enables easy integration of Windows Event Logs into a rsyslog backend system. Ideas for this tool floated around for roughly four to five month, and we had lots of internal discussions. It is important to note that we at Adiscon already have the necessary technology as part of our Windows products (actually, we invented this whole event-log-to-syslog type of software...), so it was just a matter of fine-tuning the code and selecting some useful default settings and policies.&lt;br /&gt;
&lt;br /&gt;
The release is important because it makes clear that there actually &lt;b&gt;is&lt;/b&gt; a Windows component (while I tried to convey that several times, people most often did not realize it due to name differences - something with "rsyslog" inside the name was expected). It is also important for me at Adiscon internally: the rsyslog Agent is a commercial product and license sales will make clear that this business is driven by rsyslog. And, obviously, I hope that this will help fund the project without need to resort to other things like premium plugins. This is also why the Agent is so important for the rsyslog project as whole: it will hopefully help to stabilize the funding situation even more.&lt;br /&gt;
&lt;br /&gt;
EDIT: I should probably mention that the Windows Agent was more or less ready when I held its release in order to integrate support for cee-enhanced syslog into it. I am glad I could convince my folks at Adiscon, so that we now have this exciting feature actually available.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-3378946206260888355?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/7RScIgGbN6s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/3378946206260888355/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=3378946206260888355" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/3378946206260888355?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/3378946206260888355?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/7RScIgGbN6s/finally-rsyslog-agent-for-windows.html" title="finally... rsyslog agent for windows released" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/finally-rsyslog-agent-for-windows.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4NSXc6fyp7ImA9WhVTGUk.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-2912025751860213480</id><published>2012-03-05T12:42:00.002+01:00</published><updated>2012-03-05T12:46:38.917+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-05T12:46:38.917+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="monitorware" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>CEE-enhanced syslog defined</title><content type="html">&lt;br /&gt;
&lt;b&gt;CEE-enhanced syslog is an upcoming standard for expressing structured data inside syslog messages.&lt;/b&gt; It is a cross-platform effort that aims at making log analysis (and log processing in general) much more easy both for log producers and consumers. The idea was originally born as part of &lt;a href="http://cee.mitre.org/"&gt;MITRE's CEE effort&lt;/a&gt;. It has been adopted by a larger set of logging stakeholders in an initiative that was named "&lt;a href="http://blog.gerhards.net/2012/02/announcing-project-lumberjack.html"&gt;project lumberjack&lt;/a&gt;". Under this project, cee-enhanced syslog, and a framework to make full use of it, is being openly advanced. It is hoped (and planned) that the outcome will flow back to the CEE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;In a nutshell cee-enhanced syslog is very simple and powerful:&lt;/b&gt; inside the syslog message, a special
 cookie ("@cee:") is followed by a JSON representation of the data. The cookie tells processors 
that the format is actually cee-enhanced. If you are interested in a more 
technical coverage, have a look at my &lt;a href="http://blog.gerhards.net/2012/03/what-is-cee-enhanced-syslog.html"&gt;cee-enhanced syslog howto presentation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;a href="http://www.adiscon.com/"&gt;Adiscon &lt;/a&gt;is one of the main supporters of project lumberjack and CEE enhanced syslog.&lt;/b&gt; Since February 2012, Adiscon products offer basic support for cee-enhanced syslog, being among the first tools to do so.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-2912025751860213480?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/DF5kjqvdzIk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/2912025751860213480/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=2912025751860213480" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/2912025751860213480?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/2912025751860213480?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/DF5kjqvdzIk/cee-enhanced-syslog-defined.html" title="CEE-enhanced syslog defined" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/cee-enhanced-syslog-defined.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04MRHg9fCp7ImA9WhVTFkw.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-5030504038418990944</id><published>2012-03-01T17:39:00.001+01:00</published><updated>2012-03-01T17:39:45.664+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-01T17:39:45.664+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>What is CEE-enhanced syslog?</title><content type="html">I just did a quick presentation on what cee-enhanced syslog actually is and how it works. I suggest to have at least a peek, as this format will probably become very important in the future. But why say more...&amp;nbsp; just get the full story in 5 minutes ;)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/C_mVwQM_oS0/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/C_mVwQM_oS0?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;
&lt;param name="bgcolor" value="#FFFFFF" /&gt;
&lt;embed width="320" height="266"  src="http://www.youtube.com/v/C_mVwQM_oS0?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-5030504038418990944?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/Z07ehNHwQLE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/5030504038418990944/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=5030504038418990944" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/5030504038418990944?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/5030504038418990944?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/Z07ehNHwQLE/what-is-cee-enhanced-syslog.html" title="What is CEE-enhanced syslog?" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/what-is-cee-enhanced-syslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAAR3s_cCp7ImA9WhVTFk0.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-4412958684067718086</id><published>2012-03-01T12:52:00.000+01:00</published><updated>2012-03-01T12:52:26.548+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-01T12:52:26.548+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="monitorware" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack." /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>cee-enhanced event log to syslog forwarding</title><content type="html">As many know, we at Adiscon also work hard at &lt;a href="http://www.monitorware.com/en/product/product_comparision.php"&gt;Windows Event Log to syslog forwarding software&lt;/a&gt;. During the past days we have taken the time to implement cee-enhanced syslog format inside these products as well. It is currently a proof of concept stage, but mostly because the relevant specs are also at PoC. This effort nicely integrated with the new &lt;a href="http://blog.gerhards.net/2012/02/announcing-project-lumberjack.html"&gt;project lumberjack&lt;/a&gt;, which aims at providing structured logging. New releases of the relevant Windows products (&lt;a href="http://www.eventreporter.com/"&gt;EventReporter&lt;/a&gt; and &lt;a href="http://www.mwagent.com/"&gt;MonitorWare Agent&lt;/a&gt;) will be released very soon. With these releases, we are again the first-ever folks to release something never seen before, this time CEE support for windows logging ;)&lt;br /&gt;
&lt;br /&gt;
But how does it work? Basically, it is a message format option of the "format syslog" option. If you select cee-enhanced syslog, messages will be emitted in that format. Most importantly, they will included nice name/value pairs of the Windows events (if Windows provided names, else the previous "Paramn" replacement names will be used). For example, a security event is described as follows:&lt;br /&gt;
&lt;blockquote&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
@cee: {"source": "machine.local", "nteventlogtype": "Security", "sourceproc": "Microsoft-Windows-Security-Auditing", "id": "4648", "categoryid": "12544", "category": "12544", "keywordid": "0x8020000000000000", "user": "N\\A", "SubjectUserSid": "S-1-5-11-222222222-333333333-4444444444-5555", "SubjectUserName": "User", "SubjectDomainName": "DOMAIN", "SubjectLogonId": "0x5efdd", "LogonGuid": "{00000000-0000-0000-0000-000000000000}", "TargetUserName": "Administrator", "TargetDomainName": " DOMAIN ", "TargetLogonGuid": "{00000000-0000-0000-0000-000000000000}", "TargetServerName": "servername", "TargetInfo": " servername ", "ProcessId": "0x76c", "ProcessName": "C:\\Windows\\System32\\spoolsv.exe", "IpAddress": "-", "IpPort": "-", "catname": "Logon", "keyword": "Audit Success", "level": "Information"}&lt;/div&gt;
&lt;/blockquote&gt;
Note that we currently focus on cee-enhanced syslog format. We did not yet try to map the Windows field names to the CEE dictionary/profile terms. Probably the most important reason for this focus is that we do not yet have any definite spec to write to. Obviously, once the spec is out, it is fairly easy to upgrade the implementation to support these other names.&lt;br /&gt;
&lt;br /&gt;
A co-worker is right now doing some more testing with rsyslog, which is able to understand that new format. I'll update you with the findings, and procedures, once they are ready.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-4412958684067718086?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/e5Es7O-fH7M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/4412958684067718086/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=4412958684067718086" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/4412958684067718086?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/4412958684067718086?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/e5Es7O-fH7M/cee-enhanced-event-log-to-syslog.html" title="cee-enhanced event log to syslog forwarding" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/03/cee-enhanced-event-log-to-syslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EEQnk_cCp7ImA9WhVTFEg.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-6146526617890065626</id><published>2012-02-28T18:06:00.000+01:00</published><updated>2012-02-28T18:53:23.748+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-28T18:53:23.748+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>Announcing Project Lumberjack</title><content type="html">&lt;b&gt;Two weeks ago, along with the Fedora Developer's Conference in Brno, Czech Republic, a couple of logging and auditing folks from Red Hat, Balabit (syslog-ng), the MITRE Corporation, and Adiscon (me) stuck their heads together to talk about the future of structured logging. &lt;/b&gt;It quickly became clear that extending syslog in the CEE spirit is the right thing to do.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;We observed that almost all technology is present to provide a rich framework to support structured logging. &lt;/b&gt;Actually, both syslog-ng and rsyslog provide the necessary plubming since long (for, example, as part of the RFC5424 effort), but that functionality is relatively seldom explored actively by other developers. A core problem in that regard is that most applications rely on the good old syslog() API, which does not provide structured logging by itself. Also, there is no common log storage database available, which tools could be based on.&lt;br /&gt;
&lt;br /&gt;
In order to evolve syslog, &lt;b&gt;we defined a three-layer architecture&lt;/b&gt;, with applications and logging libraries/APIs being the top layer, the syslogd the middle layer and the datastore the bottom layer. &lt;b&gt;Multiple APIs&lt;/b&gt; must be supported as noone can expect projects to change their existing logging infrastructure. Also, existing frameworks like log4j or log4j and even glibc's syslog() will stay around for a while longer. New libraries (like &lt;a href="https://fedorahosted.org/ELAPI/"&gt;ELAPI&lt;/a&gt;) will&amp;nbsp; probably become more dominant for new applications. So how to tie these different libraries to the syslogd subsystem (the second layer)?&lt;br /&gt;
&lt;br /&gt;
The solution is rather simple: we use what we already achieved in CEE and support &lt;b&gt;cee-enhanced syslog&lt;/b&gt; on the system log socket. The core idea is very simple: we use the regular syslog message part, but include JSON-encoded structured data with it. To signify to the syslog system that this is actually cee-enhanced, a cookie string ("@cee:") is used in front of the JSON data. It is then easy to decide for the syslogd which message format it deals with: if the cookie is present and the rest of the message is a valid JSON representation, the message is cee-enhanced. If one of the two conditions fails, it is traditional syslog. As both conditions are checked together, it is highly unlikely that a legacy syslog message will ever fit into that criteria (and if it really does, nothing is lost: after all, the syslogd has correctly understood that format). It must be noted that the necessary parsing and internal plumbin is available both in syslog-ng as well as rsyslog (I committed the missing JSON parser, held back awaiting a more final CEE standard, yesterday).&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;interface to the log database layer&lt;/b&gt; is currently not as well defined and needs to be worked on. Note that both syslog-ng and rsyslog support multiple datastores, so there already exist solutions. The group as whole was of the opinion that some unified API for a log data store would be useful and something that should be looked at as a longer-term target.&lt;br /&gt;
&lt;br /&gt;
After reaching this rough consensus, we were delighted to see that most of the base technology is already and place and just needs to be tied correctly together. It is more an effort of doing detail implementations and documenting the various pieces (and how they work exactly together) than creating a totally new system (aka "can be quickly done"). &lt;b&gt;We agreed that it probably is best to reach for the low-hanging fruit first: get structured logging integrated first, then do the other steps.&lt;/b&gt; So an initial milestone will be making sure cee-enhanced syslog is supported by all of the subsystem and only after this is done reach for the other things.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;One of these next things definitely is a dictionary of field names&lt;/b&gt; (and exact structure) to be used to describe events in a standard way (for example a logon event). While the whole effort is highly inspired by CEE, it probably is best to try out initial efforts outside of the formal CEE framework. That will enable rapid development, discussion and the capability to check what works in practice. The experience gained in such PoC can than be feed back to the formal CEE process (along the old IETF mantra "running code and rough consensus first").&lt;br /&gt;
&lt;br /&gt;
We agreed that such an effort is best be done in a tranparent and flexible open source process. With that, &lt;b&gt;project lumberjack&lt;/b&gt; was born: an effort to provide better structured logging for Linux, being supported by many major players in that arena. We agreed that it would be a good idea if Red Hat provided some of the project infrastructure. This is why you find &lt;a href="https://fedorahosted.org/lumberjack/"&gt;project lumberjack&lt;/a&gt; now at fedorahosted.org (note that the project will probably contain mostly specs and less code, which is kept in the individual project's repositories).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-6146526617890065626?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/q0oIzMhbz2E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/6146526617890065626/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=6146526617890065626" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/6146526617890065626?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/6146526617890065626?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/q0oIzMhbz2E/announcing-project-lumberjack.html" title="Announcing Project Lumberjack" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/02/announcing-project-lumberjack.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EAQnY6fSp7ImA9WhRaGE8.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-7403767689572254388</id><published>2012-02-21T13:00:00.001+01:00</published><updated>2012-02-21T13:00:43.815+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-21T13:00:43.815+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="log normalization" /><category scheme="http://www.blogger.com/atom/ns#" term="lumberjack" /><category scheme="http://www.blogger.com/atom/ns#" term="json" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="cee" /><title>parsing JSON-enhanced syslog</title><content type="html">Strucuted logging is cool. A couple of month ago, I added support for log normalization and the 0.5 draft CEE standard to rsyslog. At last weeks Fedora Developer's Conference, there was a huge agreement that CEE-like JSON is a great way to enhance syslog logging. To follow up on this concept, I have integrated a JSON decoder into libee, so that it can now decode JSON with a single method call. It's a proof of concept, and for serious use performance optimization needs to be done. Besides that, it's already quite solid.&lt;br /&gt;
&lt;br /&gt;
Also, I just added the mmjsonparse message modification module to rsyslog (available now in git master branch!). It checks if the message contains an "@JSON: " cookie and, if so, tries to parse the resulting string as JSON. If that succeeds, we obviously have a JSON-enhanced message and the individual name/value pairs are stored and can be used both in filters and output templates. This provides some really great opportunities when it comes to processing the structured data. Just think about RESTful interfaces and such!&lt;br /&gt;
&lt;br /&gt;
Right now, everything is at proof of concept level, but works well enough for you to try it. I'll smoothen some edges but will release the versions rather soon. Probably the biggest drawback is that the JSON processor currently flattens the event, with structure being conveyed via field names. That means if you have a JSON object "SUPER" containing a number of fields "field1" to "fieldn", the current implementation will be a single level and the names are "SUPER.field1",... I did this in order to have a quick solution and one that fits into the existing framework. I'll work on creating real structure soon. It's not really hard, but I probably do some other PoCs first ;)&lt;br /&gt;
&lt;br /&gt;
I considered several approaches, among them moving over to libcollection (part of ding-libs) or a pure JSON parser. The more I worked with the code, the more it turned out that libee already has a lot of the necessary plumbing and could simply been enhanced/modified under the hood. The big plus in that approach is that is immediately plugs in into rsyslog and the other solutions that already built on it. This even enables to use the new functionality in the v6 context (I originally thought I'd need to move on to rsyslog v7 for the name-value pair changes). Now that I have written mmjsonparse, this really seems to work out. No engine change was required, and I expect little need for change even for the final version. As such, I'll proceed in that direction. Actually, what I now use is kind of a hybrid approch: I use a lot of philosophy of libcollection, which showed me the right route to take. Then, I use cJSON, which is a really nice JSON parser. In the proof of concept, I use both cJSON's object model and libee's own. I expect to merge them, actually tightly integrating cJSON. The reason is that CEE has evolved quite a bit in the mean time, and many complex constructs are no longer required. As such, I can streamline the library as well, what not only reduces complexity but speeds up the whole process.&lt;br /&gt;
&lt;br /&gt;
I would like to express my sincere thank to Dmitri Pal, Keith Robertson and Bill Heinbockel, which provided great advise and excellent discussion. And the best is that this part of the effort is just the beginning... Stay tuned for more!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-7403767689572254388?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/sAGYNE6p9CQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/7403767689572254388/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=7403767689572254388" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/7403767689572254388?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/7403767689572254388?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/sAGYNE6p9CQ/parsing-json-enhanced-syslog.html" title="parsing JSON-enhanced syslog" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/02/parsing-json-enhanced-syslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYDRX87cSp7ImA9WhRbEU0.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-220149716080469242</id><published>2012-02-01T14:49:00.002+01:00</published><updated>2012-02-01T14:49:34.109+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-01T14:49:34.109+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="log4j" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><title>Java Exceptions and syslog, anyone?</title><content type="html">Anyone out there having problems receiving Java exceptions via syslog? If so, please let me know. We have begun to look into log4j and potential formatting problems. However, we need someone who is really bugged by this in order to see real-world cases so that we can think about real-world cures. So if you have issues, please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-220149716080469242?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/kTxzXE9aV-A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/220149716080469242/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=220149716080469242" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/220149716080469242?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/220149716080469242?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/kTxzXE9aV-A/java-exceptions-and-syslog-anyone.html" title="Java Exceptions and syslog, anyone?" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/02/java-exceptions-and-syslog-anyone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAHRng5fip7ImA9WhRVF04.&quot;"><id>tag:blogger.com,1999:blog-6193377.post-1484035184276331792</id><published>2012-01-16T18:07:00.003+01:00</published><updated>2012-01-16T18:08:57.626+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T18:08:57.626+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="imuxsock" /><category scheme="http://www.blogger.com/atom/ns#" term="rsyslog" /><category scheme="http://www.blogger.com/atom/ns#" term="rate limiting" /><title>imuxsock rate limiting now opt-in feature</title><content type="html">I added rate-limiting capabilities directly into &lt;a href="http://www.rsyslog.com/"&gt;rsyslog&lt;/a&gt;'s imuxsock some time ago. These were turned on by default and blocked processes from writing more than 200 messages within a 5-second interval (accounted on a per-pid level). This default, however, caused quite some confusion. I monitored reactions since the feature was introduced. Last week, I noticed Chris Gaffney, too, telling about his bad experience on twitter and suggesting to change that feature from opt-out to opt-in. That was the missing complaint ;) So I did exactly what Chris suggested, and starting with 5.9.7 that feature requires an explicit opt-in. To do so, I have simply changed the default. Now, you need to tell it the rate limiting interval, which must be non-zero, in order to activate rate limiting. The default is zero, what keeps it deactivated. Currently available via &lt;a href="http://git.adiscon.com/?p=rsyslog.git;a=commitdiff;h=76c4d6b951453078ab53bf612caf0b8ec9d54bb8"&gt;git&lt;/a&gt;. It will take some time, though, for this changed default to migrate to the stable branch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6193377-1484035184276331792?l=blog.gerhards.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/cmfi/~4/fUG2JiLIlrM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.gerhards.net/feeds/1484035184276331792/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6193377&amp;postID=1484035184276331792" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/1484035184276331792?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6193377/posts/default/1484035184276331792?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/cmfi/~3/fUG2JiLIlrM/imuxsock-rate-limiting-now-opt-in.html" title="imuxsock rate limiting now opt-in feature" /><author><name>Rainer Gerhards</name><uri>https://profiles.google.com/112402185904751517878</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-hYpLVjtOpDc/AAAAAAAAAAI/AAAAAAAAAL4/t7LL3_22bIo/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.gerhards.net/2012/01/imuxsock-rate-limiting-now-opt-in.html</feedburner:origLink></entry></feed>

