Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Weathermap line - line_type=15 results in Value 3 is empty #153
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.
added a commit
Apr 13, 2018
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 should contain the in percentage
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 and perfdata 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.