# Install:
#   This plugin is bundled with collectd version 5.2+

# Documentation:
#   The purpose of this module is to aggregate CPU stats from all cores.
#
#   https://collectd.org/wiki/index.php/Plugin:Aggregation
#   https://collectd.org/wiki/index.php/Plugin:Aggregation/Config

# System modifications:
#   None

# Config file modifications:
#   None

LoadPlugin aggregation

<Plugin "aggregation">
  <Aggregation>
    Plugin "cpu"
    Type "cpu"

    GroupBy "Host"
    GroupBy "TypeInstance"

    CalculateSum true
    CalculateAverage true
  </Aggregation>
</Plugin>

LoadPlugin match_regex

<Chain "PostCache">
  <Rule "each_cpu_ignore">
    <Match regex>
      Plugin "^cpu$"
    </Match>
    <Target "write">
      Plugin "aggregation"
    </Target>
    Target stop
  </Rule>
  Target "write"
</Chain>

