参考:https://libraries.io/github/librato/collectd-librato
https://collectd.org/wiki/index.php/Plugin:Aggregation/Config
LoadPlugin aggregation
<Plugin aggregation>
<Aggregation>
Plugin "cpu"
Type "cpu"
GroupBy "Host"
GroupBy "TypeInstance"
CalculateNum true
CalculateSum true
CalculateAverage true
</Aggregation>
</Plugin>
LoadPlugin match_regex
<Chain "PostCache">
<Rule "ignore_cpu"> # Send "cpu" values to the aggregation plugin
<Match "regex">
Plugin "^cpu$"
</Match>
<Target "write">
Plugin "aggregation"
</Target>
Target stop
</Rule>
Target "write"
</Chain>