Difference between revisions of "Pmacct"
From Initech Technical Wiki
(Created page with " <pre> debug: false daemonize: false pidfile: /var/run/nfacctd.pid print_cache_entries: 1000000 #nfacctd_pipe_size: 2048000000 #nfacctd_disable_checks: true plugin_pipe_si...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | This config file (location depends on your configuration but mine exists at /etc/pmacct/nfacctd.conf) makes nfacct output a json formatted dump of all flows every minute to /tmp/nfacctd.json and call /usr/local/bin/[[nfacct-clickhouse-import]] to import it into [[clickhouse]] | |
<pre> | <pre> | ||
Line 7: | Line 7: | ||
print_cache_entries: 1000000 | print_cache_entries: 1000000 | ||
− | |||
− | |||
− | |||
plugin_pipe_size: 10240000 | plugin_pipe_size: 10240000 | ||
Line 22: | Line 19: | ||
print_refresh_time[nfacct]: 60 | print_refresh_time[nfacct]: 60 | ||
print_trigger_exec[nfacct]: /usr/local/bin/nfacct-clickhouse-import | print_trigger_exec[nfacct]: /usr/local/bin/nfacct-clickhouse-import | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
timestamps_since_epoch: true | timestamps_since_epoch: true | ||
timestamps_secs: true | timestamps_secs: true | ||
− | |||
</pre> | </pre> |
Latest revision as of 21:19, 18 October 2019
This config file (location depends on your configuration but mine exists at /etc/pmacct/nfacctd.conf) makes nfacct output a json formatted dump of all flows every minute to /tmp/nfacctd.json and call /usr/local/bin/nfacct-clickhouse-import to import it into clickhouse
debug: false daemonize: false pidfile: /var/run/nfacctd.pid print_cache_entries: 1000000 plugin_pipe_size: 10240000 plugin_buffer_size: 10240 plugins: print[nfacct] aggregate [nfacct]: tcpflags,tos,proto,src_host,dst_host,src_as,dst_as,src_port,dst_port,in_iface,out_iface,peer_src_ip print_output_file[nfacct]: /tmp/nfacctd.json print_output[nfacct]: json print_history[nfacct]: 1m print_history_roundoff[nfacct]: m print_refresh_time[nfacct]: 60 print_trigger_exec[nfacct]: /usr/local/bin/nfacct-clickhouse-import timestamps_since_epoch: true timestamps_secs: true