On Fri, 2009-11-06 at 00:15 +1100, Max Matveev wrote:
> On Thu, 05 Nov 2009 12:28:58 +1100, Ken McDonell wrote:
>
> kenj> The most common examples are ...
> kenj> * the requirement to compute something that is "delta(value) /
> kenj> delta(other_value)", e.g. average time per message where both
> kenj> "time" and "number of messages" are counters
> kenj> * aggregation of existing metrics, e.g. "messages" being the sum
> kenj> of synchronous and asynchrous message sent and received, or
> kenj> total packet rate across all gigE interfaces
> Do you have any plans to support "avergage of last 10 samples" thing
> or rates? Or is it just the metrics from a single pmfetch?
To do the delta(v1) / delta(v2) thing requires some state ... I'd be
willing to extend this to include the arithmetic aggregation functions
from pmie ... so avg_sample(N, expr) and ditto for max_sample,
min_sample and sum_sample ... and similarly avg_inst(expr) and ditto for
avg_inst, min_inst and max_inst. But I'd consider these all version 2
deliverables in the expression language syntax.
Since a derived metric is defined over metrics from a single source,
none of the *_host() aggregation functions make sense in this context.
Also I'm not venturing into pattern matching ... so match_inst() and
nomatch_inst() won't be starters.
And 1st order predicate calculus won't get a look in, so the some_*(),
all_*() and N%_*() families of predicates are not going to be invited
over from pmie.
> kenj> As an aside does any know of a living user of these
> asynchronous
> kenj> interface extensions to the original PMAPI?
> Yes, I do - when collecting metrics from multiple hosts I cannot
> afford for TCP to pick its nose when one of the hosts go down.
That's a fair justification. But would it be reasonable to assume that
99.99% of these cases are related to pmFetch() as this is the only PMAPI
routine most monitoring apps call in steady-state after initialization?
If so, a compromise may be to dump all the async stuff in places like
PMNS manipulation, pmInDom interrogation, help text retrieval, pmStore,
pmDesc?
So from this current list (and their associated pmReceive duals) ...
$ grep pmRequest /usr/include/pcp/pmapi.h
extern int pmRequestDesc (int, pmID );
extern int pmRequestFetch(int, int, pmID *);
extern int pmRequestInDom (int, pmInDom);
extern int pmRequestInDomInst (int, pmInDom, const char *);
extern int pmRequestInDomName (int, pmInDom, int);
extern int pmRequestInDomText (int, pmID, int);
extern int pmRequestNameID (int, pmID);
extern int pmRequestNames (int, int, char *[]);
extern int pmRequestNamesOfChildern (int, const char *, int );
extern int pmRequestStore (int, const pmResult *);
extern int pmRequestText (int, pmID, int);
extern int pmRequestTraversePMNS (int, const char *);
we could drop all but pmRequestFetch()?
|