Commits

Peter Ward committed 3d99fba Merge

merged

  • Participants
  • Parent commits db1d504, 8ac403e

Comments (0)

Files changed (2)

File definitions.json

 {
     "types": {
+        "apcups-frequency": [
+            "DEF:<var>=<file>:frequency:AVERAGE",
+            "XPORT:<var>:<var>"
+        ],
+
+        "apcups-timeleft": [
+            "DEF:timeleft=<file>:timeleft:AVERAGE",
+            "XPORT:timeleft:time"
+        ],
+
+        "apcups-voltage": [
+            "DEF:input=<input>:value:AVERAGE",
+            "DEF:output=<output>:value:AVERAGE",
+            "XPORT:input:input",
+            "XPORT:output:output"
+        ],
+
         "cpu-summary": [
             "DEF:idle-<num>=<idle>:value:AVERAGE",
             "DEF:nice-<num>=<nice>:value:AVERAGE",
             "DEF:midterm=<file>:midterm:AVERAGE",
             "DEF:longterm=<file>:longterm:AVERAGE",
             "XPORT:shortterm:shortterm (1m)",
-            "XPORT:midterm:midterm (3m)",
-            "XPORT:longterm:longterm (5m)"
+            "XPORT:midterm:midterm (5m)",
+            "XPORT:longterm:longterm (15m)"
         ],
 
         "memory": [
                 "type": "areaspline",
                 "stacking": "normal"
             },
-            "type": "disk",
+            "type": "df",
             "files": {"file": "df/df-<var>.rrd"}
         }],
 
             }
         ],
 
+        "ups": [
+            {
+                "graph": {
+                    "min": 110,
+                    "title": "Voltage"
+                },
+                "type": "apcups-voltage",
+                "files": {
+                    "input": "apcups/voltage-input.rrd",
+                    "output": "apcups/voltage-output.rrd"
+                }
+            },
+            {
+                "graph": {
+                    "title": "Time left",
+                    "y-label": "minutes"
+                },
+                "type": "apcups-timeleft",
+                "files": {"file": "apcups/timeleft.rrd"}
+            },
+            {
+                "graph": {"title": "Battery Voltage"},
+                "type": "value",
+                "files": {"file": "apcups/voltage-battery.rrd"},
+                "variables": {"var": "battery"}
+            },
+            {
+                "graph": {"title": "Input Frequency"},
+                "type": "apcups-frequency",
+                "files": {"file": "apcups/frequency-input.rrd"},
+                "variables": {"var": "frequency"}
+            }
+        ],
+
         "vmem": [
             {
                 "graph": {"title": "faults"},

File static/js/charts.js

                         chart.addSeries({
                             name: name,
                             data: series_data
-                        });
+                        }, false);
                     } else if (series.data.length == 0) {
                         series.setData(series_data, false);
                     } else {