Hello Peter,
>From what i'm able to see, the problem it's in your pmacct configuration.
On Wed, Mar 16, 2005 at 09:13:30PM +0100, Pajlatek wrote:
[ ... ]
> aggregate: src_host,dst_host
> plugins: mysql[in], mysql[out]
> sql_db: bwstat
> sql_table: acct
[ ... ]
Here you instantiate two plugins, 'in' and 'out', with the 'plugins' directive.
The subsequent directives ('sql_db', 'sql_table', etc.) apply to all active
plugins (that is, they are global).
This causes both MySQL plugins to write the same table, thus accounting data
twice. The correct configuration should resemble something as follows:
plugins: mysql[in], mysql[out]
sql_db: bwstat
aggregate[in]: dst_host
aggregate[out]: src_host
sql_table[in]: acct_in
sql_table[out]: acct_out
aggregate_filter[in]: <a nice BPF filter: matches traffic to your networks>
aggregate_filter[out]: <another nice BPF filter: matches traffic from your
networks>
The database is common for both plugins; then you use two different tables to
account, e.g. incoming vs. outcoming, data for your networks. For filtering
purposes you use the 'aggregate_filter' directives, thus you should need no
more the 'networks_file' one.
The remaining directives may continue to be global.
Cheers,
Paolo