Grafana dashboard: Bacula
Description: Template dashboard for Bacula Backup System with mysql as backend


{
  "__inputs": [
    {
      "name": "DS_MYSQL_BACULA",
      "label": "MySQL Bacula",
      "description": "",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.0"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.5.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "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",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 12772,
  "graphTooltip": 1,
  "id": null,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_MYSQL_BACULA}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 32,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sideWidth": 250,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 4,
      "points": true,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "Name",
          "rawQuery": false,
          "rawSql": "SELECT\n  EndTime AS \"time\",\n  Name AS metric,\n  JobBytes\nFROM Job\nWHERE\n  $__timeFilter(EndTime)\nORDER BY EndTime",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "JobBytes"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "Job",
          "timeColumn": "EndTime",
          "timeColumnType": "datetime",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Backup Jobs Bytes Stored",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:7960",
          "format": "bytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:7961",
          "format": "bytes",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                0.9
              ],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "1h",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "sum"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "24h",
        "frequency": "1h",
        "handler": 1,
        "name": "Backup Jobs not OK alert",
        "noDataState": "ok",
        "notifications": []
      },
      "aliasColors": {
        "A": "yellow",
        "Canceled by user": "yellow",
        "E": "orange",
        "Fatal Error": "red",
        "Terminated in error": "orange",
        "f": "red"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_MYSQL_BACULA}",
      "decimals": 0,
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "hiddenSeries": false,
      "id": 33,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sideWidth": 250,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null as zero",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 4,
      "points": true,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "format": "time_series",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "jobstatus",
          "rawQuery": true,
          "rawSql": "SELECT\n  $__timeGroupAlias(EndTime,$__interval),\n  case jobstatus when 'f' then \"Fatal Error\" when 'E' then \"Terminated in error\" when 'A' then \"Canceled by user\" end AS metric,\n  count(JobId) AS \"count\"\nFROM Job\nWHERE\n  $__timeFilter(EndTime) AND\n  JobStatus != 'T'\nGROUP BY 1,2\nORDER BY $__timeGroup(EndTime,$__interval)",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "JobId"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "count"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "Job",
          "timeColumn": "EndTime",
          "timeColumnType": "datetime",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            },
            {
              "datatype": "binary",
              "name": "",
              "params": [
                "JobStatus",
                "!=",
                "'T'"
              ],
              "type": "expression"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 0.9
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Backup Jobs not OK",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:7960",
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:7961",
          "format": "bytes",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [
            {
              "id": 0,
              "op": "=",
              "text": "N/A",
              "type": 1,
              "value": "null"
            }
          ],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 5
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 12
      },
      "id": 27,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "mean"
          ]
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select count(JobID) FROM Job WHERE JobStatus='R';",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "# Running Jobs",
      "type": "stat"
    },
    {
      "columns": [],
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "JobStatus | Description  \n\nA\tJob canceled by user   \nB\tJob blocked   \nC\tJob created but not yet running  \nD\tVerify differences  \nE\tJob terminated in error  \nF\tJob waiting on File daemon  \nI\tIncomplete Job  \nL\tCommitting data (last despool)  \nM\tJob waiting for Mount  \nR\tJob running  \nS\tJob waiting on the Storage daemon  \nT\tJob terminated normally  \nW\tJob terminated normally with warnings  \na\tSD despooling attributes  \nc\tWaiting for Client resource  \nd\tWaiting for maximum jobs  \ne\tNon-fatal error\nf\tFatal error  \ni\tDoing batch insert file records  \nj\tWaiting for job resource  \nl\tDoing data despooling  \nm\tWaiting for new media  \np\tWaiting for higher priority jobs to finish  \nq\tQueued waiting for device  \ns\tWaiting for storage resource  \nt\tWaiting for start time  \n",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "90%",
      "gridPos": {
        "h": 4,
        "w": 21,
        "x": 3,
        "y": 12
      },
      "id": 10,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": null,
        "desc": false
      },
      "styles": [
        {
          "$$hashKey": "object:4011",
          "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.SSS",
          "decimals": 2,
          "pattern": "/.*Time/",
          "thresholds": [],
          "type": "date",
          "unit": "short"
        },
        {
          "$$hashKey": "object:4013",
          "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,
          "pattern": "JobBytes",
          "thresholds": [],
          "type": "number",
          "unit": "bytes"
        },
        {
          "$$hashKey": "object:2002",
          "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": "Level",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:1676",
              "text": "Monthly-Full",
              "value": "F"
            },
            {
              "$$hashKey": "object:1678",
              "text": "Weekly-Diff",
              "value": "D"
            },
            {
              "$$hashKey": "object:1680",
              "text": "Daily-Inc",
              "value": "I"
            }
          ]
        },
        {
          "$$hashKey": "object:1880",
          "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": "JobStatus",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:1901",
              "text": "Job OK",
              "value": "T"
            },
            {
              "$$hashKey": "object:1903",
              "text": "Fatal error",
              "value": "f"
            },
            {
              "$$hashKey": "object:1906",
              "text": "Canceled by user",
              "value": "A"
            },
            {
              "$$hashKey": "object:1908",
              "text": "Job terminated in error",
              "value": "E"
            },
            {
              "$$hashKey": "object:4070",
              "text": "Running",
              "value": "R"
            }
          ]
        },
        {
          "$$hashKey": "object:3410",
          "alias": " ",
          "align": "auto",
          "colorMode": "row",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "link": false,
          "mappingType": 1,
          "pattern": "J",
          "thresholds": [
            "1.5",
            " 2.5"
          ],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select JobID,Name,JobStatus,\r\nCASE JobStatus WHEN 'T' THEN 1 WHEN 'A' THEN 2 WHEN 'E' THEN 3 WHEN 'f' THEN 4 END as J,\r\nStartTime,EndTime,Level,JobFiles,JobBytes FROM Job \r\nWHERE  JobStatus='R' and \r\n  $__timeFilter(StartTime)\r\n  ORDER BY StartTime DESC LIMIT 500;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Running Jobs",
      "transform": "table",
      "type": "table-old"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [
            {
              "id": 0,
              "op": "=",
              "text": "N/A",
              "type": 1,
              "value": "null"
            }
          ],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 16
      },
      "id": 28,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "mean"
          ]
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select count(JobID) FROM Job WHERE JobStatus='F,C,S,m,M,s,j,c,d,t,p';",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Stalled Jobs",
      "type": "stat"
    },
    {
      "columns": [],
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "JobStatus | Description  \n\nA\tJob canceled by user   \nB\tJob blocked   \nC\tJob created but not yet running  \nD\tVerify differences  \nE\tJob terminated in error  \nF\tJob waiting on File daemon  \nI\tIncomplete Job  \nL\tCommitting data (last despool)  \nM\tJob waiting for Mount  \nR\tJob running  \nS\tJob waiting on the Storage daemon  \nT\tJob terminated normally  \nW\tJob terminated normally with warnings  \na\tSD despooling attributes  \nc\tWaiting for Client resource  \nd\tWaiting for maximum jobs  \ne\tNon-fatal error\nf\tFatal error  \ni\tDoing batch insert file records  \nj\tWaiting for job resource  \nl\tDoing data despooling  \nm\tWaiting for new media  \np\tWaiting for higher priority jobs to finish  \nq\tQueued waiting for device  \ns\tWaiting for storage resource  \nt\tWaiting for start time  \n",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "90%",
      "gridPos": {
        "h": 10,
        "w": 21,
        "x": 3,
        "y": 16
      },
      "id": 30,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 4,
        "desc": true
      },
      "styles": [
        {
          "$$hashKey": "object:4011",
          "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": "DD-MM-YYYY HH:mm:ss",
          "decimals": 2,
          "pattern": "/.*Time/",
          "thresholds": [],
          "type": "date",
          "unit": "short"
        },
        {
          "$$hashKey": "object:4013",
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "#F2495C",
            "#FF9830",
            "#73BF69"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "pattern": "JobBytes",
          "thresholds": [],
          "type": "number",
          "unit": "bytes"
        },
        {
          "$$hashKey": "object:2002",
          "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": "Level",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:1676",
              "text": "Monthly-Full",
              "value": "F"
            },
            {
              "$$hashKey": "object:1678",
              "text": "Weekly-Diff",
              "value": "D"
            },
            {
              "$$hashKey": "object:1680",
              "text": "Daily-Inc",
              "value": "I"
            }
          ]
        },
        {
          "$$hashKey": "object:1880",
          "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": "JobStatus",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:1901",
              "text": "Job OK",
              "value": "T"
            },
            {
              "$$hashKey": "object:1903",
              "text": "Fatal error",
              "value": "f"
            },
            {
              "$$hashKey": "object:1906",
              "text": "Canceled by user",
              "value": "A"
            },
            {
              "$$hashKey": "object:1908",
              "text": "Job terminated in error",
              "value": "E"
            },
            {
              "$$hashKey": "object:4070",
              "text": "Running",
              "value": "R"
            }
          ]
        },
        {
          "$$hashKey": "object:3410",
          "alias": " ",
          "align": "auto",
          "colorMode": "row",
          "colors": [
            "#73BF69",
            "#FF9830",
            "#F2495C"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "link": false,
          "mappingType": 1,
          "pattern": "J",
          "thresholds": [
            "1.5",
            " 2.5"
          ],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select JobID,Name,JobStatus,\r\nCASE JobStatus WHEN 'T' THEN 1 WHEN 'A' THEN 2 WHEN 'E' THEN 3 WHEN 'f' THEN 4 END as J,\r\nStartTime,EndTime,Level,JobFiles,JobBytes FROM Job \r\nWHERE\r\n  $__timeFilter(StartTime)\r\n  ORDER BY StartTime DESC LIMIT 500;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Last Jobs",
      "transform": "table",
      "type": "table-old"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 0,
        "y": 20
      },
      "id": 5,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "fieldOptions": {
          "calcs": [
            "mean"
          ]
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(Name)\nFROM\n  Client;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "# Clients",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 0,
        "y": 23
      },
      "id": 14,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "fieldOptions": {
          "calcs": [
            "mean"
          ]
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(*) from Pool;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "# Pools",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [
            {
              "id": 0,
              "op": "=",
              "text": "N/A",
              "type": 1,
              "value": "null"
            }
          ],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 26
      },
      "id": 6,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(VolumeName)\nFROM\n  Media;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "# Volumes",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [
            {
              "id": 0,
              "op": "=",
              "text": "N/A",
              "type": 1,
              "value": "null"
            }
          ],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 3,
        "y": 26
      },
      "id": 7,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "fieldOptions": {
          "calcs": [
            "mean"
          ]
        },
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT \n SUM(VolBytes) \nFROM \n Media;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "All Volumes Size",
      "type": "stat"
    },
    {
      "columns": [],
      "datasource": "${DS_MYSQL_BACULA}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "90%",
      "gridPos": {
        "h": 8,
        "w": 9,
        "x": 6,
        "y": 26
      },
      "id": 9,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": null,
        "desc": false
      },
      "styles": [
        {
          "$$hashKey": "object:3546",
          "alias": "",
          "align": "right",
          "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,
          "link": false,
          "pattern": "Size",
          "thresholds": [],
          "type": "number",
          "unit": "bytes"
        },
        {
          "$$hashKey": "object:3547",
          "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": 2,
          "mappingType": 1,
          "pattern": "level",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:5704",
              "text": "Monthly-Full",
              "value": "F"
            },
            {
              "$$hashKey": "object:5706",
              "text": "Weekly-Diff",
              "value": "D"
            },
            {
              "$$hashKey": "object:5708",
              "text": "Daily.-Inc",
              "value": "I"
            }
          ]
        }
      ],
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT Convert(Name using utf8) AS Name,Convert(level using utf8) AS level, avg(Job.JobBytes) AS Size \nFROM bacula.Job \nWHERE\n  $__timeFilter(StartTime)\n  group by name,Level\nORDER BY Size DESC LIMIT 50000;\n\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Jobs Average Sizes",
      "transform": "table",
      "type": "table-old"
    },
    {
      "aliasColors": {
        "1. Job OK": "#73BF69",
        "2. Canceled by user": "#FADE2A",
        "3. Terminated in error": "#FF9830",
        "4. Fatal Error": "#F2495C",
        "Canceled by user": "#FADE2A",
        "Fatal Error": "#F2495C",
        "Job OK": "#73BF69",
        "Terminated in error": "#FF9830"
      },
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_MYSQL_BACULA}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 8,
        "w": 9,
        "x": 15,
        "y": 26
      },
      "id": 29,
      "interval": null,
      "legend": {
        "show": true,
        "values": true
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 1,
      "nullPointMode": "connected",
      "pieType": "pie",
      "strokeWidth": 1,
      "targets": [
        {
          "format": "time_series",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "JobStatus",
          "rawQuery": true,
          "rawSql": "SELECT\n  $__timeGroupAlias(StartTime,$__interval),\n   case jobstatus when 'T' then \"1. Job OK\" when 'f' then \"4. Fatal Error\" when 'E' then \"3. Terminated in error\" when 'A' then \"2. Canceled by user\" end AS metric,\n  count(*) AS \"Number\"\nFROM Job\nWHERE\n  $__timeFilter(StartTime)\nGROUP BY 2\nORDER BY 2 ",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "*"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "JobId"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "Job",
          "timeColumn": "StartTime",
          "timeColumnType": "datetime",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Job Termination Status Count",
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 30
      },
      "id": 34,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(FileId)\nFROM\n  File;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "# Files",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_MYSQL_BACULA}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "decimals": 1,
          "mappings": [],
          "max": 10000000000,
          "min": 0,
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 3,
        "y": 30
      },
      "id": 24,
      "interval": null,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "alias": "",
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT table_schema \"DB Name\",\n       sum(data_length + index_length)\nFROM information_schema.tables \nwhere table_schema=\"bacula\";",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Catalog DB Size",
      "type": "stat"
    }
  ],
  "refresh": false,
  "schemaVersion": 25,
  "style": "dark",
  "tags": [
    "bacula"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-7d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "utc",
  "title": "Bacula",
  "uid": "AvKHTy5mz",
  "version": 47,
  "description": "Template dashboard for Bacula Backup System with mysql as backend"
}