Hi All,
I'm working with Cascadeo ZenPack for AWS RDS. It works great, nice ZenPack. It works for a 50G dB but we have a 250G instance large enough to return a long float and an exponent. The graphs were not drawing. Zencommand debug didn't show errors but was not showing a write to the RRD.
[zenoss@sandbox100 libexec]$ !./check
./check_rds.py -N <name> -I <ID> -S <secret> -R <region>
STATUS OK| ReadLatency=0.0 ReadIOPS=0.0 PercentDiskUsage=2.4069152832 FreeableMemory=282480640.0 WriteLatency=0.0 SwapUsage=112013312.0 WriteThroughput=9629.93347006 DatabaseConnections=18.0 ReadThroughput=682.974004969 AllocatedStorage=268435456000 DiskUsage=6461014016.0 CPUUtilization=2.13 FreeStorageSpace=2.61974441984e+11 WriteIOPS=0.216645002166
The Nagios parser wasn't handling the exp. Looking at the Nagios plugin dev guidelines, I couldn't find where it was supposed to accept an exp, but the floats were long so I took at look at the Nagios parser. I made a couple of mods that seem to allow the floats. The nagios perfParser wasn't handling the eE. Given it's in the regex, it looks like exp's are kind of expected. Then RRDUtil.py was killing chars and needed some long float.
This seems to work but hasn't been well tested.
###########
--- /opt/zenoss/Products/ZenRRD/parsers/Nagios.py 2013-04-04 16:43:45.037171595 -0700
+++ Nagios.py 2013-04-04 15:54:07.288036303 -0700
@@ -31,7 +31,7 @@
# [('rta=0.337000ms;180.000000;300.000000;0.000000', 'rta', '', '0.337000'),
# ('pl=0%;100;100;0', 'pl', '', '0')]
#
-perfParser = re.compile(r"""(([^ =']+|'([^']+)')=([-0-9.eE+]+)\S*)""")
+perfParser = re.compile(r"""(([^ =']+|'([^']+)')=([-0-9.eE]+)\S*)""")
class _BadData(Exception):
###########
--- /opt/zenoss/Products/ZenRRD/RRDUtil.py | 2013-04-04 21:46:51.644185606 -0700 |
+++ RRDUtil.py | 2013-04-04 21:55:50.183035990 -0700 |
@@ -248,7 +248,7 @@
daemon_args = rrd_daemon_args() if useRRDDaemon else tuple()
# remove unwanted chars (this is actually pretty quick)
- #value = str(value).translate(None, _UNWANTED_CHARS)
+ value = str(value).translate(None, _UNWANTED_CHARS)
if rrdType in ('COUNTER', 'DERIVE'):
try:
@@ -259,8 +259,7 @@
return None
else:
try:
- #value = float(value)
- value = long(float(value))
+ value = float(value)
except (TypeError, ValueError):
return None
try:
Cheers,
Harper