Hi,

I am working on support for stats with dynamic-name. This comes handy
in situations where metric-name is dependent upon value of a certain
attribute of the message.

Say, for a central log-aggregation service, its valuable to know what
is inbound message-count distribution across application-clusters that
send logs to it, or for a shared-server, its valuable to know what is
the log-volume generation across users etc.

Im thinking of using functions-like interface to support this. It may
look similar to this:

====================
dyn_stats("user_msg_count")

...

ruleset(...) {
...
dyn_inc("user_msg_count", $.user)
...
}
====================

dyn_stats signature looks like:
dyn_stats(<name_space>, <resettable: default=true>, <max_cardinality:
default=10k>, <recycle_metric_names_after: default=1hr>)

dyn_inc signature looks like:
dyn_inc(<name_space>, <metric_name>)


Reporting would work similar to static-metric via impstats. Mapping:
statsobj_s.name = name_space
statsobj_s.origin = "dyn"
ctr_s.name = "foo" (say $.user had value foo)


Thoughts / suggestions?

-- 
Regards,
Janmejay
http://codehunk.wordpress.com
_______________________________________________
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.

Reply via email to