All,

I was curious if there was a way to have sfacctd only insert into the database if a certain number of packets and/or bytes threshold is reached.

I need to have interface level granularity to be able to see top traffic talkers by as-path and prefix.

Everything is great so far using bgp_v1 mysql table but when I started to aggregate on dst_net my DB could no longer keep up with the 1000's of extra updates being generated.

Is there a way to drop updates for a given dst_net if there aren't a configurable number of packets over the refresh interval? over half of the prefixes were only one packet and I could wipe out half my DB updates if sfacctd only sent updates if there was a minimum of 100 packets per dst_net per 2 minute interval, for instance.

Would it also be possible to have the dst_net appended with mask length and a slightly larger DB field to accomodate it? 255.255.255.255/25 would be a CHAR(18) instead of CHAR(15) but it would be really nice to have this information from BGP or the sflow prefix field added in so a network map isn't needed.

One final thing was that I saw erratic behavior with the as-path feature when creating my own custom sql table from scratch, pasted below...anything look like it shouldn't work? I would comment out the sql_table_version and sql_table_type and uncomment sql_table to define the new table name to use and everything inserted ok just most of my as-path's were then missing

create table custom_llnw (
        agent_id INT(4) UNSIGNED NOT NULL,
        as_path CHAR(50) NOT NULL,
        packets INT UNSIGNED NOT NULL,
        bytes BIGINT UNSIGNED NOT NULL,
        stamp_inserted DATETIME NOT NULL,
        stamp_updated DATETIME,
        PRIMARY KEY (agent_id, stamp_inserted)
);


#daemonize: true
#debug: true
plugins: mysql
interface: eth0
aggregate: as_path, tag
sfacctd_port: 6343
sql_refresh_time: 120
sql_history: 10m
sql_history_roundoff: mh
sfacctd_ip: <snip>
sfacctd_net: bgp
sfacctd_ext_sampling_rate: 8192
sfacctd_renormalize: true
sql_passwd: <snip>
sql_table_version: 1
sql_table_type: bgp
#sql_table: custom_llnw
sql_multi_values: 1048576
sql_optimize_clauses: true

bgp_daemon: true
bgp_daemon_ip: <snip>
bgp_daemon_max_peers: 100
bgp_aspath_radius: 8
sfacctd_as_new: bgp

pre_tag_map: /usr/local/etc/pmacct/pretag.map


Thanks and let me know if there's any other data I can provide. Great work on getting BGP implemented into the daemon!!!

-Brent

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

Reply via email to