pcp
[Top] [All Lists]

Re: RFC: filtered metrics

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: RFC: filtered metrics
From: fche@xxxxxxxxxx (Frank Ch. Eigler)
Date: Tue, 01 Oct 2013 21:42:47 -0400
Cc: PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1717961238.2089908.1380100281235.JavaMail.root@xxxxxxxxxx> (Nathan Scott's message of "Wed, 25 Sep 2013 05:11:21 -0400 (EDT)")
References: <1717961238.2089908.1380100281235.JavaMail.root@xxxxxxxxxx>
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
nathans wrote:

> Goal: Transparent mechanism for client tools to perform a metric
> modification operation (likely a pmStore(3)) before starting to
> fetch values for metrics.  This is to provide a per-user or per-
> monitor-host customisation (filtering) of the values returned. [...]

Just want to highlight the fact that as this would be additional state
stored at pmcd for the clients, it needs to be restored upon a
pmReconnectContext().


> Approach:
> Perhaps we could introduce known directories (/etc/pcp/filtered/ and
> $HOME/.pcp/filtered?) with files containing metric name:value mappings
> to store [...]

It seems likely that this filtering would be for ad-hoc purposes, with
possibly different filters in action for different clients.  Thus,
hoping to make them persist in user- or especially system-wide default
files is probably not that helpful.  

Maybe they could be left in files.  Or maybe the pcp clients can earn
an additional option like pmevent, '-x [metric:]filter'.  pmlogger
could grow some syntax to do the equivalent pmStores for each batch.
(It could make sense to filter the same metrics in multiple different
ways and log them at different rates.) 


> [...] Should we mandate use of string metrics always for these
> things?  (the one case we have that used integers could be done as a
> string instead, and its not yet released).  [...]

Substring match?
Regular expression?
Arithmetic expression?
General PMIE predicate?

- FChE

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