[collectd] improve Processes plugin

Paul Colomiets paul at colomiets.name
Sun Sep 4 12:19:16 CEST 2011


Hi Lukas,

On Sun, Sep 4, 2011 at 10:29 AM, Lukas Bednar <lbednar at redhat.com> wrote:
> we use collectd to monitor specific processes on our
> machines. But there is problem that these specific
> processes execute another processes (children) which
> generate considerable load. These child-processes isn't
> counted to statistic data of specific process. So we would
> like improve this plugin with ProcessTree and
> ProcessMatchTree option.
>
> I would like know whether there is no similar
> functionality in order avoid to duplicity.

As far as I can see there isn't. But I would like to propose
another way to solve the problem. I'd like processes to
be matched by environment. So it probably solves both
your problem of matching children (because children are
usually inherit environment), and our problem of
differentiating several processes of same name. Like:

COLLECTD_NAME=abc python manage.py runserver
COLLECTD_NAME=def python manage.py runserver

(usually in different directories, if you care). It would
also be useful to specify regexp for environment variable
name:

EnvironMatch "USER=(.*)"
EnvironMatch "PYTHONPATH=/data/www/(.*)/lib"

With first capture group being name of the process in
collectd.

Also I find it easier to implement than subtree search.

Thoughts?

-- 
Paul



More information about the collectd mailing list