There's another way that consists in LD_PRELOADing a shared object that
intercepts all calls to fopen and prepend a prefix to filenames.

I'm not sure if I'll go there, once I start to have to modify collectd it
becomes less interesting to me. In a kubernetes world, it would really be
limited to the functionality of very few plugins, as all the "application"
monitoring will be done through other means.

On Tue, Aug 30, 2016 at 2:09 AM, Marc Fournier <[email protected]
> wrote:

> Maurizio Vitale <[email protected]> writes:
>
> > Hi all,
> >   is there an easy way for running collectd inside a docker container
> while
> > still monitoring the host?
> > For a number of plugin of interest to me it is only a matter of mounting
> > /proc to /host_proc inside the container and then use that. Other plugins
> > might be trickier.
> > But even for the simple ones, one might have to change the source code.
> >
> > Has anybody done this successfully?
>
> I started working on (but didn't really finish yet):
>
> https://github.com/collectd/collectd/pull/1867
>
> > [the reason for this, rather than running collectd as a normal process on
> > every host, is that I need to have it running in kubernetes and having
> > non-contenairazed processes is not nice]
>
> Yes, this was also my use-case.
>
> Cheers,
> Marc
>
_______________________________________________
collectd mailing list
[email protected]
https://mailman.verplant.org/listinfo/collectd

Reply via email to