pcp
[Top] [All Lists]

Re: [pcp] Shouldn't pmrep use the default config file?

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] Shouldn't pmrep use the default config file?
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Fri, 17 Jun 2016 11:44:27 +0300
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <CAAvyFNh7hKSQ0gYD1+kjwQr116xWQGpz=3zqp4gLEZk8jm9T4g@xxxxxxxxxxxxxx>
Organization: Red Hat
References: <CAAvyFNhgfmuLhAHfA3d1rUuiPE791=04QXQHeLy9Dq4F=_756w@xxxxxxxxxxxxxx> <CAAvyFNh7hKSQ0gYD1+kjwQr116xWQGpz=3zqp4gLEZk8jm9T4g@xxxxxxxxxxxxxx>
Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
Hi,

On 2016-06-17 09:00, Jamie Bainbridge wrote:
> On 17 June 2016 at 10:35, Jamie Bainbridge <jamie.bainbridge@xxxxxxxxx> wrote:
>> The pmrep manpage invites you to use a metric spec, but this does not
>> work by default:
>>
>> # pmrep -p -b MB vfs.inodes.count :vmstat
>> Metric set definition ':vmstat' not found.
>>
>> One has to specify the supplied config file for the command to work:
>>
>> # pmrep -p -b MB vfs.inodes.count -c /etc/pcp/pmrep/pmrep.conf :vmstat
>>
>> Shouldn't pmrep use this default config file, and users can
>> modify/specify their own if they want to? This probably provides a
>> better initial experience and is more in line with other tools with a
>> config file.
>>
>> If you're happy with this, lmk and I'll submit a patch.

Hmm, yeah, at least I can't recall why it's not like this already.
Perhaps the example-{1,2}/zabbix sets could be commented out or removed,
the rest looks generally usable.

> Thinking more on this, it would make even more sense to have a
> directory like /etc/pcp/pmrep/pmrep.conf.d/ and read every *.conf file
> in there on launch.
> 
> That way users could write their own tool, throw it in the directory,
> and have it just work when they run "pmrep :mything".
> 
> This also makes it neater for the project to pre-package tools, as
> each set of related pmrep tools (eg: each "sar" option implementation)
> is broken into its own file.

Agreed, this on the TODO list already (see pcp.git/src/pmrep/TODO):

-  includedir config file support (?)

There was also this item:

-  look for config in ./, ~/.pcp, ~/, /etc/pcp or so

Do you think that would be helpful or should we just drop that item?

Thanks,

-- 
Marko Myllynen

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