Thruk icon indicating copy to clipboard operation
Thruk copied to clipboard

Performance Data Bar in Service Details page not shown correctly.

Open ChristianSchoeniger opened this issue 2 years ago • 2 comments

Describe the bug

  • background of bar doesn't reflect service state when there is more than one perforrmance data value
  • if there are ranges for Warning/Critical values the bar doesn't shown any data

Thruk Version Thruk 2.46.3

To Reproduce Steps to reproduce the behavior:

  1. Go to a Service with more than 1 perforrmance data value

  2. See error

  3. Go to a Service with ranges for Warning/Critical values

  4. See error

Expected behavior see attached screenshots

Screenshots multiple performance data values: raw data = "pages=32773 'TK-8335C'=26%;10;3;0;100 'TK-8335M'=37%;10;3;0;100 'TK-8335Y'=7%;10;3;0;100 'TK-8335K'=18%;10;3;0;100"

thruk_service_perf_data_bar_2

Warning/Critical range: raw data = "51_TX=-4.89dBm;-15:-1;-16:0.01 51_RX=-11.18dBm;-15:-1;-16:0.01 52_TX=-4.93dBm;-15:-1;-16:0.01 52_RX=-6.02dBm;-15:-1;-16:0.01"

thruk_service_perf_data_bar_1

Patched multiple performance data values: Hard to see, but the bar for the value that triggers the warning is yellow. thruk_service_perf_data_bar_2_patched

Warning/Critical range: thruk_service_perf_data_bar_1_patched thruk_service_perf_data_bar_3_patched

Additional context How can i submit my patch?

ChristianSchoeniger avatar Feb 07 '22 15:02 ChristianSchoeniger

The idea is, that if there are multiple performance values, then only the ones which are outside their range should have the background color set. For example take check_disk over all filesystems and only one is full. It would make no sense to draw all of them with a red background. But from a quick look, that's still the case with your patch, right? You should be able to create a pull request from your fork. There should be a button somewhere :)

sni avatar Feb 07 '22 20:02 sni

Hi Sven,

background color is chosen by warning/critical upper and lower thresholds of each performance value. (d.crit_max, d.crit_min, d.warn_max, d.warn_min) See attached screenshots.

Screenshot_2022-02-08_09-47-39 Screenshot_2022-02-08_09-59-09

ChristianSchoeniger avatar Feb 08 '22 09:02 ChristianSchoeniger