zenoss / ZenPacks.zenoss.RabbitMQ

RabbitMQ Monitoring for Zenoss
GNU General Public License v2.0
10 stars 9 forks source link

NaN Values for Some Metrics #4

Closed cluther closed 12 years ago

cluther commented 12 years ago

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 commented 12 years ago

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

cluther commented 12 years ago

The fix for this issue is in the 1.0.0 release.