NaN safe addition so that unknown values are treated as 0 debug
Sapan Bhatia [Fri, 25 Oct 2013 19:09:21 +0000 (15:09 -0400)]
aggmgr.py
input.yaml

index 9d82543..d556be7 100644 (file)
--- a/aggmgr.py
+++ b/aggmgr.py
@@ -46,7 +46,7 @@ class AggManager:
                                        svar='s%d'%i0
                                        self.defs.append('DEF:%s=%s:value:AVERAGE'%(svar,v))
                                        if (psexp):
-                                               psexp.extend([svar,'+'])
+                                               psexp.extend([svar,'ADDNAN'])
                                        else:
                                                psexp=[svar]
                                        i0+=1
index 831ae1e..ae1ad88 100644 (file)
@@ -3,7 +3,7 @@ output: json
 
 entries:
 - name: princeton_per_node_cpu
-  regex: (node28\.princeton\.vicci\.org)/cpu-\d+/cpu-idle.rrd
+  regex: (node\d+\.princeton\.vicci\.org)/cpu-\d+/cpu-idle.rrd
   ds: value
   fn: sum