<html><body>

<p>This PR https://github.com/collectd/collectd/pull/650 would add naming of sinks to the log, maybe you want to test a self compiled collectd with this patch.</p>
<blockquote>
<div class="message_header"><span>Mon Feb 02 2015 14:07:47 EST</span> <span>from "Mark Juric" <gajillion@gmail.com> </span> <span class="message_subject">Subject: [collectd] Chains and writing question</span></div>
<div class="message_content">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>All,</div>
I'm using the write_graphite plugin to write to a graphite cluster. The data I'm concerned with is coming from a central "polling" system that, via SNMP or the Netapp plugin, queries other appliances incapable of running the collectd client. I need this data to reside in a different directory when written based on certain host attributes. On a regular system, I simply add a "Prefix" to write_graphite and that puts the data in the correct place. On a polling machine, that forces the data for the polled system to have the same prefix added, putting it in the wrong directory. <br /><br /></div>
It appears that this should be resolvable via chains, but I'm not having any success. In the write_graphite documentation, the example configuration is described as registering "a writer under this string: write_graphite/example" because of the <br /><br /></div>
<Node "example"><br />...</div>
</Node><br /><br /></div>
configuration. To that end, I've created a write_graphite configuration with multiple nodes and different prefixes:<br /><br /><Plugin write_graphite><br />  <Node "default"><br />    Host "graphite-vip"<br />    Port "2003"<br />    Prefix "core.wl.syseng-test.dev."<br />    SeparateInstances true<br />  </Node><br />  <Node "netapp"><br />    Host "graphite-vip"<br />    Port "2003"<br />    Prefix "core.sh5.storage-netapp.prd."<br />    SeparateInstances true<br />  </Node><br />  <Node "netscaler"><br />    Host "graphite-vip"<br />    Port "2003"<br />    Prefix "core.na.netscaler-lb."<br />    SeparateInstances true<br />  </Node></div>
</Plugin><br /><br /></div>
How can I access these different nodes as separate writers? My chain configuration is complaining that they're invalid following the syntax in the wiki:<br /><br />LoadPlugin "match_regex"<br />LoadPlugin "target_write"<br /><Chain "PreCache"><br />        <Rule "rewrite_netapp"><br />                <Match "regex"><br />                        Plugin "netapp"<br />                </Match><br />                <Target "write"><br />                        Plugin "write_graphite/netapp"<br />                </Target><br />                Target Stop<br />        </Rule><br />        <Rule "rewrite_netscaler"><br />                <Match "regex"><br />                        Plugin "snmp"<br />                </Match><br />                <Match "regex"><br />                        Host "^netscaler.*"<br />                </Match><br />                <Target "write"><br />                        Plugin "write_graphite/netscaler"<br />                </Target><br />                Target Stop<br />        </Rule><br /><br />        # Default target<br />        <Target "write"><br />                Plugin "write_graphite/default"<br />        </Target><br /></Chain><br /><br />
<div>Question: Is this possible? And if so, what am I doing wrong? Thanks,<br /><br />Mark</div>
<div> </div>
</div>
<br /><br />
<div class="display_inline_attachment"><img src="display_mime_icon?type=" alt="" align="middle" border="0" /> (, 0 bytes) [<a href="javascript:ToggleVisibility('ATTCH_ID_')">View</a>| <a href="mimepart_download/0/">Download</a>]<br />
<div id="ATTCH_ID_" class="display_inline_attachment_body" style="display: none;"> </div>
</div>
</div>
</blockquote>
<p> </p>
</body></html>