A iptables plugin for collectd using collectd's Python plugin.
- Checkout this repository somewhere on your system accessible by
collectd; for example as
/usr/share/collectd/collectd-iptables-accounting
. - Install the Python requirements with
pip install -r requirements.txt
. - Configure the plugin (see below).
- Configure iptables (see init_iptables.sh and update_iptables.sh)
- Restart collectd.
Add the following to your collectd config:
TypesDB "/usr/share/collectd/collectd-iptables-accounting/accounting.db"
LoadPlugin python
<Plugin python>
ModulePath "/usr/share/collectd/collectd-iptables-accounting"
Import "accounting"
<Module accounting>
CHAIN_NAMES "TRAFFIC_ACCT_OUT" "TRAFFIC_ACCT_IN"
</Module>
</Plugin>
- python-dateutil
- python-iptables