comicchang / collectd-iptables-accounting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

collectd-iptables-accounting

A iptables plugin for collectd using collectd's Python plugin.

Screenshot

screenshot

Install

  1. Checkout this repository somewhere on your system accessible by collectd; for example as /usr/share/collectd/collectd-iptables-accounting.
  2. Install the Python requirements with pip install -r requirements.txt.
  3. Configure the plugin (see below).
  4. Configure iptables (see init_iptables.sh and update_iptables.sh)
  5. Restart collectd.

Configuration

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>

Requirements

  • python-dateutil
  • python-iptables

About


Languages

Language:Python 76.2%Language:Shell 23.8%