<div dir="ltr">There's another way that consists in LD_PRELOADing a shared object that intercepts all calls to fopen and prepend a prefix to filenames.<div><br></div><div>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. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 30, 2016 at 2:09 AM, Marc Fournier <span dir="ltr"><<a href="mailto:marc.fournier@camptocamp.com" target="_blank">marc.fournier@camptocamp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Maurizio Vitale <<a href="mailto:mrz.vtl@gmail.com">mrz.vtl@gmail.com</a>> writes:<br>
<br>
> Hi all,<br>
>   is there an easy way for running collectd inside a docker container while<br>
> still monitoring the host?<br>
> For a number of plugin of interest to me it is only a matter of mounting<br>
> /proc to /host_proc inside the container and then use that. Other plugins<br>
> might be trickier.<br>
> But even for the simple ones, one might have to change the source code.<br>
><br>
> Has anybody done this successfully?<br>
<br>
</span>I started working on (but didn't really finish yet):<br>
<br>
<a href="https://github.com/collectd/collectd/pull/1867" rel="noreferrer" target="_blank">https://github.com/collectd/<wbr>collectd/pull/1867</a><br>
<span class=""><br>
> [the reason for this, rather than running collectd as a normal process on<br>
> every host, is that I need to have it running in kubernetes and having<br>
> non-contenairazed processes is not nice]<br>
<br>
</span>Yes, this was also my use-case.<br>
<br>
Cheers,<br>
Marc<br>
</blockquote></div><br></div>