markormesher / iperf-prometheus-collector

GNU Affero General Public License v3.0
3 stars 1 forks source link

New env variable to specify additional iperf cmd line options + publish new release #24

Closed gberche-orange closed 1 day ago

gberche-orange commented 1 week ago

Thanks for sharing this exporter to the community !

As a user, in order to control bandwidth, protocol, duration of the iperf tests I need to specify additional iperf3 cmd line arguments

The current workaround I use is to use a single target in the TARGET_LIST and suffix command line arguments to the target host such as iperf-private-listener-r2-z2-2.redacted.domain.org -p 443 -4 -Z -t 5 -b 1k

The implication is that the produced metric then contain the cmd line options such as in

iperf_sent_bytes{target="iperf-private-listener-r2-z2-2.redacted.domain.org  -p 443 -4 -Z -t 5 -b 1k"} 108072 1728487473333
iperf_sent_seconds{target="iperf-private-listener-r2-z2-2.redacted.domain.org  -p 443 -4 -Z -t 5 -b 1k"} 5.000377 1728487473333
iperf_received_bytes{target="iperf-private-listener-r2-z2-2.redacted.domain.org -p 443 -4 -Z -t 5 -b 1k"} 108072 1728487473333

Having the cmd line options part of the metrics label are definitively useful in some cases, such as when the same target is queried with different options (such as udp vs tcp), however they would be easier to leverage as a distinct label such as options:

iperf_sent_bytes{target="iperf-private-listener-r2-z2-2.redacted.domain.org", options="  -p 443 -4 -Z -t 5 -b 1k"} 108072 1728487473333
iperf_sent_seconds{target="iperf-private-listener-r2-z2-2.redacted.domain.org", options="  -p 443 -4 -Z -t 5 -b 1k"} 5.000377 1728487473333
iperf_received_bytes{target="iperf-private-listener-r2-z2-2.redacted.domain.org", options=" -p 443 -4 -Z -t 5 -b 1k"} 108072 1728487473333

BTW, I need that renovate PR get merged such as https://github.com/markormesher/iperf-prometheus-collector/pull/16 but no OCI artefact in https://github.com/markormesher/iperf-prometheus-collector/pkgs/container/iperf-prometheus-collector or release in https://github.com/markormesher/iperf-prometheus-collector/tags past 0.2.0.

As a result, the iperf3 image within the OCI image seems aging (3.10.1 released on 2021-06-03 from https://github.com/esnet/iperf/blob/master/RELNOTES.md#iperf-3101-2021-06-03

iperf3 -v
iperf 3.10.1 (cJSON 1.7.13)
Linux 4072f999-e7ea-4591-aa51-c5876d5ac4ae 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64
Optional features available: CPU affinity setting, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, bind to device, support IPv4 don't fragment

Any chance to set up the github workflow to publish on master pushes or trigger some release ? Here is a sample workflow if this can help https://github.com/orange-cloudfoundry/kuttl-enriched-image/blob/master/.github/workflows/docker-publish.yml

Thanks again for the great work !

markormesher commented 3 days ago

Hey @gberche-orange, thanks for taking an interest in this project. I haven't worked on it in a long time as you can see, but your issues all raise valid points so let's get them fixed up.

I'm going to start by upgrading Yarn, getting a lot of the Renovate PRs merged, and getting the repo looking closer to the other ones I maintain so I can automate more of that going forwards. It's already set up for publishing when I tag a release, so I'll do that as well. I'll set it up for publishing non tagged releases too, but not to "latest". I'll probably do this in the next few days.

Regarding this specific issue, about allowing options to be specified, it sounds like a perfectly reasonable addition - after the changes above I will review the PR you raised to add it.

gberche-orange commented 3 days ago

Hi @markormesher , this sounds great, thanks !

markormesher commented 2 days ago

I've just merged a PR that upgrades Yarn and brings the repo more in line with others I maintain. I'll wait for Renovate to run again and review/merge whatever comes up, then we can start looking at the issues you've opened.

markormesher commented 1 day ago

Addressed in the re-write: https://github.com/markormesher/iperf-prometheus-collector/pull/35/files#diff-33b6837c599c9f67320ec38678d366528089e4a5db0f786203c3af5c9898bd66R38