pcp
[Top] [All Lists]

Re: patch/RFC - install global derived metrics dir and configs

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: patch/RFC - install global derived metrics dir and configs
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Thu, 10 Mar 2016 10:06:19 +1100
Cc: Nathan Scott <nathans@xxxxxxxxxx>, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <y0m8u1rd2ci.fsf@xxxxxxxx>
References: <56DD0704.3000800@xxxxxxxxxx> <1562841800.28672134.1457396071684.JavaMail.zimbra@xxxxxxxxxx> <56DF6209.9040905@xxxxxxxxxx> <302778934.28941768.1457480717032.JavaMail.zimbra@xxxxxxxxxx> <56DF7933.1030005@xxxxxxxxxx> <y0m8u1rd2ci.fsf@xxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
On 03/10/2016 03:48 AM, Frank Ch. Eigler wrote:

mgoodwin wrote:

[...]  So I'm proposing to add the above putenv call to
__pmEndOptions() so that global derived metrics will be loaded by
default for all client tools (but not overriding $PCP_DERIVED_CONFIG
if it's already set). This is a libpcp change, but not an API
change. [...]

That will only affect those tools that opt into the *Options
machinery.

yes quite right, __pmEndOptions() isn't quite global enough

If the goal is to let apprx all tools take advantage of a
systemwide default library of derived metrics, why not do that directly?

For example, set a default PCP_DERIVED_CONFIG=/etc/pcp/derived.d/ via
pcp.conf or libpcp, and just do load it every time, the same way as
the recent changes did for the event.flags / event.missed anonymous
metrics?

I ended up doing similar to event.{flags,missed} in __dminit() and
Nathan briefly rv'd the patch, i.e. load $PCP_VAR_DIR/config/derived
if PCP_DERIVED_CONFIG isn't set. See 5d562064541 in my master branch
at git://git.pcp.io/mgoodwin/pcp

But perhaps I should have just added PCP_DERIVED_CONFIG to pcp.conf,
(in which case 5d562064541 would still be OK but kind of redundant,
so I would probably revert it)

Also, I chose $PCP_VAR_DIR/config/derived to be alongside similar config
directories (pmchart, pmlogconf, pmlogger, pmie and others).

And I guess it probably should be derived.d for ansible and friends?
(and all those other config dirs be renamed too, which sounds like a QA
nightmare!!)

Regards
-- Mark

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