pmrep: add support for specifying instances
commit9a3bc1b75bfaa5e60c57693f24b1c130b7059f4f
authorMarko Myllynen <myllynen@redhat.com>
Mon, 10 Oct 2016 00:42:09 +0000 (10 11:42 +1100)
committerNathan Scott <nathans@redhat.com>
Mon, 10 Oct 2016 00:42:17 +0000 (10 11:42 +1100)
treebd25fbc5f3a68b21b127daab35a5c696709d59c5
parente49a20b7bd34b4893dc194e8d373595164c300bd
pmrep: add support for specifying instances

Specifying instances to report is hugely helpful with many metrics, the
best example is probably proc.* metrics where there's lots of instances
and the user might be interested in only one or two of them.

This commit adds support to pmrep(1) for specifying the instances to
report, either using a globally defined list or instances per metric.

The implementation is relatively straightforward, a bit of gymnastics
needed to parse the command line vs config file right and to pass more
than one parameter to pmTraversePMNS().

QA updated with lots of tests, all current and new QA passing, shell
completions updated while at it, man pages updated as well.

There are two things that might require further thought:

1) Instance specification can actually be a regex but I'm not yet 100%
sure it's a good idea so for now I've left it undocumented, I think
it's best we gather a bit of experience and then either document it or
remove the regex support.

2) Reporting to archive ignore this in the spirit of pmlogger(1) but it
might make sense to respect the instance specification with archives as
well. There's been some discussion about this wrt pmlogger earlier,
perhaps we could try to find a common consensus for both:
https://bugzilla.redhat.com/show_bug.cgi?id=1345821
qa/1069
qa/1069.out
src/bashrc/pcp_completion.sh
src/pmrep/TODO
src/pmrep/pmrep.1
src/pmrep/pmrep.conf
src/pmrep/pmrep.conf.5
src/pmrep/pmrep.py
src/zshrc/_pcp