Grafana dashboard: OpenDCIM SupplyBins
Description: OpenDCIM Supply Bins from OpenDCIM MySQL

Dashboard for OpenDCIM supply bins in Grafana. All supplies are displayed and alerts can be configured for specific supplies.

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": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "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": 9995,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1554479694839,
  "links": [
    {
      "icon": "external link",
      "includeVars": false,
      "tags": [
        "OpenDCIM"
      ],
      "type": "dashboards"
    }
  ],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 139,
      "panels": [],
      "title": "Supply Alerts",
      "type": "row"
    },
    {
      "alert": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                10
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "C",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "0m",
        "frequency": "1m",
        "handler": 1,
        "name": "Cable Levels alert",
        "noDataState": "no_data",
        "notifications": []
      },
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENDCIM}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 1
      },
      "id": 65,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 0,
      "links": [],
      "maxPerRow": 4,
      "nullPointMode": "null",
      "paceLength": 10,
      "percentage": false,
      "pointradius": 10,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [
        {
          "alias": "/.*CAT.*/",
          "color": "#5794F2"
        },
        {
          "alias": "/.*Fiber.*/",
          "color": "#FF9830"
        }
      ],
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "Select now() as 'time', sum(fac_BinContents.Count), fac_Supplies.PartName as 'PartName'\nFrom fac_BinContents\nleft Join fac_Supplies on fac_BinContents.SupplyID = fac_Supplies.SupplyID Where fac_Supplies.SupplyID=1",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "Count"
                ],
                "type": "column"
              }
            ],
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_bincontents",
          "timeColumn": "now()",
          "timeColumnType": "int",
          "where": [
            {
              "datatype": "int",
              "name": "",
              "params": [
                "SupplyID",
                "=",
                "$supID"
              ],
              "type": "expression"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 10,
          "yaxis": "left"
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Cable Levels",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": "Count",
          "logBase": 1,
          "max": "50",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                10
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "C",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "0m",
        "frequency": "1m",
        "handler": 1,
        "name": "Cable Levels alert",
        "noDataState": "no_data",
        "notifications": []
      },
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENDCIM}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 6,
        "y": 1
      },
      "id": 90,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 0,
      "links": [],
      "maxPerRow": 4,
      "nullPointMode": "null",
      "paceLength": 10,
      "percentage": false,
      "pointradius": 10,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [
        {
          "alias": "/.*CAT.*/",
          "color": "#5794F2"
        },
        {
          "alias": "/.*Fiber.*/",
          "color": "#FF9830"
        }
      ],
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "Select now() as 'time', sum(fac_BinContents.Count), fac_Supplies.PartName as 'PartName'\nFrom fac_BinContents\nleft Join fac_Supplies on fac_BinContents.SupplyID = fac_Supplies.SupplyID Where fac_Supplies.SupplyID=4",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "Count"
                ],
                "type": "column"
              }
            ],
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_bincontents",
          "timeColumn": "now()",
          "timeColumnType": "int",
          "where": [
            {
              "datatype": "int",
              "name": "",
              "params": [
                "SupplyID",
                "=",
                "$supID"
              ],
              "type": "expression"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 10
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Cable Levels",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": "Count",
          "logBase": 1,
          "max": "50",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                30
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "C",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "0m",
        "frequency": "1m",
        "handler": 1,
        "name": "Cable Levels alert",
        "noDataState": "no_data",
        "notifications": []
      },
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENDCIM}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 12,
        "y": 1
      },
      "id": 137,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 0,
      "links": [],
      "maxPerRow": 4,
      "nullPointMode": "null",
      "paceLength": 10,
      "percentage": false,
      "pointradius": 10,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [
        {
          "alias": "/.*CAT.*/",
          "color": "#5794F2"
        },
        {
          "alias": "/.*Fiber.*/",
          "color": "#FF9830"
        }
      ],
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "Select now() as 'time', sum(fac_BinContents.Count), fac_Supplies.PartName as 'PartName'\nFrom fac_BinContents\nleft Join fac_Supplies on fac_BinContents.SupplyID = fac_Supplies.SupplyID Where fac_Supplies.SupplyID=5",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "Count"
                ],
                "type": "column"
              }
            ],
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_bincontents",
          "timeColumn": "now()",
          "timeColumnType": "int",
          "where": [
            {
              "datatype": "int",
              "name": "",
              "params": [
                "SupplyID",
                "=",
                "$supID"
              ],
              "type": "expression"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 30
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Cable Levels",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": "Count",
          "logBase": 1,
          "max": "50",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                10
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "C",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "0m",
        "frequency": "1m",
        "handler": 1,
        "name": "Cable Levels alert",
        "noDataState": "no_data",
        "notifications": []
      },
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENDCIM}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 18,
        "y": 1
      },
      "id": 136,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 0,
      "links": [],
      "maxPerRow": 4,
      "nullPointMode": "null",
      "paceLength": 10,
      "percentage": false,
      "pointradius": 10,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [
        {
          "alias": "/.*CAT.*/",
          "color": "#5794F2"
        },
        {
          "alias": "/.*Fiber.*/",
          "color": "#FF9830"
        }
      ],
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "Select now() as 'time', sum(fac_BinContents.Count), fac_Supplies.PartName as 'PartName'\nFrom fac_BinContents\nleft Join fac_Supplies on fac_BinContents.SupplyID = fac_Supplies.SupplyID Where fac_Supplies.SupplyID=6",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "Count"
                ],
                "type": "column"
              }
            ],
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_bincontents",
          "timeColumn": "now()",
          "timeColumnType": "int",
          "where": [
            {
              "datatype": "int",
              "name": "",
              "params": [
                "SupplyID",
                "=",
                "$supID"
              ],
              "type": "expression"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 10
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Cable Levels",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": "Count",
          "logBase": 1,
          "max": "50",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 99,
      "panels": [],
      "title": "Supply Levels",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENDCIM}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 9
      },
      "id": 40,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 0,
      "links": [],
      "maxPerRow": 4,
      "nullPointMode": "null",
      "paceLength": 10,
      "percentage": false,
      "pointradius": 10,
      "points": false,
      "renderer": "flot",
      "repeat": "SupplyID",
      "repeatDirection": "h",
      "seriesOverrides": [
        {
          "alias": "/.*CAT.*/",
          "color": "#5794F2"
        },
        {
          "alias": "/.*Fiber.*/",
          "color": "#FF9830"
        }
      ],
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "Select \nnow() as 'time',\nsum(fac_BinContents.Count),\nfac_Supplies.PartName as 'PartName'\nFrom fac_BinContents\nleft Join fac_Supplies on fac_BinContents.SupplyID = fac_Supplies.SupplyID Where fac_Supplies.SupplyID=$SupplyID",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "Count"
                ],
                "type": "column"
              }
            ],
            [
              {
                "params": [
                  "BinID"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "fac_bincontents",
          "timeColumn": "now()",
          "timeColumnType": "int",
          "where": [
            {
              "datatype": "int",
              "name": "",
              "params": [
                "SupplyID",
                "=",
                "$supID"
              ],
              "type": "expression"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 10,
          "yaxis": "left"
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Supply Levels - $SupplyID",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": "Count",
          "logBase": 1,
          "max": "50",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": false,
  "schemaVersion": 18,
  "style": "dark",
  "tags": [
    "OpenDCIM"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPENDCIM}",
        "definition": "SELECT PartName FROM fac_Supplies",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "PartName",
        "options": [],
        "query": "SELECT PartName FROM fac_Supplies",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPENDCIM}",
        "definition": "SELECT SupplyID FROM fac_Supplies WHERE PartName in ($PartName)",
        "hide": 2,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "SupplyID",
        "options": [],
        "query": "SELECT SupplyID FROM fac_Supplies WHERE PartName in ($PartName)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "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 SupplyBins",
  "uid": "-19-6cjmkaasd",
  "version": 15,
  "description": "OpenDCIM Supply Bins from OpenDCIM MySQL"
}