Dears,
Just for the archives: this has been solved by this commit:
https://github.com/pmacct/pmacct/commit/0da36b1aba053128532d6c1342e4f777a46b0041
Cheers,
Paolo
On Sat, Dec 03, 2016 at 01:24:47AM +0200, Сергей Горшков wrote:
> Hi Paolo, thank you for the answer
>
> root@pmacct:/etc/pmacct# cat bgp_agent.map
> bgp_ip=176.**.**.252 ip=0.0.0.0/0filter='ip'
> bgp_ip=2001:**:**:1::11 ip=0.0.0.0/0filter='ip6'
>
> Unfortunately, it did not help:-(
> Running takes place perfectly
> Dec 03 01:07:22 INFO ( default/core ): Trying to (re)load map:
> /etc/pmacct/bgp_agent.map
> Dec 03 01:07:22 INFO ( default/core ): map
> '/etc/pmacct/bgp_agent.map' successfully (re)loaded.
> Dec 03 01:07:22 INFO ( default/core/BGP ): maximum BGP peers allowed: 4
> Dec 03 01:07:22 INFO ( default/core/BGP ): waiting for BGP data on :::179
> Dec 03 01:07:24 INFO ( default/core/BGP ): BGP peers usage: 1/4
> Dec 03 01:07:24 INFO ( default/core/BGP ): Capability: MultiProtocol
> [1] AFI [1] SAFI [1]
> Dec 03 01:07:24 INFO ( default/core/BGP ): Capability: 4-bytes AS
> [41] ASN [5**81]
> Dec 03 01:07:24 INFO ( default/core/BGP ): [Id: 31.**.**.2]
> BGP_OPEN: Asn: 5**81 HoldTime: 240
> Dec 03 01:07:27 INFO ( default/core ): waiting for sFlow data on :::6343
> Dec 03 01:07:27 INFO ( default/mysql ): cache entries=32771 base
> cache memory=11369224 bytes
> Dec 03 01:08:01 INFO ( default/mysql ): *** Purging cache - START
> (PID: 1239) ***
> Dec 03 01:08:01 INFO ( default/mysql ): *** Purging cache - END
> (PID: 1239, QN: 3618/3618, ET: 0) ***
> Dec 03 01:08:59 INFO ( default/core/BGP ): BGP peers usage: 2/4
> Dec 03 01:08:59 INFO ( default/core/BGP ): Capability: MultiProtocol
> [1] AFI [2] SAFI [1]
> Dec 03 01:08:59 INFO ( default/core/BGP ): Capability: 4-bytes AS
> [41] ASN [5**81]
> Dec 03 01:08:59 INFO ( default/core/BGP ): [Id: 176.**.**.97]
> BGP_OPEN: Asn: 5**81 HoldTime: 180
>
> But here's the result of a
> +--+--+++-+---+--+--+--+-+---+---+-+-+
> | agent_id | vlan | as_src | as_dst | ip_src | ip_dst
> | src_port | dst_port | ip_proto | packets | bytes | flows |
> stamp_inserted | stamp_updated |
> +--+--+++-+---+--+--+--+-+---+---+-+-+
> |0 | 3855 | 0 | 0 | 2001:4860::1:0:893c |
> 2001:67c:2d40::47 |0 |0 | ipv6-i | 1 | 214 |
> 0 | 2016-12-03 01:00:00 | 2016-12-03 01:14:01 |
> +--+--+++-+---+--+--+--+-+---+---+-+-+
> and
> |0 | 3800 | 0 | 0 | 31.43.61.166 |
> 185.38.12.42 |56911 | 80 | tcp | 1 |
> 64 | 0 | 2016-12-03 01:00:00 | 2016-12-03 01:08:01 |
>
> Perhaps this will give a little more information to solve the problem
> Sfacct version
> #sfacctd -V
> sFlow Accounting Daemon, sfacctd 1.5.2 (20150907-00)
> --build=x86_64-linux-gnu
> --prefix=/usr '--includedir=${prefix}/include'
> '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info'
> --sysconfdir=/etc
> --localstatedir=/var
> --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu'
> '--libexecdir=${prefix}/lib/x86_64-linux-gnu'
> --disable-maintainer-mode
> --disable-dependency-tracking
> --enable-mmap
> --enable-pgsql
> --with-pgsql-includes=/usr/include/postgresql
> --enable-mysql
> --enable-sqlite3
> --enable-ipv6
> --enable-v4-mapped
> --enable-64bit
> --enable-threads
> --enable-jansson
> --enable-geoip
> --enable-rabbitmq
> ---
> Database
> create table acct_v6 (
> agent_id INT(4) UNSIGNED NOT NULL,
> class_id CHAR(16) NOT NULL,
> vlan INT(2) UNSIGNED NOT NULL,
> as_src INT(4) UNSIGNED NOT NULL,
> as_dst INT(4) UNSIGNED NOT NULL,
> 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,
> ip_proto CHAR(6) NOT NULL,
> packets INT UNSIGNED NOT NULL,
> bytes BIGINT UNSIGNED NOT NULL,
> flows INT UNSIGNED NOT NULL,
> stamp_inserted DATETIME NOT NULL,
> stamp_updated DATETIME,
> PRIMARY KEY (agent_id, class_id, vlan, as_src, as_dst, ip_src,
> ip_dst, src_port, dst_port, ip_proto, stamp_inserted)
> );
>
> For suggestions, critics, bugs, contact me: Paolo Lucente
> .
>
> 03.12.2016 0:03, Paolo Lucente пишет:
> >Hi Sergey,
> >
> >I guess what you need is to refine your bgp_agent_map as follows:
> >
> >bgp_ip=176.**.**.252 ip=0.0.0.0/0filter='ip'
> >bgp_ip=2001:**:**:1::11 ip=0.0.0.0/0filter='ip6'
> >
> >Let me know if this works for you.