Hi,
I am using pmacct 1.5.0rc1 and running into a issue in which the as-path
lookup via BGP is not being inserted into postgres.

*Configuration:*
! Defaults
debug: true
daemonize: false
plugins: pgsql[5mins], pgsql[hourly]
nfacctd_port: 7000
nfacctd_time_new: true
interface: eth0
nfacctd_as_new: bgp
nfacctd_net: bgp
nfacctd_peer_as: true
nfacctd_renormalize: true
plugin_buffer_size: 10240
plugin_pipe_size: 1024000
geoip_ipv4_file: /usr/share/GeoIP/GeoIP.dat
geoip_ipv6_file: /usr/share/GeoIP/GeoIPv6.dat
pkt_len_distrib_bins:
0-199,200-399,400-599,600-799,800-999,1000-1499,1500-9000

!BGP
bgp_daemon: true
bgp_daemon_ip: x.x.x.x
bgp_daemon_max_peers: 100
bgp_aspath_radius: 15
bgp_peer_src_as_type: bgp
bgp_agent_map: /opt/src/pmacctd/etc/pmacct-agent_bgp.map
pre_tag_map: /opt/src/pmacctd/etc/pretag.map
bgp_daemon_msglog: true

!SQL
sql_user: pmacctd
sql_passwd: xxxxxxxx
sql_optimize_clauses: true
sql_dont_try_update: true
sql_table_type: bgp

aggregate: src_mac, dst_mac, src_host, dst_host, src_net, dst_net,
src_mask, dst_mask, src_as, dst_as, src_port, dst_port, tos, proto, flows,
tag, tcpflags, in_iface, out_iface, as_path, sampling_rate,
src_host_country, dst_host_country, pkt_len_distrib, timestamp_start,
timestamp_end,
src_as_path

!5 min
sql_refresh_time[5mins]: 60
sql_history[5mins]: 1m
sql_history_roundoff[5mins]: m
sql_table[5mins]: acct_5mins

!1 hour
sql_refresh_time[hourly]: 3600
sql_history[hourly]: 1h
sql_history_roundoff[hourly]: h
sql_table[hourly]: acct_hourly


*BGP msglog:*
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '198.206.8.0/21' Path:
'65501 1299 3257 4436 29761 36352' Comms: '' EComms: '' LP: '100' MED: '0'
Nexthop: 'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] w Prefix: '8.20.2.0/24' Path:
'65501 2914 174 35873' Comms: '' EComms: ''
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '192.58.232.0/24' Path:
'65501 2914 209 6629' Comms: '' EComms: '' LP: '100' MED: '0' Nexthop:
'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '198.206.8.0/21' Path:
'65501 2914 4436 29761 36352' Comms: '' EComms: '' LP: '100' MED: '0'
Nexthop: 'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '192.58.232.0/24' Path:
'65501 2914 3356 6629 6629 6629 6629 6629' Comms: '' EComms: '' LP: '100'
MED: '0' Nexthop: 'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '80.67.188.0/24' Path:
'65501 1299 3257 42456 60197' Comms: '' EComms: '' LP: '100' MED: '0'
Nexthop: 'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '89.234.141.0/24' Path:
'65501 1299 42456 60630' Comms: '' EComms: '' LP: '100' MED: '0' Nexthop:
'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '80.67.188.0/24' Path:
'65501 1299 42456 60197' Comms: '' EComms: '' LP: '100' MED: '0' Nexthop:
'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] w Prefix: '186.235.48.0/21' Path:
'65501 1299 701 7738 263096' Comms: '' EComms: ''
INFO ( default/core/BGP ): [Id: x.x.x.x] u Prefix: '186.235.48.0/21' Path:
'65501 1299 701 7738 263096' Comms: '' EComms: '' LP: '100' MED: '0'
Nexthop: 'x.x.x.x'
INFO ( default/core/BGP ): [Id: x.x.x.x] w Prefix: '186.235.48.0/21' Path:
'65501 1299 701 7738 263096' Comms: '' EComms: ''
DEBUG ( default/core/BGP ): [Id: x.x.x.x] BGP_KEEPALIVE received
DEBUG ( default/core/BGP ): [Id: x.x.x.x] BGP_KEEPALIVE sent

*SQL insert:*
INFO ( 5mins/pgsql ): *** Purging cache - START ***
DEBUG ( 5mins/pgsql ): INSERT INTO acct_5mins (stamp_updated,
stamp_inserted, mac_src, mac_dst, ip_src, ip_dst, as_src, iface_in,
iface_out, mask_src, mask_dst, as_dst, as_path, as_path_src, port_src,
port_dst, tcp_flags, tos, ip_proto, country_ip_src, country_ip_dst,
sampling_rate, pkt_len_distrib, timestamp_start, timestamp_start_residual,
timestamp_end, timestamp_end_residual, agent_id, packets, bytes, flows)
VALUES (ABSTIME(1383000001)::Timestamp, ABSTIME(1382999700)::Timestamp,
'00:00:00:00:00:00', '00:00:00:00:00:00', '199.7.69.0', 'x.x.x.x', 12008,
564, 698, 24, 27, 0, '', '', 53, 50346, 0, 0, 17, 'US', '--', 1, '0-199',
ABSTIME(1383000342)::Timestamp, 179000000, ABSTIME(1383000342)::Timestamp,
179000000, 1, 1, 62, 1)

DEBUG ( 5mins/pgsql ): INSERT INTO acct_5mins (stamp_updated,
stamp_inserted, mac_src, mac_dst, ip_src, ip_dst, as_src, iface_in,
iface_out, mask_src, mask_dst, as_dst, as_path, as_path_src, port_src,
port_dst, tcp_flags, tos, ip_proto, country_ip_src, country_ip_dst,
sampling_rate, pkt_len_distrib, timestamp_start, timestamp_start_residual,
timestamp_end, timestamp_end_residual, agent_id, packets, bytes, flows)
VALUES (ABSTIME(1383000001)::Timestamp, ABSTIME(1382999700)::Timestamp,
'00:00:00:00:00:00', '00:00:00:00:00:00', '64.34.160.0', 'x.x.x.x', 13768,
564, 698, 20, 27, 0, '', '', 53, 44730, 0, 0, 17, 'US', '--', 1, '0-199',
ABSTIME(1383000347)::Timestamp, 532000000, ABSTIME(1383000347)::Timestamp,
532000000, 1, 1, 182, 1)

DEBUG ( 5mins/pgsql ): INSERT INTO acct_5mins (stamp_updated,
stamp_inserted, mac_src, mac_dst, ip_src, ip_dst, as_src, iface_in,
iface_out, mask_src, mask_dst, as_dst, as_path, as_path_src, port_src,
port_dst, tcp_flags, tos, ip_proto, country_ip_src, country_ip_dst,
sampling_rate, pkt_len_distrib, timestamp_start, timestamp_start_residual,
timestamp_end, timestamp_end_residual, agent_id, packets, bytes, flows)
VALUES (ABSTIME(1383000001)::Timestamp, ABSTIME(1382999700)::Timestamp,
'00:00:00:00:00:00', '00:00:00:00:00:00', '208.78.71.0', 'x.x.x.x', 33517,
564, 698, 24, 27, 0, '', '', 53, 30283, 0, 0, 17, 'US', '--', 1, '0-199',
ABSTIME(1383000347)::Timestamp, 153000000, ABSTIME(1383000347)::Timestamp,
153000000, 1, 1, 180, 1)


I have looked at it for a few days but have not been able to figure it out.
 Any help would be most appreciated.

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

Reply via email to