diff options
author | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-16 11:53:31 +0100 |
---|---|---|
committer | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-16 11:53:31 +0100 |
commit | 3caee15a2597feed739f48cc0cd3334b98233630 (patch) | |
tree | fc750c057211e590a9a64a2faeb8e576b2f1a12e | |
parent | 529e8ca8708049f44c76a5e948e82c8632589dee (diff) |
updated the db for the nfacct.conf
-rw-r--r-- | pmacct/dbSetupCustom.mysql | 24 | ||||
-rw-r--r-- | pmacct/nfacct.conf | 19 |
2 files changed, 33 insertions, 10 deletions
diff --git a/pmacct/dbSetupCustom.mysql b/pmacct/dbSetupCustom.mysql index 9cc8f6b..167ffb1 100644 --- a/pmacct/dbSetupCustom.mysql +++ b/pmacct/dbSetupCustom.mysql @@ -3,14 +3,18 @@ create database pmacct; use pmacct; drop table if exists acct; -create table acct ( - ip_src CHAR(15) NOT NULL, - ip_dst CHAR(15) NOT NULL, - src_port INT(2) UNSIGNED NOT NULL, - dst_port INT(2) UNSIGNED NOT NULL, - packets INT UNSIGNED NOT NULL, - bytes BIGINT UNSIGNED NOT NULL, - stamp_inserted DATETIME NOT NULL, - stamp_updated DATETIME, - PRIMARY KEY (ip_src, ip_dst, src_port, dst_port, stamp_inserted) + create table acct ( + ip_src CHAR(39) NOT NULL, + ip_dst CHAR(39) NOT NULL, + as_src INT(4) UNSIGNED NOT NULL, + as_dst INT(4) UNSIGNED NOT NULL, + port_src INT(2) UNSIGNED NOT NULL, + port_dst INT(2) UNSIGNED NOT NULL, + packets INT UNSIGNED NOT NULL, + bytes INT UNSIGNED NOT NULL, + pkt_len_distrib CHAR(10) NOT NULL, + stamp_inserted DATETIME NOT NULL, + stamp_updated DATETIME, + PRIMARY KEY (ip_src, ip_dst, as_src, as_dst, port_src, port_dst, pkt_len_distrib, stamp_inserted) ); + diff --git a/pmacct/nfacct.conf b/pmacct/nfacct.conf new file mode 100644 index 0000000..c4a7d57 --- /dev/null +++ b/pmacct/nfacct.conf @@ -0,0 +1,19 @@ +plugins: mysql +daemonize: false +pidfile: /var/run/nfacctd.pid +aggregate: src_host,dst_host,src_port,dst_port,src_as,dst_as,pkt_len_distrib +pkt_len_distrib_bins: 0-199,200-399,400-599,600-799,800-999,1000-1499,1500-9000 + +!plugins: print + +sql_host: localhost +sql_db: pmacct +sql_table: acct +sql_user: pmacct +sql_passwd: arealsmartpwd +nfacctd_port: 5678 +sql_refresh_time: 90 +sql_history: 1m +sql_history_roundoff: m +sql_table_version: 9 +sql_optimize_clauses: true |