nagvis icon indicating copy to clipboard operation
nagvis copied to clipboard

Weathermap line - line_type=15 results in Value 3 is empty

Open joncav opened this issue 6 years ago • 4 comments

When using line_type=15 (BW) you receive an error and no display of the BW within the Weathermap line. This is because within the file: /nagvis-master/share/frontend/nagvis-js/js/ElementLine.js, line 728 declares that if datasource 2 or 3 are empty (used for line type 14 with % and BW) then you receive an error.

joncav avatar Apr 04 '18 22:04 joncav

I am not sure whether or not your solution solves the issue for all cases. The code is pretty ugly :/.

How does the perfdata string look like you used?

The original code seems to assume a perfdata structured like this:

perfdata[0] should contain the in percentage perfdata[1] should contain the out percentage perfdata[2] should contain the in bandwidth in bit/s perfdata[3] should contain the out bandwidth in bit/s

calculateUsage() handles a special case of Check_MKs bandwidth checks. It calculates the percentage usage from the given bandwidth in case it finds "in" and "out" perfdata.

Above means perfdata[2] and perfdata[3] should be relevant for the rendering of the labels (which can be found in renderLabel().

We probably need to move the validations of the perf entries below calculateUsage() to make the transformation code do it's work before checking for missing values.

LarsMichelsen avatar Apr 16 '18 18:04 LarsMichelsen

We're upgrading from 1.9.4. to 1.9.8 and we ran into issue with line_type 15 on line 733. It took a long time to debug. 1.9.4 only had line_type==14, but 1.9.8 has line_type==14 || line_type==15. We ended up doing the same thing in joncav's fix.

zeki893 avatar Mar 26 '19 00:03 zeki893

BTW does anybody know what line_type 15 is?

zeki893 avatar Mar 26 '19 00:03 zeki893

"line_type=15" is the "---BW--><--BW--" line type.

In my last post here I asked for the "perfdata string" of a service that caused this issue but did not get any response yet. I won't apply any change to fix this without a way to reproduce this issue.

LarsMichelsen avatar Jun 01 '19 23:06 LarsMichelsen