Grafana dashboard: DC Rack Power Dashboard
Description: This script speaks to the PowerIQ API and transfers the pdu information
The information provided gives us the currently power reading, unutilized capacity, along with the watt hour & delta.

Power IQ® DCIM Monitoring Software enables data center and facility managers to closely monitor and efficiently utilize their existing data center power infrastructure. This script extract this data from an API and places it into an influxDB.


----------

### Getting started
* Obtain the API URL in which your PowerIQ PDU use
* You will also need to obtain the API Authentication token. Typically, this should be Basic Authentication
* Download the python script which you require, either single or dual pdu's.
The scripts are based on being placed in a rack, so typically it will be the dual pdu script you will need. This script also provides the kilowatt total in the rack, in case you are charged by this from your DC operator. 
* Download and Import the JSON dashboard, this is for Grafana v5. 
* Import the script into your server
* You will require the following modules install for python to run successfully;
          * getopt
          * sys
          * requests
          * urllib3
          * json
          * time
          * InfluxDBClient

* Edit the script with the appropriate information for you influxdb 
If you are running Linux this script will need to be added to the crontab, Ensure that you set the scheduling appropriately. 

```
* * * * * root /usr/bin/python /root/poweriq-script/current/poweriq-dual.py <api-token> <pdu-a> <pdu-b>
```
* Enjoy!

### Additional Information
If there is something which this script is missing, please feel free to let me know and I'll attempt to add it, or if you would like to contribute to this script. I am happy for you to do that too! 
I hope you find this script of some use.

More information regarding the dashboard and scripts can be found on my github;
https://github.com/r4yfx/poweriq-grafana

{
  "__inputs": [
    {
      "name": "DS_POWERIQ",
      "label": "PowerIQ",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 5897,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "#f2c96d",
        "#d44a3a"
      ],
      "datasource": "${DS_POWERIQ}",
      "decimals": 2,
      "format": "kwatt",
      "gauge": {
        "maxValue": 4,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 0,
        "y": 0
      },
      "id": 27,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "total-kilowatt"
                ],
                "type": "field"
              },
              {
                "params": [
                  " / 1000"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": "2.8,3.6",
      "title": "Rack-1",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "#f2c96d",
        "#d44a3a"
      ],
      "datasource": "${DS_POWERIQ}",
      "decimals": 2,
      "format": "kwatt",
      "gauge": {
        "maxValue": 2,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 4,
        "y": 0
      },
      "id": 9,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "Rack-2",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "total-kilowatt"
                ],
                "type": "field"
              },
              {
                "params": [
                  " / 1000"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": "1.4,1.8",
      "title": "Rack-3",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "#f2c96d",
        "#d44a3a"
      ],
      "datasource": "${DS_POWERIQ}",
      "decimals": 2,
      "format": "kwatt",
      "gauge": {
        "maxValue": 6,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 8,
        "y": 0
      },
      "id": 10,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "total-kilowatt"
                ],
                "type": "field"
              },
              {
                "params": [
                  " / 1000"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": "4.2,5.4",
      "title": "Rack-4",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "#f2c96d",
        "#d44a3a"
      ],
      "datasource": "${DS_POWERIQ}",
      "decimals": 2,
      "format": "kwatt",
      "gauge": {
        "maxValue": 4,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 12,
        "y": 0
      },
      "id": 11,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "total-kilowatt"
                ],
                "type": "field"
              },
              {
                "params": [
                  " / 1000"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": "2.8,3.6",
      "title": "Rack-5",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "#f2c96d",
        "#d44a3a"
      ],
      "datasource": "${DS_POWERIQ}",
      "decimals": 2,
      "format": "kwatt",
      "gauge": {
        "maxValue": 1,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 16,
        "y": 0
      },
      "id": 12,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "total-kilowatt"
                ],
                "type": "field"
              },
              {
                "params": [
                  " / 1000"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": "0.7,0.9",
      "title": "Rack-6",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "#f2c96d",
        "#d44a3a"
      ],
      "datasource": "${DS_POWERIQ}",
      "format": "kwatt",
      "gauge": {
        "maxValue": 4,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 13,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "total-kilowatt"
                ],
                "type": "field"
              },
              {
                "params": [
                  " / 1000"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": "2.8,3.6",
      "title": "Rack-6",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "content": "<center>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n</center>",
      "gridPos": {
        "h": 16,
        "w": 4,
        "x": 0,
        "y": 5
      },
      "id": 4,
      "links": [],
      "mode": "html",
      "title": "",
      "type": "text"
    },
    {
      "content": "<center>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n</center>",
      "gridPos": {
        "h": 16,
        "w": 4,
        "x": 4,
        "y": 5
      },
      "id": 14,
      "links": [],
      "mode": "html",
      "title": "",
      "type": "text"
    },
    {
      "content": "<center>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n</center>",
      "gridPos": {
        "h": 16,
        "w": 4,
        "x": 8,
        "y": 5
      },
      "id": 15,
      "links": [],
      "mode": "html",
      "title": "",
      "type": "text"
    },
    {
      "content": "<center>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n</center>",
      "gridPos": {
        "h": 16,
        "w": 4,
        "x": 12,
        "y": 5
      },
      "id": 16,
      "links": [],
      "mode": "html",
      "title": "",
      "type": "text"
    },
    {
      "content": "<center>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n</center>",
      "gridPos": {
        "h": 16,
        "w": 4,
        "x": 16,
        "y": 5
      },
      "id": 17,
      "links": [],
      "mode": "html",
      "title": "",
      "type": "text"
    },
    {
      "content": "<center>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n<img src=\"images/rack-icon.png\" height=\"200\" width=\"200\" style=\"float:middle\">\n<br>\n</center>",
      "gridPos": {
        "h": 16,
        "w": 4,
        "x": 20,
        "y": 5
      },
      "id": 18,
      "links": [],
      "mode": "html",
      "title": "",
      "type": "text"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POWERIQ}",
      "decimals": 1,
      "fill": 10,
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 0,
        "y": 21
      },
      "id": 29,
      "legend": {
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 10,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "PDU-A",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-a"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        },
        {
          "alias": "PDU-B",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-b"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 28
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 24
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average Current Amp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "amp",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": null,
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POWERIQ}",
      "decimals": 1,
      "fill": 1,
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 4,
        "y": 21
      },
      "id": 30,
      "legend": {
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "PDU-A",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-a"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        },
        {
          "alias": "PDU-B",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-b"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 28
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 24
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average Current Amp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POWERIQ}",
      "decimals": 1,
      "fill": 1,
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 8,
        "y": 21
      },
      "id": 31,
      "legend": {
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "PDU-A",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-a"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        },
        {
          "alias": "PDU-B",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-b"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 28
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 24
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average Current Amp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POWERIQ}",
      "decimals": 1,
      "fill": 1,
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 12,
        "y": 21
      },
      "id": 32,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "PDU-A",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-a"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        },
        {
          "alias": "PDU-B",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-b"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 28
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 24
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average Current Amp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POWERIQ}",
      "decimals": 1,
      "fill": 1,
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 16,
        "y": 21
      },
      "id": 33,
      "legend": {
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "PDU-A",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-a"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        },
        {
          "alias": "PDU-B",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-b"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 14
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 10
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average Current Amp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POWERIQ}",
      "decimals": 1,
      "fill": 1,
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 20,
        "y": 21
      },
      "id": 34,
      "legend": {
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "PDU-A",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-a"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        },
        {
          "alias": "PDU-B",
          "groupBy": [],
          "measurement": "pdus",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "current-pdu-b"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=",
              "value": "test-pdu"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 28
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 24
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average Current Amp",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "amp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    }
  ],
  "refresh": "5m",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "poweriq",
    "Raritan",
    "DC",
    "power",
    "pdu"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "DC Rack Power Dashboard",
  "uid": "Ma05G0Miz",
  "version": 20,
  "description": "This script speaks to the PowerIQ API and transfers the pdu information\r\nThe information provided gives us the currently power reading, unutilized capacity, along with the watt hour & delta."
}