Hi.

I have a problem where the data is being purged in multiple intervals and
this is causing a calculation issue, as it doesn't seem to be resetting the
values back to zero after each purge. My understanding is
that kafka_refresh_time should set it to fixed values, in this case 300
seconds, but from the logs it is clear that it is not happening like that.
Am I missing a config option or am I misunderstanding the configuration?

Some sample data for the IP x.x.x.x, it is the same IP for both events:
{"event_type": "purge", "ip_src": "x.x.x.x", "stamp_inserted": "2021-04-16
07:10:00", "stamp_updated": "2021-04-16 07:14:00", "packets": 12288,
"bytes": 9193472, "writer_id": "subscriber_usage/20793"}

{"event_type": "purge", "ip_src": "x.x.x.x", "stamp_inserted": "2021-04-16
07:10:00", "stamp_updated": "2021-04-16 07:15:03", "packets": 12288,
"bytes": 13235200, "writer_id": "subscriber_usage/20945"}

Some of the logs

2021-04-16T07:20:01+02:00 INFO ( subscriber_usage/kafka ): *** Purging
cache - START (PID: 21144) ***

2021-04-16T07:20:05+02:00 INFO ( subscriber_usage/kafka ): *** Purging
cache - END (PID: 21144, QN: 106679/106679, ET: 2) ***

2021-04-16T07:23:51+02:00 INFO ( subscriber_usage/kafka ): Finished cache
entries (ie. print_cache_entries). Purging.

2021-04-16T07:23:51+02:00 INFO ( subscriber_usage/kafka ): *** Purging
cache - START (PID: 21194) ***

2021-04-16T07:23:56+02:00 INFO ( subscriber_usage/kafka ): *** Purging
cache - END (PID: 21194, QN: 180344/180344, ET: 3) ***

2021-04-16T07:25:01+02:00 INFO ( subscriber_usage/kafka ): *** Purging
cache - START (PID: 21412) ***

2021-04-16T07:25:05+02:00 INFO ( subscriber_usage/kafka ): *** Purging
cache - END (PID: 21412, QN: 109942/109942, ET: 2) ***

Current running configuration.

daemonize: true

logfile: /var/log/nfacctd.log

!debug: true

plugins: kafka[subscriber_usage]

aggregate[subscriber_usage]: sum_host

nfacctd_renormalize: true

!nfacctd_ext_sampling_rate: 1024

nfacctd_pro_rating: true

!

nfacctd_time_new: true

!

kafka_output: json

kafka_topic: pmacct.test

kafka_refresh_time: 300

kafka_history: 5m

kafka_history_roundoff: m

kafka_broker_host: a.a.a.a


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

Reply via email to