Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

NaN Values for Some Metrics #4

Closed
cluther opened this Issue · 2 comments

1 participant

@cluther
Owner

I have been using the RabbitMQ zenpack for about a week, and several RRDs only have NaN values (recvBytes, recvCount, et al.).

After some digging, I found that the variable "results.values" in the file parsers/RabbitMQCTL.py had repeated some fields and was missing others, e.g. (note sendCount)

[(({}, 'connections'), 2), (({}, 'channels'), 2), (({}, 'sendQueue'), 0), (({}, 'sendCount'), 14), (({}, 'sendCount'), 14), (({}, 'sendCount'), 14), (({}, 'sendCount'), 14)]

line 162 in parsers/RabbitMQCTL.py reads:

for field in delta_metrics:

changing it to this:

for metric in delta_metrics:

seemed to fix the problem.

This looks like a simple typo, the loop declaration uses a "field" variable which is never referenced in the loop body, the loop body in fact uses the "metric" variable which was last used in a previous loop.

After the change, the RRDs and graphs have real values, and the results.values variable looks correct.

Let me know what you think.

@cluther
Owner

This issue was discovered and investigated by an anonymous user. I only entered it.

@cluther cluther was assigned
@cluther cluther referenced this issue from a commit
@cluther cluther Fixes issue #4. e2de7aa
@cluther
Owner

The fix for this issue is in the 1.0.0 release.

@cluther cluther closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.