On 03/10/2011 05:18 AM, Nathan Scott wrote:
>
> ----- "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx> wrote:
>
>> On Thu, 2011-03-10 at 08:57 +1100, Ken McDonell wrote:
>> Further to my earlier mail, I think we should consider event records
>> to belong to a "stream", where a stream may be a logfile (in David's
>> case), or from a process/thread, or a session, or an event trace for
>> an operation, or ...
>>
>> The options we have for a PMDA exporting multiple streams appear to
>> be as follows.
>>
>> 1. Export one metric per stream, using the dynamic metric
>> services to augment the namespace as needed. For example
>>
>> logger.var.log.messages
>> [record]
>> logger.param_string "some messages text"
>> logger.var.log.auth.log
>> [record]
>> logger.param_string "some auth text"
>
> Doesn't seem a great option really, when spelled out like that.
> Events are still quite unexplored, but historically metric names
> that embed an instance like this make for difficult inclusion in
> configuration languages for the tools like pmchart, pmie.
For my purposes, I'll probably choose this solution (for now). In my
case anyway, the list of logfiles will come from a config file consulted
at startup, so I won't be using truly dynamic metrics. At startup, I'd
read the config file and then create the metric table based on the
config file's contents. Then the metrics would be static from that
point out.
>> 2. Export one metric, with the stream id as the first parameter
>> of each event record. For example
>>
>> logger.events
>> [record]
>> logger.stream "/var/log/messages"
>> logger.param_string "some messages text"
>> [record]
>> logger.stream "/var/log/auth.log"
>> logger.param_string "some auth text"
>>
>
> This looks better, but still not great - has the downside that the
> "stream" string bloats out every event record, when its really more
> of a fixed up-front thing.
If we're talking about a event stream with lots of data, I'd think that
this bloat would kill performance.
>> 3. Export one metric with one instance per stream. For example
>>
>> logger.event["/var/log/messages"]
>> [record]
>> logger.param_string "some messages text"
>> logger.event["/var/log/auth.log"]
>> [record]
>> logger.param_string "some auth text"
>>
>> I suspect 2. may be the most commonly used encoding for a PMDA
>> exporting multiple event stream.
>>
>> 1. and 2. work today. But 3. is not supported at the moment.
>>
>> So the discussion needs to be "should we support 3. as well?"
>
> It (3) does seem the cleanest representation to me (for some reason
> though, I thought we had claimed the indom field for something else
> in event record metrics, but might be misremembering that).
(3) does seem the best way to represent this to me also.
--
David Smith
dsmith@xxxxxxxxxx
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
|