New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joncav opened this Issue Apr 4, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@joncav

joncav commented Apr 4, 2018

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 added a commit to joncav/nagvis that referenced this issue Apr 13, 2018

Fix for line type 15
Closes NagVis#153 where error received due because nothing is present in the 3-4th perf_data data sources. Removing the conditon for line_type 15 resolves the issue.

@joncav joncav reopened this Apr 13, 2018

@joncav joncav referenced a pull request that will close this issue Apr 13, 2018

Open

Fix for line type 15 #155

@LarsMichelsen

This comment has been minimized.

Show comment
Hide comment
@LarsMichelsen

LarsMichelsen Apr 16, 2018

Contributor

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.

Contributor

LarsMichelsen commented Apr 16, 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[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment