I have multiple nodes, each with multiple disks of the same size. I'd like for either

  • collectd to report a single used/free metric that is the aggregate of these multiple disks
  • construct a grafana query that combines multiple disks into a single %-free metric

Here's a config example using the aggregation plugin that will compute global df statistics per type-instance, meaning one value per used, free and maybe others depending on your OS.

LoadPlugin aggregation

<Plugin aggregation>
    Plugin "df"
    Type "percent_bytes"
    GroupBy "TypeInstance"
    CalculateMinimum true
    CalculateMaximum true
    CalculateAverage true
    SetPluginInstance "%{aggregation}"
    SetHost "global"
    SetPlugin "df"

As you can guess it will compute the average, min and max aggregations but you could also add the sum by using CalculateSum.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.