Hi List I am currently using the following config:
aggregate[db_in]: proto,src_host,dst_host,src_port,dst_port aggregate[db_out]: proto,src_host,dst_host,src_port,dst_port aggregate_filter[db_in]: dst net 10.11.0.0/16 aggregate_filter[db_out]: src net 10.11.0.0/16 plugins: pgsql[db_in], pgsql[db_out] sql_table[db_in]: acctin sql_table[db_out]: acctout This gives me 2 tables which is can then do an SQL JOIN (where src_host=dst_host and dst_host=src_host and src_port=dst_port and dst_port=src_port) to get complete data on each actual connection. What I would like to be able to do is to reverse way the data is inserted in the table for one of the 2 aggregate lines, and then put the data in the SAME sql table. The config could look something like: aggregate[db_in]: proto,src_host,dst_host,src_port,dst_port aggregate[db_out]: proto,src_host_reverse,dst_host_reverse,src_port_reverse,dst_port_reverse aggregate_filter[db_in]: dst net 10.11.0.0/16 aggregate_filter[db_out]: src net 10.11.0.0/16 plugins: pgsql[db_in], pgsql[db_out] sql_table[db_in]: acct sql_table[db_out]: acct Therefor "db_out" would put the put "dst_host" data in the "src_host" column in the db, "dst_port" data in the "src_port" etc. For my purposes the number of bytes for "in" and "out" could be summed (which would fit with this system just fine" but it could also be usefull to have "in_bytes" and "out_bytes" in separate columns... Does anyone have any comments on this? Is there an easy way to do this currently? Regards -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc
pgpBv5tksjySg.pgp
Description: PGP signature
_______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
