zenoss/ZenPacks.zenoss.RabbitMQ — Issue #4: NaN Values for Some Metrics
Author: cluther
Created: 2012-01-25 20:40:02+00:00
State: open

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.