summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Langesten <daniel.langest@gmail.com>2015-03-13 13:15:55 +0100
committerDaniel Langesten <daniel.langest@gmail.com>2015-03-13 13:15:55 +0100
commit4b16059c4e7f3735c016d4f47c9f87371bf22d8e (patch)
tree5892e2daab0dcefb47a9f1398523159a53e5b1ed
parent114328feccb6ce3dbd16219fc456a34d00f72ec6 (diff)
added config files for pmacct
-rw-r--r--pmacct/dbGrant.mysql1
-rw-r--r--pmacct/pmacctd.conf31
-rw-r--r--pmacct/sbSetupCustom.mysql16
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)
+);