Archived community.zenoss.org | full text search
Skip navigation
1399 Views 1 Reply Latest reply: Feb 4, 2013 10:55 PM by Mark Rogers RSS
Michael Speth Rank: White Belt 8 posts since
Nov 6, 2012
Currently Being Moderated

Nov 6, 2012 10:58 PM

EC2Manager float division by zero

I just setup EC2 monitoring and am receiving the following error:

 

ERROR:ec2:float division by zero Traceback (most recent call last): File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenAWS-1.1.0-py2.7.egg/ZenPacks/zenoss/ZenAWS/libexec/zencw2.py", line 301, in main() File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenAWS-1.1.0-py2.7.egg/ZenPacks/zenoss/ZenAWS/libexec/zencw2.py", line 286, in main stats = buildCache(opts, stats) File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenAWS-1.1.0-py2.7.egg/ZenPacks/zenoss/ZenAWS/libexec/zencw2.py", line 246, in buildCache stats, mdict = buildData(opts, stats) File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenAWS-1.1.0-py2.7.egg/ZenPacks/zenoss/ZenAWS/libexec/zencw2.py", line 131, in buildData metricCountWaitTime = (opts.range * 0.6) / prevMetricCount ZeroDivisionError: float division by zero

 

This is a repeated error and occors on each poll to the EC2 service.

 

I am running the following:

  • Version: Zenoss 4.2.0
  • OS: Centos 6.3 (Final)
  • Zope: Zope 2.13.13
  • Python: Python 2.7.2
  • Database: MySQL 5.5.28

 

Any ideas of what might be causing these errors?

 

Thanks

  • Mark Rogers Newbie 2 posts since
    Feb 4, 2013
    Currently Being Moderated
    1. Feb 4, 2013 10:55 PM (in response to Michael Speth)
    Re: EC2Manager float division by zero

    I had the same problem and just initiated a really really dirty hack to see what would happen. I went to the offending line in "/opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenAWS-1.1.0-py2.7.egg/ZenPacks/zenoss/ZenAWS/libexec/zencw2.py" and just changed it from :

     

    metricCountWaitTime = (opts.range * 0.6) / prevMetricCount

     

    To:


    metricCountWaitTime = (opts.range * 0.6) / prevMetricCount+1

     

    Which nixed the div by zero problem and now I see my instances. However, this is clearly not a good fix.

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points