phaag / go-nfdump

go-nfdump: A Go module to read and process nfdump files
BSD 2-Clause "Simplified" License
7 stars 1 forks source link

Make use of sampling rate (if sent by exporter) #4

Closed gabrielmocan closed 1 year ago

gabrielmocan commented 1 year ago

Hi Pete, I was wondering how can we reproduce nfdump's CLI behavior of using exporter's sample rate factor in dumping. Can we retrieve this value as of now?

phaag commented 1 year ago

You mean, the sampler and exporter information?

gabrielmocan commented 1 year ago

Yes, the sampling interval. I see there is available in the EXsamplerInfo extension, but still not implemented, right?

phaag commented 1 year ago

It's a bit more complicated than that, as records only contain references to exporters and samplers. Let's do it in two steps. First add the exporter, then the sampler.

phaag commented 1 year ago

Can you try with the latest main repo?

gabrielmocan commented 1 year ago

It works like a charm. Thanks Pete.