3

I have enabled the CollectD:IPTables plugin to track traffic to two different server groups:

LoadPlugin iptables

<Plugin iptables>
        Chain "filter" "TRACK_TRAFFIC_SERVER_A" "monitoring_traffic_server_a"
        Chain "filter" "TRACK_TRAFFIC_SERVER_B" "monitoring_traffic_server_b"
</Plugin>

Plugin returns tuples for each of the Chain with type ipt_bytes and ipt_packets.

Now I would like to have a metric that provide me sum of ipt_bytes and ipt_packets sent to SERVER_A and SERVER_B.

For that, I have enabled CollectD:Aggregation plugin to provide this metric. This is the current configuration that does not work:

LoadPlugin aggregation

<Plugin "aggregation">
  <Aggregation>
    Plugin "iptables"
    Type "iptables"
    GroupBy "Host"
    GroupBy "TypeInstance"
    GroupBy "Type"
    CalculateNum false
    CalculateSum true
    CalculateAverage false
    CalculateMinimum false
    CalculateMaximum false
    CalculateStddev false
  </Aggregation>
</Plugin>

How to configure aggregation plugin to work with output of the Collectd::IPTables?

Skarab
  • 327
  • 3
  • 11
  • try removing: `GroupBy "Type"` and see. According to https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_aggregation "..the internal lookup structure won't work if you try to group by type." – Diamond Dec 22 '15 at 11:01

1 Answers1

0

Try removing: GroupBy "Type" and it should work.

According to collectd aggregation plugin documentation:

There are a couple of limitations you should be aware of:

The Type cannot be left unspecified, because it is not reasonable to add apples to oranges. Also, the internal lookup structure won't work if you try to group by type.

There must be at least one unspecified, ungrouped field. Otherwise nothing will be aggregated.

Diamond
  • 8,791
  • 3
  • 22
  • 37