Hi Andrey, Data is purged to the database each sql_refresh_time, by default 60 secs so this is expected behaviour. You are free to redefine this to a different value of course.
On the error from your other email: any chance you can post what is the problematic column (since you said it's always the same one)? It would allow to formulate an idea and/or reproduce the issue. I can confirm the error as it is spit out does not ring a bell to me. Paolo On Fri, Mar 16, 2018 at 02:33:43PM +0200, Andrey Koblyuk wrote: > > > Then you may be missing the sql_history and sql_history_roundoff then. > > Paolo, thank you. Created table has correct name. > > Which is strange - with my config > sql_table[storage] : traffic_%d%m%Y > sql_table_schema[storage] : /etc/pmacct/nfacct_schema.psql > sql_table_type[storage] : bgp > sql_dont_try_update[storage] : true > sql_use_copy[storage] : true > sql_history[storage] : 1d > sql_history_roundoff[storage] : d > > data purged in table in one minute range (based on stamp_updated?) . as I > tested it: > on sql server i periodically(once per 10sec ) run SQL QUERY (9-10 queryes), > such as > select * from traffic_16032018 order by id_key desc limit 1; > and see line in attach1.txt. after minute data in table changed and i see > (same query) line in attach2.txt. > In the daemon log could pass 10-15 INFO ( storage/pgsql ): Purging cache - > START/END calls. > Is this normal behavior? > > > I will also be very grateful for your comment about the errors in the sql > server logs that I sended at the end of my previous email. > > > > -- > ANK32-RIPE > id_key | as_src | as_dst | ip_src | ip_dst | port_src | > port_dst | ip_proto | iface_in | iface_out | packets | bytes | > timestamp_start | timestamp_start_residual | timestamp_end | > timestamp_end_residual | stamp_updated | stamp_inserted > ---------+--------+--------+----------------+----------------+----------+----------+----------+----------+-----------+---------+-------+---------------------+--------------------------+---------------------+------------------------+---------------------+--------------------- > 8751053 | 57774 | 14061 | 176.107.196.58 | 165.227.129.48 | 57818 | > 8080 | 6 | 546 | 725 | 1 | 40 | 2018-03-16 > 13:56:37 | 634000 | 2018-03-16 13:56:37 | > 634000 | 2018-03-16 13:59:19 | 2018-03-16 00:00:00 > id_key | as_src | as_dst | ip_src | ip_dst | port_src | > port_dst | ip_proto | iface_in | iface_out | packets | bytes | > timestamp_start | timestamp_start_residual | timestamp_end | > timestamp_end_residual | stamp_updated | stamp_inserted > ---------+--------+--------+-------------+----------------+----------+----------+----------+----------+-----------+---------+-------+---------------------+--------------------------+---------------------+------------------------+---------------------+--------------------- > 9126683 | 9198 | 8870 | 5.251.17.62 | 93.171.243.123 | 13463 | > 55127 | 6 | 725 | 546 | 2 | 96 | 2018-03-16 > 13:46:54 | 181000 | 2018-03-16 13:47:00 | > 217000 | 2018-03-16 14:00:19 | 2018-03-16 00:00:00 _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
