Perf-o-meter for interface checks does not consider assumed_speed in CEE 1.5.0p24

Hi,

after update from CEE 1.5.0p16 to 1.5.0p24 I have noticed that the perf-o-meters for interface checks (like if64 or based on the same if_fortigate) do not consider assumed_speed.
For example:

a line form the output of the command
cmk -nvp --debug --checks if_fortigate Fortigate

Interface wan2 OK - [3] (up) MAC: XX:XX:XX:XX:XX:XX, 1 Gbit/s, in: 16.7 Kbit/s(0.0%/100 Mbit/s), out: 381.9 Kbit/s(0.4%/100 Mbit/s) (in=2092.03071;10000000;11250000;0;12500000 inucast=6.340279;;;; innucast=0;;;; indisc=0;;;; inerr=0;90;95;; out=47733.102037;10000000;11250000;0;12500000 outucast=74.829224;;;; outnucast=0;;;; outdisc=0;;;; outerr=0;90;95;; outqlen=0;;;0.0;)

But the perf-o-meter uses the logarithmic scale like on the screenshot, because it doesn’t recognize in_bw or out_bw like coded in share/check_mk/web/plugins/perfometer/check_mk.py:

def perfometer_bandwidth(in_traffic, out_traffic, in_bw, out_bw, unit = “B”):
traffic_multiplier = 1 if (unit == “B”) else 8

# if we do not have bandwith make logarithmic perf-o-meter
if in_bw <= 0.0 or out_bw <= 0.0:

…

def perfometer_check_mk_if(row, check_command, perf_data):
unit = “Bit” if “Bit/s” in row[“service_plugin_output”] else “B”
return perfometer_bandwidth(
in_traffic = savefloat(perf_data[0][1]),
out_traffic = savefloat(perf_data[5][1]),
in_bw = savefloat(perf_data[0][6]),
out_bw = savefloat(perf_data[5][6]),
unit = unit
)

And looks like both in_bw and out_bw are empty, because the performance data doesn’t have an element number 6.

Or am I wrong and it is something different?
Any suggestions and help are very appreciated!

Best regards
Hermann M.

That’s right - it happens also for interfaces with known speed. They also don’t scale correctly for the interface speed. At the moment there is no chance to get percentage as Perf-o-Meter for interfaces.

The code you mentioned is the old code, it is not used anymore at the moment.

In the following thread i gave a quick and dirty solution for this problem :slight_smile:

1 Like

Thanks Andreas!
I am not sure, if I would apply the workaround yet.
Do you know occasionally, if it is planned to return to the “old-style” perf-o-meter, which scaled properly?

Kind regards
Hermann M.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.