Grafana dashboard: OpenDCIM DataCenter Device Positions
Description: OpenDCIM DataCenter - MySQL Data source

Dashboard for OpenDCIM device positions in Grafana. All devices are displayed using cabinet x y coordinates and rack height positions.

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": "",
      "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": 9997,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1554497220634,
  "links": [
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "tags": [
        "OpenDCIM"
      ],
      "title": "OpenDCIM Dashboards",
      "type": "dashboards"
    }
  ],
  "panels": [
    {
      "datasource": "${DS_OPENDCIM}",
      "gridPos": {
        "h": 19,
        "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": "v"
          },
          "showlegend": true,
          "xaxis": {
            "rangemode": "normal",
            "showgrid": true,
            "title": "Zones",
            "type": "",
            "zeroline": false
          },
          "yaxis": {
            "rangemode": "normal",
            "showgrid": true,
            "title": "Rows",
            "type": "",
            "zeroline": false
          },
          "zaxis": {
            "range": [
              0,
              50
            ],
            "rangemode": "between",
            "showgrid": true,
            "title": "RackPosition",
            "type": "",
            "zeroline": false
          }
        },
        "loadFromCDN": false,
        "settings": {
          "displayModeBar": false,
          "type": "scatter3d"
        },
        "showAnnotations": true,
        "traces": [
          {
            "mapping": {
              "color": "DeviceType",
              "size": null,
              "text": "Label",
              "x": "ApplianceX",
              "y": "ApplianceY",
              "z": "ApplianceZ"
            },
            "name": "Appliance",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#1F60C4",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "DeviceType",
              "size": null,
              "text": "Label",
              "x": "CDUX",
              "y": "CDUY",
              "z": "CDUZ"
            },
            "name": "CDU",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#73BF69",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "DeviceType",
              "size": null,
              "text": "Label",
              "x": "ChassisX",
              "y": "ChassisY",
              "z": "ChassisZ"
            },
            "name": "Chassis",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#F2495C",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "color",
              "size": null,
              "text": "Label",
              "x": "PatchPanelX",
              "y": "PatchPanelY",
              "z": "PatchPanelZ"
            },
            "name": "Patch Panel",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#C4162A",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "color",
              "size": null,
              "text": "Label",
              "x": "PhysicalInfX",
              "y": "PhysicalInfY",
              "z": "PhysicalInfZ"
            },
            "name": "Physical Infrastructure",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#FF9830",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "color",
              "size": null,
              "text": "Label",
              "x": "SensorX",
              "y": "SensorY",
              "z": "SensorZ"
            },
            "name": "Sensor",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#8F3BB8",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "color",
              "size": null,
              "text": "Label",
              "x": "ServerX",
              "y": "ServerY",
              "z": "ServerZ"
            },
            "name": "Server",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "rgb(100, 200, 200)",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "color",
              "size": null,
              "text": "Label",
              "x": "StorageArrayX",
              "y": "StorageArrayY",
              "z": "StorageArrayZ"
            },
            "name": "Storage Array",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "rgb(200, 90, 120)",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          },
          {
            "mapping": {
              "color": "color",
              "size": null,
              "text": "Label",
              "x": "SwitchX",
              "y": "SwitchY",
              "z": "SwitchZ"
            },
            "name": "Switch",
            "settings": {
              "color_option": "solid",
              "line": {
                "color": "#005f81",
                "dash": "solid",
                "shape": "linear",
                "width": 6
              },
              "marker": {
                "color": "#FFB357",
                "colorscale": "YlOrRd",
                "line": {
                  "color": "#DDD",
                  "width": 0
                },
                "showscale": false,
                "size": 5,
                "sizemin": 3,
                "sizemode": "diameter",
                "sizeref": 0.2,
                "symbol": "circle"
              }
            },
            "show": {
              "line": true,
              "markers": true
            }
          }
        ]
      },
      "targets": [
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS ApplianceX,\nfac_Cabinet.MapY1 AS ApplianceY,\nfac_Device.Position AS ApplianceZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Appliance'",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS CDUX,\nfac_Cabinet.MapY1 AS CDUY,\nfac_Device.Position AS CDUZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='CDU'",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS ChassisX,\nfac_Cabinet.MapY1 AS ChassisY,\nfac_Device.Position AS ChassisZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Chassis'",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS PatchPanelX,\nfac_Cabinet.MapY1 AS PatchPanelY,\nfac_Device.Position AS PatchPanelZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Patch Panel'",
          "refId": "D",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS PhysicalInfX,\nfac_Cabinet.MapY1 AS PhysicalInfY,\nfac_Device.Position AS PhysicalInfZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Physical Infrastructure'",
          "refId": "E",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS SensorX,\nfac_Cabinet.MapY1 AS SensorY,\nfac_Device.Position AS SensorZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Sensor'",
          "refId": "F",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS ServerX,\nfac_Cabinet.MapY1 AS ServerY,\nfac_Device.Position AS ServerZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Server'",
          "refId": "G",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS StorageArrayX,\nfac_Cabinet.MapY1 AS StorageArrayY,\nfac_Device.Position AS StorageArrayZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Storage Array'",
          "refId": "H",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\nfac_Device.Label,\nfac_Device.DeviceType,\nfac_Cabinet.MapX1 * -1 AS SwitchX,\nfac_Cabinet.MapY1 AS SwitchY,\nfac_Device.Position AS SwitchZ\nFROM fac_Device\nLEFT JOIN fac_Cabinet ON fac_Device.Cabinet = fac_Cabinet.CabinetID\nWHERE fac_Cabinet.DatacenterID=$DataCenterID\nAND fac_Device.DeviceType ='Switch'",
          "refId": "I",
          "select": [
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_BinAudits",
          "timeColumn": "AuditStamp",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Devices",
      "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 DataCenter Device Positions",
  "uid": "ANutxHemk",
  "version": 59,
  "description": "OpenDCIM DataCenter - MySQL Data source"
}