Hi Brent, On Fri, Feb 19, 2010 at 10:51:21AM -0800, Brent Van Dussen wrote:
> 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. It seems you are looking for the sql_preprocess directive - and minb and/or minp keys. It allows to put some conditions for row insertion/ update at every refresh interval. > 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. Netmasks. They are not there but i've recently received two more requests in a row for such a feature. All coming from people making use of the BGP feature. Hence, this is on my todo list and will appear very soon - would say roughly 3-4 weeks. Would such approx timeline match your expectations? Question to you (and others who might be interested indeed): given the use you would make out of them; how would you envision netmasks implementation in the DB structure? What would be handy: a separate field in the table or the mask appended to the IP prefix string? I do have myself an idea but don't want to biase answer(s) at this stage. > 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) > ); Configuration and schema look OK (except for a primary key missing the as_path, but perhaps that is intentional). In the table above, as_path is the only primitive being grasped from BGP - it looks there might be an underlying issue correlating sFlow data to BGP. Did you already clear out other BGP primitives, ie. local_pref, are grasped OK? For some debug you can enable the 'bgp_daemon_msglog' in order to verify the prefixes are received OK. To see which router is successfully connecting, you can locally enable debug. I can advice to give a name to the 'mysql' plugin and then enable debug on the 'default' (core) process, ie.: debug[default]: true plugins: mysql[blabla] If daemonizing, it would be convenient to add a 'logfile' directive to get all such output nailed down somewhere persistent. > Thanks and let me know if there's any other data I can provide. Great > work on getting BGP implemented into the daemon!!! Thanks! Cheers, Paolo _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists