Skip to content

Instantly share code, notes, and snippets.

@rottenbytes
Created March 12, 2013 13:19
Show Gist options
  • Save rottenbytes/5142810 to your computer and use it in GitHub Desktop.
Save rottenbytes/5142810 to your computer and use it in GitHub Desktop.
PreCacheChain "PreCache"
LoadPlugin "match_regex"
LoadPlugin "target_notification"
LoadPlugin "target_set"
<Chain "PreCache">
# sanitize plugin names, to get a better naming
<Rule "tail_to_postfix">
<Match "regex">
Plugin "tail"
PluginInstance "postfix"
</Match>
<Target "set">
Plugin "postfix"
PluginInstance ""
</Target>
</Rule>
<Rule "tail_to_dovecot">
<Match "regex">
Plugin "tail"
PluginInstance "dovecot"
</Match>
<Target "set">
Plugin "dovecot"
PluginInstance ""
</Target>
</Rule>
<Rule "filecount_to_mail">
<Match "regex">
Plugin "filecount"
PluginInstance "^(mail-.*)$"
</Match>
<Target "set">
Plugin "mail"
</Target>
</Rule>
<Rule "curljson_bgp_to_bgp">
<Match "regex">
Plugin "curl_json"
PluginInstance "bgp"
</Match>
<Target "set">
Plugin "bgp"
PluginInstance ""
</Target>
</Rule>
<Rule "curljson_powers_to_powers">
<Match "regex">
Plugin "curl_json"
PluginInstance "powers"
</Match>
<Target "set">
Plugin "powers"
PluginInstance ""
</Target>
</Rule>
# do not forward locally fetched data
<Rule "no_forward_exec">
<Match "regex">
Plugin "^(beanstalkd|elasticsearch|snmp|curl_json|bgp)$"
</Match>
<Target "write">
Plugin "<%= @node["collectd"]["use_rrdcached"] ? "rrdcached" : "rrdtool" %>"
</Target>
Target "stop"
</Rule>
</Chain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment