pmacct-discussion  

Re: [pmacct-discussion] NO pmacct aggregation bug

Paolo Lucente
Tue, 15 Apr 2008 07:20:57 -0700

Hi Alex,

please read my comments inline:

On Fri, Apr 11, 2008 at 07:05:33PM +0300, alex wrote:

> 1.  How i can in my configuration (several 'nfprobe' plugins on one
>     machine and 'nfacctd' collector on another) setting 'agent_id'
>     field in database? Now i use follow configurations:

On the NetFlow probe side you need to set different engines, one per
nfprobe plugin, like in the following example:

...
plugins: nfprobe[out1], nfprobe[out2]
nfprobe_engine[out1]: 1:1
nfprobe_engine[out2]: 1:2
...

On the NetFlow collector side, you need to intercept such fields and
tag the related flows properly. It's only by doing that explicitely
that you will see the agent_id field populated correctly. Like:

pretag.map:
...
id=1 ip=x.x.x.x engine_type=1 engine_id=1
id=2 ip=x.x.x.x engine_type=1 engine_id=2
...

nfacctd.conf:
...
plugins: mysql[out1], mysql[out2]
pre_tag_map: /path/to/pretag.map
pre_tag_filter[out1]: 1
pre_tag_filter[out2]: 2
aggregate[out1]: tag, src_host, dst_host, src_port, dst_port, proto
aggregate[out2]: tag, src_host, dst_host, src_port, dst_port, proto 
...

> 2.  How i can count 'flows' field?

As simple as add the 'flows' keyword to the 'aggregate' directive.

Cheers,
Paolo


_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists