pcp
[Top] [All Lists]

Re: pmie support for string-typed metrics

To: Nathan Scott <nathans@xxxxxxxxxx>, Lukas Berk <lberk@xxxxxxxxxx>, Mark Goodwin <mgoodwin@xxxxxxxxxx>, Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: pmie support for string-typed metrics
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 16 Aug 2016 20:07:25 +1000
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <733731954.39808417.1460522806449.JavaMail.zimbra@xxxxxxxxxx>
References: <733731954.39808417.1460522806449.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
On 13/04/16 14:46, Nathan Scott wrote:
Hi Ken,

We've come across a few cases in the last little while that led
Lukas to suggest yesterday that having pmie firing one-time-logging
requests at pmlogger could be a useful general facility.

But it hit a snag - namely, pmie only supporting numeric metrics.
So we're wondering, how involved would it be to extend pmie for some
(possibly just limited?) support for interpreting string metrics?
...
They're all somewhat similar cases - all use PM_TYPE_STRING metrics -
and so could theoretically be tackled with pmie rules like:

timezone = ( pmcd.timezone @0 != pmcd.timezone @1 )
-> print "Timezone changed to %v";

versions = ( mmv.MyApp.java.jvm_version @0 != mmv.MyApp.java.jvm_version @1 )
-> print "Java upgraded to %v";

iosched = ( some_inst ( disk.dev.scheduler @0 != disk.dev.scheduler @1 ) )
-> print "I/O scheduler changed to %v for block device %i\n";

As of my latest round of commits, this is now done.

There are a couple of other spin-off suggestions from when this thread started that have not yet been addressed ... I'll look at those as time permits (and that is largely dependent on how things are going in PCP QA land).

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