SUPPORTED CONFIGURATION KEYS
Due to the proliferation of command-line options, the support for a
configuration file has been added. Configuration keys together with
their correspective commandline switches and flags (in square brackets)
are listed below.
The configuration file consists of a key/value pairs, separated by
a ":" character. A "!" at the beginning of the line, means a comment
line. Please refer also to pmacctd.conf.example for some examples and
to the output of 'pmacct -h' for a list of supported commandline switches.


KEY: 		debug (-d)
VALUES:		[true|false]
DESC:		Enables or disables debug
NOTES:		available only if not daemonized; doesn't debug
		configuration problems (should be fixed).

KEY:		daemonize (-D) [GLOBAL]
VALUES:		[true|false]
DESC:		Daemonizes the process

KEY:		aggregate (-c)
VALUES:		[src_mac,dst_mac,src_host,dst_host,src_net,dst_net,sum,src_port,dst_port,proto]
DESC:		primitives for data aggregation 

KEY:		aggregate_filter
DESC:		this filter is applied before data is passed to accountant plugin (memory, *SQL,
		etc). Allows to run a single instance of pmacctd even when plugins have to account
		different data. It is based over libpcap, so accepts has same capabilities and same
		syntax of libpcap filters

KEY:		pcap_filter (like tcpdump syntax) [GLOBAL]
DESC:		this filter gets passed to pcap library

KEY:		plugins (-P)
VALUES:		[memory|mysql|pgsql]
DESC:		plugin that needs to be enabled, if compiled 

KEY:		plugin_pipe_size
DESC:		size of the recv/send FIF0 queue between core pmacctd process and a plugin. The default
		size is set by the OS. Change (mostly augment) this size is needed when facing with really
		heavy traffic loads. Value is intended in bytes

KEY:		plugin_buffer_size [GLOBAL]
DESC:		size of transfer buffer between core pmacctd process and plugins. This value has to be less 
		than FIFO queue size. Default value is to disable bufferization. Value is intended in bytes

KEY:		interface (-i) [GLOBAL]
DESC:		interface used for listening (default: use pcap_lookupdev() to get a valid device)

KEY:		promisc (-N) [GLOBAL]
VALUES:		[true|false]
DESC:		Enables or disables the use of promiscuous mode of interface used to capture
		traffic. Promiscuous mode is useful only when the machine is not a router (default: true)

KEY:		imt_path (-p)
DESC:		path for client/server fifo (used by in-memory table plugin only)

KEY:		imt_passwd
DESC:		passphrase to be supplied by pmacct client to access statistics of the in-memory table

KEY:		imt_buckets (-b)
DESC:		number of buckets in the in-memory table

KEY:		imt_mem_pools_number (-m)
DESC:		numbers of memory pools (see INTERNALS file)

KEY:		imt_mem_pools_size (-s)
DESC:		size of each memory pool (see INTERNALS file)

KEY:		syslog (-S)
VALUES:		[auth|mail|daemon|kern|user|local[0-7]]
DESC:		enables syslog logging to the specified facility (default: console logging)

KEY:		pidfile (-F) [GLOBAL]
DESC:		writes PID to the specified file

KEY:		networks_file (-n)
DESC:		path to a file containing a list of networks (one for each line, alloweded
		syntax are: 1.2.3.4/255.255.255.0 and 1.2.3.4/24). Networks will get written
		to DB or memory table; unknown or not specified networks will be referred as
		0.0.0.0. To be used in conjunction with 'src_net' or 'dst_net' primitives 

KEY:		sql_db
DESC:		name of the SQL database to be used (default: pmacct)

KEY:            sql_table
DESC:           name of the SQL table to be used (default: acct)

KEY:		sql_data
VALUES:		[frontend|backend]
DESC:		this switch makes sense only if using PostgreSQL plugin. If "frontend" is specified,
		data (IP addresses, timestamps, etc.) will be written to the DB as strings; if "backend"
		is specified data will be written as long integers (default: frontend)

KEY:	 	sql_host
DESC:		ip/hostname where is listening SQL server (default: localhost)	

KEY:		sql_user
DESC:		username to be used when connecting to SQL server (default: pmacct)

KEY:		sql_passwd
DESC:		password to be used when connecting to SQL server (default: arealsmartpwd)

KEY:		sql_refresh_time (-r)
DESC:		refresh time of data into SQL database from in-memory cache (in seconds)

KEY:		sql_startup_delay
DESC:		time (in seconds) the first data flush to the DB has to be delayed. This setting allows 
		for two or more instances to refresh data at same time intervals but in different moments to
		avoid locking stalls or DB overkills

KEY:		sql_optimize_clauses
VALUES:		[true|false]
DESC:		enables the optimization of the SQL clauses. (default: false; read carefully
		INTERNALS "SQL issues" before enabling it)

KEY:		sql_history
VALUES:		#[m|h|d]
DESC:		enables the historical recording of counters inserted in the specified database.
		The selected value intuitively sets the granularity of the history (for example
		"5m", "1h", "4h", "1d", "7d"; if "1h" is choosen then counters inserted in the
		last hour are updated; each hour is created a new record) 

KEY:		sql_history_roundoff
VALUES		[m,h,d]
DESC:		enables the rounding of minutes, hours of days. How it works ? Suppose you launch
		a run with "sql_history: 1h" and "sql_history_roundoff: m" and they are 18:34.
		Rounding off minutes gives you an hourly timeslot (1h) that starts at 18:00; so,
		subsequent ones will start at 19:00, 20:00, etc. Suppose, now, you launch a run
		with "sql_history: 5m" and sql_history_roundoff: m" and they are 18:37. Rounding
		off minutes gives you a 5m slot starting at first non-empty timeslot that would
		be filled with data you are accounting; so a 5m slot that starts at 18:35. Next
		slot will start at 18:40 and subsequent every 5 minutes (18:45 ... 19:00, etc.). 

KEY:		sql_recovery_logfile
DESC:		enables recovery mode; recovery mode takes an action if DB fails, checking for the
		successful result of each query. By default it is disabled. This key enables writing
		data from memory cache straight to a specified logfile. The file produced could be
		later played with either "pmmyplay" or "pmpgplay" tools. See INTERNALS for details
		about recovery mode. 

KEY:            sql_recovery_backup_host
DESC:           enables recovery mode; recovery mode takes an action if DB fails, checking for the
                successful result of each query. By default it is disabled. This key enables writing
                data to a backup DB. See INTERNALS for details about recovery mode.

KEY:		sql_cache_entries
DESC:		number of cache buckets (or entries). A default value is set, if any value is supplied.
		This value is suitable for most scenarios, however when facing with large environments,
		the advice is to carefully tune this parameter to improve performances. Remember to use
		a prime number of buckets.
		
