rkosegi / netflow-collector

Simple Netflow V5 exporter for prometheus
Apache License 2.0
10 stars 3 forks source link

Panics with specific config #7

Closed vaygr closed 1 year ago

vaygr commented 1 year ago

Hello, thanks for this collector!

I noticed a few panics with specific configuration.

Adding bytes or packets as labels like:

          - name: bytes
            value: bytes
            converter: uint32

results in:

panic: interface conversion: interface {} is uint64, not uint32

as well as when converter is invalid.

rkosegi commented 1 year ago

Hi @vaygr thanks for reporting this.

I've added uint64 converter, but please note that aggregation over bytes doesn't make much sense.

vaygr commented 1 year ago

Thank you!

but please note that aggregation over bytes doesn't make much sense.

yes, I know. I was just debugging a reporting inconsistency problem (which I'm probably going to open an issue on) and just wanted to verify that bytes value is the same.