I found the anwser so I will add it here if anyone needs it, it just seems like PostCache was a really bad idea, if you need to write your value with original name with a plugin and then pass it to another one with a prefix here is how this can be done:<div>
<br></div><div><div><div><Chain "PreCache"></div><div> <Rule "default"></div><div> <Target "write"></div><div> Plugin "rrdtool"</div><div> </Target></div>
<div> <Target "replace"></div><div> Host "^" "toto-"</div><div> </Target></div><div> <Target "write"></div><div> Plugin "network"</div>
<div> </Target></div><div> </div><div> Target "stop"</div><div> </Rule></div><div></Chain></div></div><br><div class="gmail_quote">On 25 March 2010 12:34, Schmurfy <span dir="ltr"><<a href="mailto:schmurfy@gmail.com">schmurfy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br><div>What i wish to do is to have one collectd server receiving data from a set of other servers write it on disk as rrd as is and change the hostname before writing the value to the network plugin to be cnsumed by yet another collectd.</div>
<div>As a first step I first tried to change the name of the data written locally to test it with this:</div><div><br></div><div><div><Chain "PostCache"></div><div> <Rule "add_infra_name"></div>
<div> <Target "replace"></div><div> Host "^" "something-"</div><div> </Target></div><div> <Target "write"></div><div> Plugin "rrdcached"</div>
<div> </Target></div><div> </div><div> Target "stop"</div><div> </Rule></div><div></Chain></div><div><br></div><div><br></div><div>In a way it works but what happens is that the rule is matched again and again and i have rrd named "something-something-something-xxxxxx" and it goes on and on xD</div>
<div>Am I taking the wrong path or is there anything missing in my rule ? I tried to add a match to only pick hostname without "something-" in its name but I did not found a way to do this since negative look ahead does not seems to be supported in regex and the matching cannot be inverted.</div>
<div><br></div><div>Julien A.</div></div></div>
</blockquote></div><br></div>