On Wed, 3 Dec 2014, Brian Knox wrote:
So two questions then:
1. In the case of using mmjsonparse on messages where we do not know ahead
of time what all the. json attributes will be, is there a var for a place
in the tree where we can get all attributes that were in the cee message?
There are three 'classes' of variables
$! are 'normal' variables, the place that mmjsonparse, etc put the results of
parsing the cee message by default.
$. are 'local' variables, they are a place you can put stuff that you don't want
to end up in a message when you output $!
$\ are 'global' variables, unlike the others, they persist from message to
message.
All of these variables are a tree, where you can have $!foo!bar and $!foo!baz.
If you just reference $!foo it will output both bar and baz as JSON
so to see everything, parse the message and then output $!
2. If mmsequence is being deprecated, is there a pointer to how to
increment global variables to provide a sequence?
set $\var = $\var + 1;
3. This morning I remembered the "mmcount" module - is this also being
deprecated in favor of global variables?
probably.
David Lang
Brian
On Wed, Dec 3, 2014 at 3:52 AM, Rainer Gerhards <[email protected]>
wrote:
2014-12-02 21:59 GMT+01:00 Brian Knox <[email protected]>:
We have a case where we are receiving messages in @cee: format, and would
like to add a sequence variable generated via mmsequence to the message.
Before I spend too much time digging into this I wanted to ask if, using
some template hackery and json subtrees, this is something that sounds
possible - and if maybe someone else was already doing it.
David has answered the real question, just let me add that mmsequence was a
work-around for v7 where global variables were not available. It is now
deprecated and will probably removed in a couple of month.
I'll check the doc if it tells this clearly enough.
Rainer
Thanks!
Brian
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.