Grafana dashboard: Mirasys VMS Audit Trail V1.2
Description: This dashboard shows interactive reports from Mirasys VMS audit trail database.

This dashboard show Audit Trail.

Version 1.0 2019/12/03

This Grafana dashboard is used as a user interface to creates interactive "Audit Trail" 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 reports from Mirasys VMS audit trail database.\n\nThis dashboard show Audit Trail.",
  "editable": true,
  "gnetId": 11346,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1630399094277,
  "links": [],
  "panels": [
    {
      "columns": [],
      "datasource": "${DS_DVMSDATA}",
      "fontSize": "100%",
      "gridPos": {
        "h": 6,
        "w": 20,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "interval": "",
      "links": [],
      "pageSize": null,
      "repeat": null,
      "repeatDirection": "v",
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 2,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "link": false,
          "pattern": "time",
          "type": "date"
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "rawSql": "SELECT\n  dbo.AuditTrail.UtcTime AS \"time\",\n  [UserName] AS \"User\",\n  [Application],\n  [EventDescription] AS \"Event\",\n  [EventStatus] AS \"Status\",\n  [Object] AS \"Device\",\n   [RecorderName] AS \"Server name\",\n   [RecorderAddress] AS \"Server IP\"\nFROM\n  dbo.AuditTrail\nWHERE\n  $__timeFilter(dbo.AuditTrail.UtcTime) AND dbo.AuditTrail.UserName in ($Users) AND dbo.AuditTrail.EventDescription in ($Events) AND dbo.AuditTrail.Application in ($Application) AND dbo.AuditTrail.RecorderName in ($Servers)",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "User actions",
      "transform": "table",
      "type": "table-old"
    },
    {
      "columns": [],
      "datasource": "${DS_DVMSDATA}",
      "description": "",
      "fontSize": "100%",
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 6,
      "interval": "",
      "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": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "decimals": 0,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "rawSql": "SELECT\n  [UserName] AS \"User\",\n  COUNT([AuditTrailId]) AS \"Number of actions\"\nFROM\n  dbo.AuditTrail\nWHERE\n  $__timeFilter(dbo.AuditTrail.UtcTime) AND dbo.AuditTrail.UserName in ($Users) AND dbo.AuditTrail.EventDescription in ($Events) AND dbo.AuditTrail.Application in ($Application)\nGROUP BY [UserName]",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "User 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": 6
      },
      "hiddenSeries": false,
      "id": 4,
      "interval": "",
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.1.2",
      "pointradius": 5,
      "points": true,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "rawSql": "SELECT\n  COUNT(dbo.AuditTrail.EventDescription) AS 'Value',\n  dbo.AuditTrail.EventDescription AS metric,\n  $__timeGroup(dbo.AuditTrail.UtcTime, '15m') AS time\nFROM\n  dbo.AuditTrail\nWHERE\n  $__timeFilter(dbo.AuditTrail.UtcTime) AND dbo.AuditTrail.UserName in ($Users) AND dbo.AuditTrail.EventDescription in ($Events) AND dbo.AuditTrail.Application in ($Application) AND dbo.AuditTrail.Recordername in ($Servers)\nGROUP BY $__timeGroup(dbo.AuditTrail.UtcTime, '15m'), dbo.AuditTrail.EventDescription\nORDER BY $__timeGroup(dbo.AuditTrail.UtcTime, '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": "#F2495C",
      "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": "#5794F2",
      "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": "#73BF69",
      "MaxLineValue": null,
      "MaxLineWidth": 1,
      "MinLineColor": "#ff0000",
      "MinLineValue": null,
      "MinLineWidth": 1,
      "MultiBarPadding": 10,
      "OddRowColor": "rgba(33, 33, 34, 0.92)",
      "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": false,
      "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": "#96D98D",
          "LowBarColor": "teal",
          "Name": "Value",
          "Selected": true
        }
      ],
      "datasource": "${DS_DVMSDATA}",
      "description": "",
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 8,
      "interval": "",
      "links": [],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "rawSql": "SELECT\n  COUNT(dbo.AuditTrail.EventDescription) AS 'Value',\n  dbo.AuditTrail.EventDescription AS metric\nFROM\n  dbo.AuditTrail\nWHERE\n  $__timeFilter(dbo.AuditTrail.UtcTime) AND dbo.AuditTrail.UserName in ($Users) AND dbo.AuditTrail.EventDescription in ($Events) AND dbo.AuditTrail.Application in ($Application)  AND dbo.AuditTrail.Recordername in ($Servers)\nGROUP BY dbo.AuditTrail.EventDescription",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "type": "michaeldmoore-multistat-panel"
    }
  ],
  "refresh": false,
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": "",
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "Select Distinct [DvmsData].dbo.AuditTrail.UserName From [DvmsData].dbo.AuditTrail",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Users",
        "multi": true,
        "name": "Users",
        "options": [],
        "query": "Select Distinct [DvmsData].dbo.AuditTrail.UserName From [DvmsData].dbo.AuditTrail",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "Select Distinct [DvmsData].dbo.AuditTrail.EventDescription From [DvmsData].dbo.AuditTrail",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Events",
        "multi": true,
        "name": "Events",
        "options": [],
        "query": "Select Distinct [DvmsData].dbo.AuditTrail.EventDescription From [DvmsData].dbo.AuditTrail",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "Select Distinct [DvmsData].dbo.AuditTrail.Application From [DvmsData].dbo.AuditTrail",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "",
        "multi": true,
        "name": "Application",
        "options": [],
        "query": "Select Distinct [DvmsData].dbo.AuditTrail.Application From [DvmsData].dbo.AuditTrail",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DVMSDATA}",
        "definition": "Select Distinct [DvmsData].dbo.AuditTrail.Recordername From [DvmsData].dbo.AuditTrail",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "",
        "multi": true,
        "name": "Servers",
        "options": [],
        "query": "Select Distinct [DvmsData].dbo.AuditTrail.Recordername From [DvmsData].dbo.AuditTrail",
        "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 Audit Trail V1.2",
  "uid": "bzWCt0Vnk",
  "version": 4
}