diff options
Diffstat (limited to 'pmacct')
-rw-r--r-- | pmacct/dbGrant.mysql | 1 | ||||
-rw-r--r-- | pmacct/pmacctd.conf | 31 | ||||
-rw-r--r-- | pmacct/sbSetupCustom.mysql | 16 |
3 files changed, 48 insertions, 0 deletions
diff --git a/pmacct/dbGrant.mysql b/pmacct/dbGrant.mysql new file mode 100644 index 0000000..6266e46 --- /dev/null +++ b/pmacct/dbGrant.mysql @@ -0,0 +1 @@ +grant all privileges on pmacct.* to pmacct@localhost identified by 'arealsmartpwd' with grant option; diff --git a/pmacct/pmacctd.conf b/pmacct/pmacctd.conf new file mode 100644 index 0000000..9dcb1e7 --- /dev/null +++ b/pmacct/pmacctd.conf @@ -0,0 +1,31 @@ +! +! pmacctd configuration example +! +! Did you know CONFIG-KEYS contains the detailed list of all configuration keys +! supported by 'nfacctd' and 'pmacctd' ? +! +! debug: true +! +interface: eth0 +daemonize: false +aggregate: src_host,dst_host + +plugins: mysql +sql_db: pmacct +sql_table: acct +!sql_table_version: 1 +sql_passwd: arealsmartpwd +sql_user: pmacct +sql_refresh_time: 90 +sql_optimize_clauses: true +sql_history: 1m +sql_history_roundoff: mh +! sql_preprocess: qnum=1000, minp=5 +! +! networks_file: ./networks.example +! ports_file: ./ports.example +! sampling_rate: 10 +! sql_trigger_time: 1h +! sql_trigger_exec: /home/paolo/codes/hello.sh +! + diff --git a/pmacct/sbSetupCustom.mysql b/pmacct/sbSetupCustom.mysql new file mode 100644 index 0000000..dafc638 --- /dev/null +++ b/pmacct/sbSetupCustom.mysql @@ -0,0 +1,16 @@ +drop database if exists pmacct; +create database pmacct; +use pmacct; + +drop table is 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) +); |