Grafana dashboard: OpenDCIM Sensor Positions
Description: OpenDCIM sensor positions and temperature data - MySQL Data source

Dashboard for OpenDCIM sensors in Grafana. All sensors are displayed using cabinet x y coordinates and rack height positions. Temperature data is pulled from sensor table and highlighted. Must have working temperature sensor data in OpenDCIM Database.

The x-axis converted to a negative number in query to align with OpenDCIM data center layout.

OpenDCIM is a free web based Data Center Infrastructure Management application. https://opendcim.org/

Simply configure the MySQL data source per Grafana's documentation against a OpenDCIM Database. It's important to set new database user with read only permissions on OpenDCIM Database.

Details on MySQL data source can be found in Grafana documentation here: http://docs.grafana.org/features/datasources/mysql/


{
  "__inputs": [
    {
      "name": "DS_OPENDCIM",
      "label": "OpenDCIM",
      "description": "Standard MySQL Database for OpenDCIM",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.0.2"
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "natel-plotly-panel",
      "name": "Plotly",
      "version": "0.0.6"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 9996,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1554154442574,
  "links": [
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "tags": [
        "OpenDCIM"
      ],
      "title": "OpenDCIM Dashboards",
      "type": "dashboards"
    }
  ],
  "panels": [
    {
      "datasource": "${DS_OPENDCIM}",
      "gridPos": {
        "h": 22,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "links": [],
      "pconfig": {
        "fixScale": "",
        "layout": {
          "dragmode": "lasso",
          "font": {
            "family": "\"Open Sans\", Helvetica, Arial, sans-serif"
          },
          "hovermode": "closest",
          "legend": {
            "orientation": "h"
          },
          "showlegend": false,
          "xaxis": {
            "rangemode": "normal",
            "showgrid": true,
            "title": "Zones",
            "type": "auto",
            "zeroline": true
          },
          "yaxis": {
            "rangemode": "normal",
            "showgrid": true,
            "title": "Rows",
            "type": "linear",
            "zeroline": true
          },
          "zaxis": {
            "rangemode": "normal",
            "showgrid": true,
            "title": "Rack Position",
            "type": "linear",
            "zeroline": true
          }
        },
        "loadFromCDN": false,
        "settings": {
          "displayModeBar": false,
          "type": "scatter3d"
        },
        "showAnnotations": false,
        "traces": [
          {
            "mapping": {
              "color": "Temperature",
              "size": null,
              "text": "Label",
              "x": "MapX1",
              "y": "MapY1",
              "z": "Position"
            },
            "name": "Label",
            "settings": {
              "color_option": "ramp",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#33B5E5",
                "colorscale": "",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 10,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              },
              "textposition": "top"
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "Temperature",
              "size": null,
              "text": "Temperature",
              "x": "MapX1",
              "y": "MapY1",
              "z": "Position"
            },
            "name": "TempF",
            "settings": {
              "color_option": "ramp",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#33B5E5",
                "colorscale": "Portland",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              },
              "textposition": "bottom"
            },
            "show": {
              "line": true,
              "markers": true
            }
          }
        ]
      },
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "Select fac_Device.Label, fac_SensorReadings.Temperature,  fac_Cabinet.MapX1 * -1 as MapX1, fac_Cabinet.MapY1, fac_Device.Position\nFROM fac_Device\nLeft Join fac_Cabinet on fac_Device.Cabinet = fac_Cabinet.CabinetID\nLeft Join fac_SensorReadings  on fac_SensorReadings.DeviceID = fac_Device.DeviceID\nWhere fac_SensorReadings.DeviceID != 893 AND fac_Cabinet.DatacenterID=$DataCenterID",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Temperature",
      "transparent": true,
      "type": "natel-plotly-panel",
      "version": 1
    }
  ],
  "refresh": false,
  "schemaVersion": 18,
  "style": "dark",
  "tags": [
    "OpenDCIM"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPENDCIM}",
        "definition": "Select Name from fac_DataCenter",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "DataCenterName",
        "options": [],
        "query": "Select Name from fac_DataCenter",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPENDCIM}",
        "definition": "SELECT DataCenterID FROM fac_DataCenter WHERE Name= \"$DataCenterName\"",
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "DataCenterID",
        "options": [],
        "query": "SELECT DataCenterID FROM fac_DataCenter WHERE Name= \"$DataCenterName\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "hidden": false,
    "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": "OpenDCIM Sensor Positions",
  "uid": "AyrkbH6iz",
  "version": 31,
  "description": "OpenDCIM sensor positions and temperature data - MySQL Data source"
}