{
    "__inputs": [
      {
        "name": "DS_PROMETHEUS",
        "label": "Prometheus",
        "description": "",
        "type": "datasource",
        "pluginId": "prometheus",
        "pluginName": "Prometheus"
      },
      {
        "name": "VAR_REPLICATIONDESTNAME",
        "type": "constant",
        "label": "ReplicationDestName",
        "value": ".*-dst|.*-bootstrap",
        "description": ""
      }
    ],
    "__elements": {},
    "__requires": [
      {
        "type": "panel",
        "id": "alertlist",
        "name": "Alert list",
        "version": ""
      },
      {
        "type": "panel",
        "id": "bargauge",
        "name": "Bar gauge",
        "version": ""
      },
      {
        "type": "grafana",
        "id": "grafana",
        "name": "Grafana",
        "version": "11.1.0"
      },
      {
        "type": "datasource",
        "id": "prometheus",
        "name": "Prometheus",
        "version": "1.0.0"
      },
      {
        "type": "panel",
        "id": "stat",
        "name": "Stat",
        "version": ""
      },
      {
        "type": "panel",
        "id": "table",
        "name": "Table",
        "version": ""
      },
      {
        "type": "panel",
        "id": "timeseries",
        "name": "Time series",
        "version": ""
      }
    ],
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": {
            "type": "grafana",
            "uid": "-- Grafana --"
          },
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "type": "dashboard"
        }
      ]
    },
    "description": "Provides a basic dashboard for VolSync (See Project https://github.com/backube/volsync).",
    "editable": true,
    "fiscalYearStartMonth": 0,
    "gnetId": 21356,
    "graphTooltip": 0,
    "id": null,
    "links": [],
    "panels": [
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 3,
          "x": 0,
          "y": 0
        },
        "id": 1,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "percentChangeColorMode": "standard",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showPercentChange": false,
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "11.1.0",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "expr": "count (volsync_volume_out_of_sync{obj_namespace=~\"$namespace\"})",
            "instant": false,
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Total VolSyncs",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 3,
          "x": 3,
          "y": 0
        },
        "id": 3,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "percentChangeColorMode": "standard",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showPercentChange": false,
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "11.1.0",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "expr": "count (volsync_volume_out_of_sync{obj_namespace=~\"$namespace\",obj_name!~\"$replicationDestName\",role!~\"destination\"})",
            "instant": false,
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Non-Destinations",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "min": 0,
            "noValue": "0",
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 1
                }
              ]
            },
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 3,
          "x": 6,
          "y": 0
        },
        "id": 2,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "percentChangeColorMode": "standard",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showPercentChange": false,
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "11.1.0",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "expr": "count(volsync_volume_out_of_sync{obj_namespace=~\"$namespace\"} != 0)",
            "instant": false,
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Out of Sync",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "",
        "gridPos": {
          "h": 3,
          "w": 6,
          "x": 9,
          "y": 0
        },
        "id": 4,
        "options": {
          "alertInstanceLabelFilter": "",
          "alertName": "VolSync",
          "dashboardAlerts": false,
          "groupBy": [],
          "groupMode": "default",
          "maxItems": 20,
          "sortOrder": 1,
          "stateFilter": {
            "error": true,
            "firing": true,
            "noData": false,
            "normal": false,
            "pending": true
          },
          "viewMode": "list"
        },
        "title": "Alerts",
        "type": "alertlist"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "continuous-GrYlRd"
            },
            "decimals": 1,
            "fieldMinMax": false,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "s"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 17,
          "w": 9,
          "x": 15,
          "y": 0
        },
        "id": 7,
        "options": {
          "displayMode": "gradient",
          "maxVizHeight": 300,
          "minVizHeight": 16,
          "minVizWidth": 8,
          "namePlacement": "auto",
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showUnfilled": true,
          "sizing": "auto",
          "valueMode": "color"
        },
        "pluginVersion": "11.1.0",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "exemplar": false,
            "expr": "volsync_sync_duration_seconds{obj_namespace=~\"$namespace\",obj_name!~\"$replicationDestName\",quantile=\"0.99\",role=\"source\"}",
            "format": "time_series",
            "instant": false,
            "legendFormat": "{{obj_name}}",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Replication Duration",
        "type": "bargauge"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "custom": {
              "align": "auto",
              "cellOptions": {
                "type": "auto"
              },
              "filterable": false,
              "inspect": false
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 15,
          "x": 0,
          "y": 3
        },
        "id": 5,
        "options": {
          "cellHeight": "sm",
          "footer": {
            "countRows": true,
            "fields": "",
            "reducer": [
              "count"
            ],
            "show": true
          },
          "showHeader": true
        },
        "pluginVersion": "11.1.0",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "exemplar": false,
            "expr": "volsync_volume_out_of_sync{obj_namespace=~\"$namespace\",obj_name!~\"$replicationDestName\"}!=0",
            "format": "table",
            "instant": true,
            "legendFormat": "{{label_name}}",
            "range": false,
            "refId": "A"
          }
        ],
        "title": "Volumes Out of Sync",
        "transformations": [
          {
            "id": "organize",
            "options": {
              "excludeByName": {
                "Time": true,
                "Value": true,
                "__name__": true,
                "container": true,
                "endpoint": true,
                "instance": true,
                "job": true,
                "namespace": true,
                "pod": true,
                "service": true
              },
              "includeByName": {},
              "indexByName": {},
              "renameByName": {
                "method": "Method",
                "obj_name": "Name",
                "obj_namespace": "Namespace",
                "role": "Role"
              }
            }
          }
        ],
        "type": "table"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "Number of times sync failed to complete before next scheduled start.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "custom": {
              "align": "auto",
              "cellOptions": {
                "type": "auto"
              },
              "filterable": false,
              "inspect": false,
              "minWidth": 100
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 15,
          "x": 0,
          "y": 10
        },
        "id": 6,
        "options": {
          "cellHeight": "sm",
          "footer": {
            "countRows": false,
            "fields": "",
            "reducer": [
              "sum"
            ],
            "show": false
          },
          "showHeader": true
        },
        "pluginVersion": "11.1.0",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "exemplar": false,
            "expr": "volsync_missed_intervals_total{obj_namespace=~\"$namespace\",obj_name!~\"$replicationDestName\",role=\"source\"}!=0",
            "format": "table",
            "instant": true,
            "legendFormat": "{{label_name}}",
            "range": false,
            "refId": "A"
          }
        ],
        "title": "Missed Intervals",
        "transformations": [
          {
            "id": "organize",
            "options": {
              "excludeByName": {
                "Time": true,
                "__name__": true,
                "container": true,
                "endpoint": true,
                "instance": true,
                "job": true,
                "namespace": true,
                "pod": true,
                "service": true
              },
              "includeByName": {},
              "indexByName": {},
              "renameByName": {
                "Time": "",
                "method": "Method",
                "namespace": "",
                "obj_name": "Name",
                "obj_namespace": "Namespace",
                "pod": "",
                "role": "Role",
                "service": ""
              }
            }
          }
        ],
        "type": "table"
      },
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 17
        },
        "id": 9,
        "panels": [],
        "title": "Operational Stats",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "continuous-GrYlRd"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 10,
              "gradientMode": "scheme",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "short"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 18
        },
        "id": 10,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "maxHeight": 600,
            "mode": "multi",
            "sort": "desc"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$volsyncPod\", namespace=~\"$volsyncNamespace\"}) by (pod)",
            "instant": false,
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "CPU Utilization",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "continuous-GrYlRd"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 10,
              "gradientMode": "scheme",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "bytes"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 12,
          "y": 18
        },
        "id": 11,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "maxHeight": 600,
            "mode": "multi",
            "sort": "desc"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "expr": "sum(container_memory_working_set_bytes{pod=~\"$volsyncPod\", namespace=~\"$volsyncNamespace\"}) by (pod)",
            "instant": false,
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Memory Utilization",
        "type": "timeseries"
      }
    ],
    "refresh": "1m",
    "schemaVersion": 39,
    "tags": [
      "volsync",
      "storage",
      "backups"
    ],
    "templating": {
      "list": [
        {
          "current": {
            "selected": false,
            "text": "Prometheus",
            "value": "Prometheus"
          },
          "hide": 0,
          "includeAll": false,
          "multi": false,
          "name": "DS_PROMETHEUS",
          "label": "datasource",
          "options": [],
          "query": "prometheus",
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "type": "datasource"
        },
        {
          "allValue": ".*",
          "current": {},
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "definition": "label_values(volsync_volume_out_of_sync,obj_namespace)",
          "hide": 0,
          "includeAll": true,
          "label": "Namespace",
          "multi": true,
          "name": "namespace",
          "options": [],
          "query": {
            "qryType": 1,
            "query": "label_values(volsync_volume_out_of_sync,obj_namespace)",
            "refId": "PrometheusVariableQueryEditor-VariableQuery"
          },
          "refresh": 2,
          "regex": "",
          "skipUrlSync": false,
          "sort": 1,
          "type": "query"
        },
        {
          "description": "Name(s) of VolSync objects to ignore. To ignore ones ending in \"dst\" or \"bootstrap\" then use value:  .*-dst|.*-bootstrap",
          "hide": 2,
          "label": "ReplicationDestName",
          "name": "replicationDestName",
          "query": "${VAR_REPLICATIONDESTNAME}",
          "skipUrlSync": false,
          "type": "constant",
          "current": {
            "value": "${VAR_REPLICATIONDESTNAME}",
            "text": "${VAR_REPLICATIONDESTNAME}",
            "selected": false
          },
          "options": [
            {
              "value": "${VAR_REPLICATIONDESTNAME}",
              "text": "${VAR_REPLICATIONDESTNAME}",
              "selected": false
            }
          ]
        },
        {
          "current": {},
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "definition": "label_values(volsync_sync_duration_seconds,namespace)",
          "hide": 0,
          "includeAll": false,
          "multi": false,
          "name": "volsyncNamespace",
          "options": [],
          "query": {
            "qryType": 1,
            "query": "label_values(volsync_sync_duration_seconds,namespace)",
            "refId": "PrometheusVariableQueryEditor-VariableQuery"
          },
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "type": "query"
        },
        {
          "current": {},
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "definition": "label_values(volsync_sync_duration_seconds,pod)",
          "hide": 0,
          "includeAll": true,
          "multi": false,
          "name": "volsyncPod",
          "options": [],
          "query": {
            "qryType": 1,
            "query": "label_values(volsync_sync_duration_seconds,pod)",
            "refId": "PrometheusVariableQueryEditor-VariableQuery"
          },
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "type": "query"
        }
      ]
    },
    "time": {
      "from": "now-30m",
      "to": "now"
    },
    "timepicker": {},
    "timezone": "browser",
    "title": "VolSync Dashboard",
    "uid": "cdp5agkgn4yrkc-truecharts",
    "version": 1,
    "weekStart": ""
  }
