Hi Rich,
While i don't have actual examples and while supporting the answers you
already received, i may propose you the following architectural tips:
* Write stuff into files with the 'print' plugin; using
print_latest_file to point always to the latest finalized file and
print_trigger_exec to execute a 3rd party (post-processing) script on
the file just finalized;
* Whatever language the post-processing is written into, you know that
you are being invoked by print_trigger_exec because print_latest_file is
now available. So, not even much env variable sophistication, you know
which file to read and process with your Python script;
* Should you want to scale up things further you could use the kafka
plugin, for example, instead of print / files; with a Python script
consuming from the topic where pmacct is producing. Such a setup would
allow you to scale things out easily with kafka topic partitions and
consumer threads / processes.
Paolo
On 3/5/22 15:19, Compton, Rich A wrote:
Hi, I’m trying to take the netflow records from nfacctd and process them
with a python script. Can someone suggest how I can do this with python
without having nfacctd put them into a database and then have my python
script read it? Is using kafka the best way? The netflow collection
and python script will be on the same instance. Any example code would
be very helpful!
Thanks!
signature_2304850901
Rich Compton | Principal Eng | 314.596.2828
8560 Upland Drive, Suite B | Englewood, CO 80112
PGP Key
<https://keys.openpgp.org/vks/v1/by-fingerprint/34796C9780F5A45110C2E757058D383616AF9497>
The contents of this e-mail message and
any attachments are intended solely for the
addressee(s) and may contain confidential
and/or legally privileged information. If you
are not the intended recipient of this message
or if this message has been addressed to you
in error, please immediately alert the sender
by reply e-mail and then delete this message
and any attachments. If you are not the
intended recipient, you are notified that
any use, dissemination, distribution, copying,
or storage of this message or any attachment
is strictly prohibited.
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists