Grafana dashboard: Mirasys VMS Alarms V1.2
Description: This dashboard shows interactive alarm reports from Mirasys VMS alarm database.

Version 1.0 2019/12/03

This Grafana dashboard is used as a user interface to creates interactive "Alarms" reports from Mirasys VMS database. This report can be used standalone with web browser or inside Mirasys Spotter using Spotter Web browser plugin.

Version 1.2 2021/08/31
Fixed issue with latest Grafana 8

{
  "__inputs": [
    {
      "name": "DS_DVMSDATA",
      "label": "DvmsData",
      "description": "",
      "type": "datasource",
      "pluginId": "mssql",
      "pluginName": "Microsoft SQL Server"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.1.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "panel",
      "id": "michaeldmoore-multistat-panel",
      "name": "Multistat",
      "version": "1.7.2"
    },
    {
      "type": "datasource",
      "id": "mssql",
      "name": "Microsoft SQL Server",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table-old",
      "name": "Table (old)",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "This dashboard shows interactive alarm reports from Mirasys VMS alarm database.",
  "editable": true,
  "gnetId": 11347,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1630399139822,
  "links": [],
  "panels": [
    {
      "columns": [],
      "datasource": "${DS_DVMSDATA}",
      "description": "",
      "fontSize": "100%",
      "gridPos": {
        "h": 5,
        "w": 19,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": null,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "time",
          "type": "date"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD",
          "decimals": 2,
          "pattern": "StartDate",
          "thresholds": [],
          "type": "date",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "StartTime",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "StopTime",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Server name",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "StopDate",
          "thresholds": [],
          "type": "date",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "rawSql": "SELECT \n\tdbo.AlarmEvent.UtcStartTime as \"time\",\n\tdbo.AlarmConfig.AlarmName as \"Alarm\",\n\tdbo.AlarmConfig.TriggerInfo as \"Trigger\", \n\tdbo.AlarmConfig.TriggerChannelNumber as \"Channel\",\n    CONVERT(VARCHAR(8), dbo.AlarmEvent.LocalStartTime, 112) AS StartDate, \n\tCONVERT(VARCHAR(8), dbo.AlarmEvent.LocalStartTime, 114) AS StartTime, \n    CONVERT(VARCHAR(8), dbo.AlarmEvent.LocalStopTime, 112) AS StopDate, \n\tCONVERT(VARCHAR(8), dbo.AlarmEvent.LocalStopTime, 114) AS StopTime,\n\tdbo.AlarmConfig.RecorderName as \"Server name\",\n\tdbo.AlarmConfig.RecorderAddress as \"Server IP\"\nFROM  dbo.AlarmConfig    INNER JOIN\n                      dbo.AlarmEvent ON dbo.AlarmConfig.AlarmConfigId = dbo.AlarmEvent.AlarmConfigId\nWHERE\n$__timeFilter(dbo.AlarmEvent.UtcStartTime) AND \ndbo.AlarmConfig.AlarmName in ($Alarms) AND dbo.AlarmConfig.TriggerChannelNumber in ($Channels) AND\ndbo.AlarmConfig.RecorderName in ($Servers)",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Alarms",
      "transform": "table",
      "type": "table-old"
    },
    {
      "columns": [],
      "datasource": "${DS_DVMSDATA}",
      "description": "",
      "fontSize": "100%",
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 19,
        "y": 0
      },
      "id": 8,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 1,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 0,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "rawSql": "SELECT\n\tdbo.AlarmConfig.AlarmName AS \"Alarm\",\n  COUNT(dbo.AlarmEvent.AlarmConfigID) AS \"Number of alarms\"\nFROM\n  dbo.AlarmConfig\n    INNER JOIN\ndbo.AlarmEvent ON dvmsdata.dbo.AlarmConfig.AlarmConfigId = dbo.AlarmEvent.AlarmConfigId\nWHERE\n\t$__timeFilter(dvmsdata.dbo.AlarmEvent.UtcStartTime) AND \ndbo.AlarmConfig.AlarmName in ($Alarms) AND dbo.AlarmConfig.TriggerChannelNumber in ($Channels) AND\ndbo.AlarmConfig.RecorderName in ($Servers)\nGROUP BY dbo.AlarmConfig.AlarmName",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Alarm summary",
      "transform": "table",
      "type": "table-old"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DVMSDATA}",
      "decimals": 0,
      "description": "",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 5
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 2,
      "points": true,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "rawSql": "SELECT\n  \n\tCOUNT(dbo.AlarmConfig.AlarmName) AS 'Value',\n  \n\tdbo.AlarmConfig.AlarmName AS metric,\n  \n\t$__timeGroup(dbo.AlarmEvent.UtcStartTime, '15m') AS time\n\nFROM\n  \n\tdbo.AlarmConfig    INNER JOIN\n                      dbo.AlarmEvent ON dbo.AlarmConfig.AlarmConfigId = dbo.AlarmEvent.AlarmConfigId\nWHERE\n  \n\t$__timeFilter(dbo.AlarmEvent.UtcStartTime) AND \n\n\tdbo.AlarmConfig.AlarmName in ($Alarms) AND dbo.AlarmConfig.TriggerChannelNumber in ($Channels) AND\n \n\tdbo.AlarmConfig.RecorderName in ($Servers)\nGROUP BY $__timeGroup(dbo.AlarmEvent.UtcStartTime, '15m'), dbo.AlarmConfig.AlarmName\nORDER BY $__timeGroup(dbo.AlarmEvent.UtcStartTime, '15m')",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "Aggregate": "last",
      "BarPadding": 10,
      "BaseLineColor": "#ff0000",
      "BaseLineValue": null,
      "BaseLineWidth": 1,
      "CurveType": "Monotone",
      "DateFormat": "YYYY-MM-DD HH:mm:ss",
      "DateTimeColName": "date",
      "DotColor": "white",
      "DotSize": 10,
      "EvenRowColor": "rgba(33, 33, 34, 0.92)",
      "FlashHighLimitBar": false,
      "FlashLowLimitBar": false,
      "GroupColName": "",
      "GroupCols": 0,
      "GroupGap": 5,
      "GroupLabelColor": "#ffffff",
      "GroupLabelFontSize": "200%",
      "GroupNameFilter": "",
      "GroupRenamingRules": [],
      "GroupSortString": "",
      "HighAxisColor": "#ffffff",
      "HighAxisWidth": 1,
      "HighBarColor": "rgb(120, 128, 0)",
      "HighLimitBarColor": "#ff0000",
      "HighLimitBarFlashColor": "#ffa500",
      "HighLimitBarFlashTimeout": 1000,
      "HighLimitLineColor": "#ff0000",
      "HighLimitValue": 0.33,
      "HighLmitLineWidth": 1,
      "HighSideMargin": 0,
      "Horizontal": true,
      "LabelColName": "metric",
      "LabelColor": "#ffffff",
      "LabelFontSize": "70%",
      "LabelMargin": null,
      "LabelNameFilter": "",
      "LabelRenamingRules": [],
      "LableAngle": 0,
      "Legend": false,
      "LineColor": "blue",
      "LineWidth": 5,
      "Links": [],
      "LowAxisColor": "#ffffff",
      "LowAxisWidth": 1,
      "LowBarColor": "teal",
      "LowLimitBarColor": "#ff0000",
      "LowLimitBarFlashColor": "#ffa500",
      "LowLimitBarFlashTimeout": 200,
      "LowLimitLineColor": "#ff0000",
      "LowLimitValue": null,
      "LowLmitLineWidth": 1,
      "LowSideMargin": 0,
      "MaxLineColor": "rgb(74, 232, 12)",
      "MaxLineValue": null,
      "MaxLineWidth": 1,
      "MinLineColor": "#ff0000",
      "MinLineValue": null,
      "MinLineWidth": 1,
      "MultiBarPadding": 10,
      "OddRowColor": "#000000",
      "OutOfRangeLabelColor": "#ffffff",
      "OutlineColor": "rgba(245, 255, 0, 0.1)",
      "RecolorColName": null,
      "RecolorHighLimitBar": false,
      "RecolorLowLimitBar": false,
      "RecolorRules": [],
      "ScaleFactor": 1,
      "ShowBars": true,
      "ShowBaseLine": false,
      "ShowDate": false,
      "ShowGroupLabels": true,
      "ShowHighLimitLine": false,
      "ShowLabels": true,
      "ShowLeftAxis": true,
      "ShowLines": false,
      "ShowLowLimitLine": false,
      "ShowMaxLine": false,
      "ShowMinLine": false,
      "ShowRightAxis": true,
      "ShowTooltips": true,
      "ShowValues": true,
      "SortColName": "Value",
      "SortDirection": "descending",
      "TZOffsetHours": 0,
      "ToolTipFontSize": "100%",
      "ToolTipType": "",
      "TooltipDateFormat": "YYYY-MM-DD HH:mm:ss",
      "VGroupGap": 5,
      "ValueColName": "",
      "ValueColor": "#ffffff",
      "ValueDecimals": 0,
      "ValueFontSize": "70%",
      "ValuePosition": "top",
      "Values": [
        {
          "Col": 0,
          "HighBarColor": "#B877D9",
          "LowBarColor": "teal",
          "Name": "Value",
          "Selected": true
        }
      ],
      "datasource": "${DS_DVMSDATA}",
      "description": "",
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 6,
      "interval": "",
      "links": [],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "rawSql": "SELECT\n  \n\tCOUNT(dbo.AlarmConfig.AlarmName) AS 'Value',\n\tdbo.AlarmConfig.AlarmName AS metric\n\t\t\nFROM\n\tdbo.AlarmConfig\n    INNER JOIN\ndbo.AlarmEvent ON dbo.AlarmConfig.AlarmConfigId = dbo.AlarmEvent.AlarmConfigId\nWHERE\n\t$__timeFilter(dbo.AlarmEvent.UtcStartTime) AND \ndbo.AlarmConfig.AlarmName in ($Alarms) AND dbo.AlarmConfig.TriggerChannelNumber in ($Channels) AND\ndbo.AlarmConfig.RecorderName in ($Servers)\nGROUP BY dbo.AlarmConfig.AlarmName\n",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "type": "michaeldmoore-multistat-panel"
    }
  ],
  "refresh": false,
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "SELECT          distinct dvmsdata.dbo.AlarmConfig.AlarmName FROM \tdvmsdata.dbo.AlarmConfig",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Alarms",
        "multi": true,
        "name": "Alarms",
        "options": [],
        "query": "SELECT          distinct dvmsdata.dbo.AlarmConfig.AlarmName FROM \tdvmsdata.dbo.AlarmConfig",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "SELECT          distinct dvmsdata.dbo.AlarmConfig.TriggerChannelNumber  FROM \tdvmsdata.dbo.AlarmConfig",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Channels",
        "multi": true,
        "name": "Channels",
        "options": [],
        "query": "SELECT          distinct dvmsdata.dbo.AlarmConfig.TriggerChannelNumber  FROM \tdvmsdata.dbo.AlarmConfig",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "SELECT          distinct dvmsdata.dbo.AlarmConfig.RecorderName  FROM \tdvmsdata.dbo.AlarmConfig",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Servers",
        "multi": true,
        "name": "Servers",
        "options": [],
        "query": "SELECT          distinct dvmsdata.dbo.AlarmConfig.RecorderName  FROM \tdvmsdata.dbo.AlarmConfig",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1y",
    "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": "Mirasys VMS Alarms V1.2",
  "uid": "QUURhA4nz",
  "version": 3
}