pcp
[Top] [All Lists]

Re: pmie support for string-typed metrics

To: pcp <pcp@xxxxxxxxxxx>
Subject: Re: pmie support for string-typed metrics
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Mon, 2 May 2016 11:10:20 +1000
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1337028064.40108627.1460601063575.JavaMail.zimbra@xxxxxxxxxx>
References: <220069218.39805602.1460521052029.JavaMail.zimbra@xxxxxxxxxx> <733731954.39808417.1460522806449.JavaMail.zimbra@xxxxxxxxxx> <a54a13c7-4824-499c-8fa6-232cbd33ffaf.maildroid@localhost> <1337028064.40108627.1460601063575.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1
On 04/14/2016 12:31 PM, Nathan Scott wrote:
Hi Ken,

----- Original Message -----
 From darkest Tibet ... well snowing and cold rather than dark.

Good to hear from you!

pmie could be taught to grok string valued expressions  ... it would be a big
change in a lot of code that is tricky and a little brittle, but certainly
feasible.

OK.

I'd probably start by outlawing all the arithmetic functions (avg, sum) and
the relational operators (<, <=, >= and >) to avoid locale issues with
lexicographic order which takes out the min and max functions as well.

Even with these restrictions I think your use cases could all be handled.

Excellent.

If you can wait, I'll look in more earnest after I get back home in early
May.

Yes, it can certainly wait - thanks!


now that Ken is back ...

I've been thinking about this topic - not just for string valued metrics
(btw: hinv.map.scsi is another one in this class), but also for discrete
integer typed metrics, such as hinv.ndisk etc.

These metrics need to be logged more than "once"; rather more like "when 
changed".
Once logged, they retain their discrete value (string or integer) until logged
again with a new value. As an alternative to pmie monitoring these metrics and 
telling
pmlogger to log them again via pmlc, maybe pmlogger could just maintain a cache
(suitably indexed for efficiency) - when a discrete metric/instance/value with 
logging
frequency of "when changed" changes, write it to the log again.

Regards
-- Mark

<Prev in Thread] Current Thread [Next in Thread>