iptables

The IPTables plugin allows to collect some statistics on IPTables rules: incoming and outgoing traffic in bytes and number of packets.

In order to gather all the data on a chain:

<Plugin "iptables">
  Chain  "filter" "OUTPUT"
</Plugin>

In order to gather the data on a precise rule:

root$ iptables -A CUSTOM -p tcp --dport 22 -m comment --comment "UniqueComment"  -j ACCEPT
<Plugin "iptables">
  Chain  "filter" "CUSTOM" "UniqueComment"
</Plugin>

With this configuration, it is thus possible to check the traffic on a precise port.