Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sum/accumulate on custom primitives #578

Open
sj14 opened this issue Feb 24, 2022 · 1 comment
Open

Sum/accumulate on custom primitives #578

sj14 opened this issue Feb 24, 2022 · 1 comment

Comments

@sj14
Copy link

sj14 commented Feb 24, 2022

Description
Is it possible to sum on custom primitives?

I would like to sum/accumulate on initiatoroctets and responderoctets but it looks like only packets and bytes are possible.

The update query from the debug output as an example:

DEBUG ( default_mysql/mysql ): UPDATE `2022_02_24` SET packets=packets+0, bytes=bytes+0, stamp_updated=NOW() WHERE FROM_UNIXTIME(1645660800) = stamp_inserted AND ip_dst='192.168.178.10' AND initiatoroctets=100 AND responderoctets=300 AND flowdirection=0 AND interfacename='inet' AND interfacedescription='' AND observationpointid=1 AND ingressvrfid=200 AND egressvrfid=202 AND vrfname='defaultInet' AND observationdomainname='placeholder'

Version

bash-5.1$ /nfacctd -V
NetFlow Accounting Daemon, nfacctd 1.7.7-git [RELEASE]

Arguments:
 '--enable-mysql' '--enable-threads' '--enable-64bit' 'CFLAGS=-O2' '--enable-l2' '--enable-traffic-bins' '--enable-bgp-bins' '--enable-bmp-bins' '--enable-st-bins'

Libs:
cdada 0.3.5
libpcap version 1.10.1 (with TPACKET_V3)
MariaDB 10.5.5

Plugins:
memory
print
nfprobe
sfprobe
tee
mysql

System:
Linux 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64

Compiler:
gcc 10.3.1

For suggestions, critics, bugs, contact me: Paolo Lucente <paolo@pmacct.net>.

Please let me know when more information (e.g. config) is required.

Thanks for the project and best regards,
Simon

@paololucente
Copy link
Member

Hi Simon ( @sj14 ),

Thanks for getting in touch about this. To confirm that, no, this is not currently possible but, being tremendously helpful, it's on the radar. I will mark this Issue as Enhancement / Feature Request and keep it open.

Paolo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants