{
  "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": "Jails, virtual machines, containers and ZFS on Sylve nodes, from Sylve's /metrics endpoint.",
  "editable": true,
  "graphTooltip": 1,
  "id": null,
  "links": [
    {
      "icon": "doc",
      "targetBlank": true,
      "title": "Sylve metrics documentation",
      "type": "link",
      "url": "https://sylve.io/guides/node/metrics/"
    }
  ],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "panels": [],
      "title": "Overview",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Whether each Sylve collector's latest snapshot succeeded and is fresh. Never collected usually means the service (for example virtualization) is disabled on that node.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "fillOpacity": 80,
            "lineWidth": 0
          },
          "mappings": [
            {
              "options": {
                "0": {
                  "color": "red",
                  "index": 0,
                  "text": "Failing"
                },
                "1": {
                  "color": "green",
                  "index": 1,
                  "text": "OK"
                },
                "2": {
                  "color": "text",
                  "index": 2,
                  "text": "Never collected"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              },
              {
                "color": "text",
                "value": 2
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 2,
      "options": {
        "alignValue": "left",
        "legend": {
          "showLegend": false
        },
        "mergeValues": true,
        "rowHeight": 0.8,
        "showValue": "never",
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_collector_success{instance=~\"$instance\"} + 2 * (sylve_collector_last_success_timestamp_seconds{instance=~\"$instance\"} == bool 0)",
          "legendFormat": "{{collector}} ({{instance}})",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Collector health",
      "type": "state-timeline"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Running and total Sylve-managed jails.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "text",
            "mode": "fixed"
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 12,
        "y": 1
      },
      "id": 3,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum(sylve_jail_running{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Running",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count(sylve_jail_info{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Total",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "Jails",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Running and total Sylve-managed virtual machines.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "text",
            "mode": "fixed"
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 16,
        "y": 1
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum(sylve_vm_running{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Running",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count(sylve_vm_info{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Total",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "Virtual machines",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Running and total Sylve-managed containers.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "text",
            "mode": "fixed"
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 20,
        "y": 1
      },
      "id": 5,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum(sylve_container_running{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Running",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count(sylve_container_info{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Total",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "Containers",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Managed pools whose health is anything other than ONLINE.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 12,
        "y": 5
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "count(sylve_zfs_pool_health{instance=~\"$instance\",pool=~\"$pool\",state!=\"ONLINE\"} == 1) or vector(0)",
          "legendFormat": "Pools",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Unhealthy pools",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Share of ARC reads served from cache across the selected nodes.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "orange",
                "value": 0.8
              },
              {
                "color": "green",
                "value": 0.9
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 16,
        "y": 5
      },
      "id": 7,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum(sum by (instance) (rate(sylve_zfs_arc_hits_total{instance=~\"$instance\"}[$__rate_interval]))) / (sum(sum by (instance) (rate(sylve_zfs_arc_hits_total{instance=~\"$instance\"}[$__rate_interval]))) + sum(sum by (instance) (rate(sylve_zfs_arc_misses_total{instance=~\"$instance\"}[$__rate_interval]))))",
          "legendFormat": "Hit ratio",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "ARC hit ratio",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Containers whose image tag has a newer digest in its registry.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 20,
        "y": 5
      },
      "id": 8,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value_and_name"
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum(sylve_container_image_update_available{instance=~\"$instance\"}) or vector(0)",
          "legendFormat": "Containers",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Image updates",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 9,
      "panels": [],
      "title": "ZFS pools",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Current state of each managed pool.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "filterable": true
          },
          "noValue": "-"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "State"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "CORRUPT_DATA": {
                        "color": "red",
                        "index": 6,
                        "text": "CORRUPT_DATA"
                      },
                      "DEGRADED": {
                        "color": "orange",
                        "index": 1,
                        "text": "DEGRADED"
                      },
                      "FAULTED": {
                        "color": "red",
                        "index": 2,
                        "text": "FAULTED"
                      },
                      "OFFLINE": {
                        "color": "red",
                        "index": 3,
                        "text": "OFFLINE"
                      },
                      "ONLINE": {
                        "color": "green",
                        "index": 0,
                        "text": "ONLINE"
                      },
                      "REMOVED": {
                        "color": "red",
                        "index": 4,
                        "text": "REMOVED"
                      },
                      "UNAVAIL": {
                        "color": "red",
                        "index": 5,
                        "text": "UNAVAIL"
                      },
                      "UNKNOWN": {
                        "color": "text",
                        "index": 7,
                        "text": "UNKNOWN"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Size"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bytes"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Allocated"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bytes"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Used"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "orange",
                      "value": 0.8
                    },
                    {
                      "color": "red",
                      "value": 0.9
                    }
                  ]
                }
              },
              {
                "id": "color",
                "value": {
                  "mode": "thresholds"
                }
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "mode": "basic",
                  "type": "gauge"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Fragmentation"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Dedup"
            },
            "properties": [
              {
                "id": "unit",
                "value": "suffix:x"
              },
              {
                "id": "decimals",
                "value": 2
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 10,
      "options": {
        "cellHeight": "sm",
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Used"
          }
        ]
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "max by (instance, pool, state) (sylve_zfs_pool_health{instance=~\"$instance\",pool=~\"$pool\"} == 1)",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "max by (instance, pool) (sylve_zfs_pool_size_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "max by (instance, pool) (sylve_zfs_pool_allocated_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "max by (instance, pool) (sylve_zfs_pool_allocated_bytes{instance=~\"$instance\",pool=~\"$pool\"} / sylve_zfs_pool_size_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "D"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "max by (instance, pool) (sylve_zfs_pool_fragmentation_ratio{instance=~\"$instance\",pool=~\"$pool\"})",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "E"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "max by (instance, pool) (sylve_zfs_pool_dedup_ratio{instance=~\"$instance\",pool=~\"$pool\"})",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "F"
        }
      ],
      "title": "Pools",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value #A": true
            },
            "indexByName": {
              "Value #B": 3,
              "Value #C": 4,
              "Value #D": 5,
              "Value #E": 6,
              "Value #F": 7,
              "instance": 0,
              "pool": 1,
              "state": 2
            },
            "renameByName": {
              "Value #B": "Size",
              "Value #C": "Allocated",
              "Value #D": "Used",
              "Value #E": "Fragmentation",
              "Value #F": "Dedup",
              "instance": "Node",
              "pool": "Pool",
              "state": "State"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Allocated space as a share of pool size.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false,
            "thresholdsStyle": {
              "mode": "dashed"
            }
          },
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 0.8
              },
              {
                "color": "red",
                "value": 0.9
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 16
      },
      "id": 11,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_allocated_bytes{instance=~\"$instance\",pool=~\"$pool\"} / sylve_zfs_pool_size_bytes{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} ({{instance}})",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Pool capacity used",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Logical operations per second from zpool iostat; writes are drawn below the axis.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "iops"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/ write /"
            },
            "properties": [
              {
                "id": "custom.transform",
                "value": "negative-Y"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 16
      },
      "id": 12,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_read_operations_per_second{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} read ({{instance}})",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_write_operations_per_second{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} write ({{instance}})",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "Pool IOPS",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Logical bytes per second from zpool iostat; writes are drawn below the axis.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "Bps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/ write /"
            },
            "properties": [
              {
                "id": "custom.transform",
                "value": "negative-Y"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 24
      },
      "id": 13,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_read_bytes_per_second{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} read ({{instance}})",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_write_bytes_per_second{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} write ({{instance}})",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "Pool throughput",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Average total wait per operation, including queueing; writes are drawn below the axis.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "s"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/ write /"
            },
            "properties": [
              {
                "id": "custom.transform",
                "value": "negative-Y"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 24
      },
      "id": 14,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_read_latency_seconds{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} read ({{instance}})",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_pool_write_latency_seconds{instance=~\"$instance\",pool=~\"$pool\"}",
          "legendFormat": "{{pool}} write ({{instance}})",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "Pool latency",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 32
      },
      "id": 15,
      "panels": [],
      "title": "Jails",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "CPU use of running jails, normalized to the cores each jail may use.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "max": 1,
          "min": 0,
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 33
      },
      "id": 16,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "(sylve_jail_cpu_usage_ratio{instance=~\"$instance\"} * on(job, instance, ctid) group_left(name) sylve_jail_info{instance=~\"$instance\"}) and on(job, instance, ctid) (sylve_jail_running{instance=~\"$instance\"} == 1)",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Jail CPU",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Summed process RSS of running jails, including descendant jails.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 33
      },
      "id": 17,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "(sylve_jail_memory_rss_bytes{instance=~\"$instance\"} * on(job, instance, ctid) group_left(name) sylve_jail_info{instance=~\"$instance\"}) and on(job, instance, ctid) (sylve_jail_running{instance=~\"$instance\"} == 1)",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Jail memory",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 41
      },
      "id": 18,
      "panels": [],
      "title": "Virtual machines",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "CPU time as a share of each VM's configured vCPUs.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "max": 1,
          "min": 0,
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 42
      },
      "id": 19,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "rate(sylve_vm_cpu_seconds_total{instance=~\"$instance\"}[$__rate_interval]) / on(job, instance, rid) sylve_vm_vcpus{instance=~\"$instance\"} * on(job, instance, rid) group_left(name) sylve_vm_info{instance=~\"$instance\"}",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "VM CPU",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Host RSS of each bhyve process, not memory used inside the guest.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 42
      },
      "id": 20,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_vm_memory_rss_bytes{instance=~\"$instance\"} * on(job, instance, rid) group_left(name) sylve_vm_info{instance=~\"$instance\"}",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "VM memory",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 50
      },
      "id": 21,
      "panels": [],
      "title": "Containers",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "CPU time as a share of the cores each container may use. RACCT counts whole seconds, so short ranges look stepped.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "max": 1,
          "min": 0,
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 51
      },
      "id": 22,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "rate(sylve_container_cpu_seconds_total{instance=~\"$instance\"}[$__rate_interval]) / on(job, instance, ocid) sylve_container_cpu_cores{instance=~\"$instance\"} * on(job, instance, ocid) group_left(name) sylve_container_info{instance=~\"$instance\"}",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Container CPU",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Resident memory of each running container's jail.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 51
      },
      "id": 23,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_container_memory_rss_bytes{instance=~\"$instance\"} * on(job, instance, ocid) group_left(name) sylve_container_info{instance=~\"$instance\"}",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Container memory",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 59
      },
      "id": 24,
      "panels": [],
      "title": "ARC",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Host-wide ARC size against its adaptive target and maximum.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 60
      },
      "id": 25,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_arc_size_bytes{instance=~\"$instance\"}",
          "legendFormat": "size ({{instance}})",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_arc_target_size_bytes{instance=~\"$instance\"}",
          "legendFormat": "target ({{instance}})",
          "range": true,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sylve_zfs_arc_max_size_bytes{instance=~\"$instance\"}",
          "legendFormat": "max ({{instance}})",
          "range": true,
          "refId": "C"
        }
      ],
      "title": "ARC size",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${datasource}"
      },
      "description": "Share of ARC reads served from cache.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "fillOpacity": 10,
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false
          },
          "max": 1,
          "min": 0,
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 60
      },
      "id": 26,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "expr": "sum by (instance) (rate(sylve_zfs_arc_hits_total{instance=~\"$instance\"}[$__rate_interval])) / (sum by (instance) (rate(sylve_zfs_arc_hits_total{instance=~\"$instance\"}[$__rate_interval])) + sum by (instance) (rate(sylve_zfs_arc_misses_total{instance=~\"$instance\"}[$__rate_interval])))",
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "ARC hit ratio",
      "type": "timeseries"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 68
      },
      "id": 27,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "description": "Every Sylve-managed jail on the selected nodes.",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "auto",
                "filterable": true
              },
              "noValue": "-"
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "State"
                },
                "properties": [
                  {
                    "id": "mappings",
                    "value": [
                      {
                        "options": {
                          "0": {
                            "color": "text",
                            "index": 1,
                            "text": "Stopped"
                          },
                          "1": {
                            "color": "green",
                            "index": 0,
                            "text": "Running"
                          }
                        },
                        "type": "value"
                      }
                    ]
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "type": "color-text"
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "CPU"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 1
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Memory"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Memory limit"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Limit used"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "min",
                    "value": 0
                  },
                  {
                    "id": "max",
                    "value": 1
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "green",
                          "value": null
                        },
                        {
                          "color": "orange",
                          "value": 0.8
                        },
                        {
                          "color": "red",
                          "value": 0.9
                        }
                      ]
                    }
                  },
                  {
                    "id": "color",
                    "value": {
                      "mode": "thresholds"
                    }
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "mode": "basic",
                      "type": "gauge"
                    }
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 69
          },
          "id": 28,
          "options": {
            "cellHeight": "sm",
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Memory"
              }
            ]
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid, name, hostname) (sylve_jail_info{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid) (sylve_jail_running{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "B"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid) (sylve_jail_cpu_usage_ratio{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "C"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid) (sylve_jail_cpu_cores{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "D"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid) (sylve_jail_memory_rss_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "E"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid) (sylve_jail_memory_limit_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "F"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ctid) (sylve_jail_memory_rss_bytes{instance=~\"$instance\"} / sylve_jail_memory_limit_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "G"
            }
          ],
          "title": "Jails",
          "transformations": [
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true,
                  "Value #A": true
                },
                "indexByName": {
                  "Value #B": 4,
                  "Value #C": 5,
                  "Value #D": 6,
                  "Value #E": 7,
                  "Value #F": 8,
                  "Value #G": 9,
                  "ctid": 1,
                  "hostname": 3,
                  "instance": 0,
                  "name": 2
                },
                "renameByName": {
                  "Value #B": "State",
                  "Value #C": "CPU",
                  "Value #D": "Cores",
                  "Value #E": "Memory",
                  "Value #F": "Memory limit",
                  "Value #G": "Limit used",
                  "ctid": "CTID",
                  "hostname": "Hostname",
                  "instance": "Node",
                  "name": "Name"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "description": "Every Sylve-managed VM on the selected nodes.",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "auto",
                "filterable": true
              },
              "noValue": "-"
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "State"
                },
                "properties": [
                  {
                    "id": "mappings",
                    "value": [
                      {
                        "options": {
                          "crashed": {
                            "color": "red",
                            "index": 2,
                            "text": "crashed"
                          },
                          "paused": {
                            "color": "blue",
                            "index": 1,
                            "text": "paused"
                          },
                          "running": {
                            "color": "green",
                            "index": 0,
                            "text": "running"
                          },
                          "shutoff": {
                            "color": "text",
                            "index": 3,
                            "text": "shutoff"
                          }
                        },
                        "type": "value"
                      }
                    ]
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "type": "color-text"
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "CPU"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 1
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Memory"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Host RSS"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Measured"
                },
                "properties": [
                  {
                    "id": "mappings",
                    "value": [
                      {
                        "options": {
                          "0": {
                            "color": "orange",
                            "index": 1,
                            "text": "Partial"
                          },
                          "1": {
                            "color": "green",
                            "index": 0,
                            "text": "Yes"
                          }
                        },
                        "type": "value"
                      }
                    ]
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "type": "color-text"
                    }
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 77
          },
          "id": 29,
          "options": {
            "cellHeight": "sm",
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Host RSS"
              }
            ]
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid, name) (sylve_vm_info{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid, state) (sylve_vm_state{instance=~\"$instance\"} == 1)",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "B"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid) (rate(sylve_vm_cpu_seconds_total{instance=~\"$instance\"}[$__rate_interval]) / sylve_vm_vcpus{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "C"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid) (sylve_vm_vcpus{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "D"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid) (sylve_vm_memory_configured_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "E"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid) (sylve_vm_memory_rss_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "F"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, rid) (sylve_vm_collection_success{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "G"
            }
          ],
          "title": "Virtual machines",
          "transformations": [
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true,
                  "Value #A": true,
                  "Value #B": true
                },
                "indexByName": {
                  "Value #C": 4,
                  "Value #D": 5,
                  "Value #E": 6,
                  "Value #F": 7,
                  "Value #G": 8,
                  "instance": 0,
                  "name": 2,
                  "rid": 1,
                  "state": 3
                },
                "renameByName": {
                  "Value #C": "CPU",
                  "Value #D": "vCPUs",
                  "Value #E": "Memory",
                  "Value #F": "Host RSS",
                  "Value #G": "Measured",
                  "instance": "Node",
                  "name": "Name",
                  "rid": "RID",
                  "state": "State"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "description": "Every Sylve-managed container on the selected nodes.",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "auto",
                "filterable": true
              },
              "noValue": "-"
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "State"
                },
                "properties": [
                  {
                    "id": "mappings",
                    "value": [
                      {
                        "options": {
                          "0": {
                            "color": "text",
                            "index": 1,
                            "text": "Stopped"
                          },
                          "1": {
                            "color": "green",
                            "index": 0,
                            "text": "Running"
                          }
                        },
                        "type": "value"
                      }
                    ]
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "type": "color-text"
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "CPU"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "decimals",
                    "value": 1
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Memory"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Memory limit"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Limit used"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "percentunit"
                  },
                  {
                    "id": "min",
                    "value": 0
                  },
                  {
                    "id": "max",
                    "value": 1
                  },
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "green",
                          "value": null
                        },
                        {
                          "color": "orange",
                          "value": 0.8
                        },
                        {
                          "color": "red",
                          "value": 0.9
                        }
                      ]
                    }
                  },
                  {
                    "id": "color",
                    "value": {
                      "mode": "thresholds"
                    }
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "mode": "basic",
                      "type": "gauge"
                    }
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Image update"
                },
                "properties": [
                  {
                    "id": "mappings",
                    "value": [
                      {
                        "options": {
                          "0": {
                            "color": "text",
                            "index": 1,
                            "text": "Current"
                          },
                          "1": {
                            "color": "orange",
                            "index": 0,
                            "text": "Available"
                          }
                        },
                        "type": "value"
                      }
                    ]
                  },
                  {
                    "id": "custom.cellOptions",
                    "value": {
                      "type": "color-text"
                    }
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 85
          },
          "id": 30,
          "options": {
            "cellHeight": "sm",
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Memory"
              }
            ]
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid, name, image, stack, pool) (sylve_container_info{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (sylve_container_running{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "B"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (rate(sylve_container_cpu_seconds_total{instance=~\"$instance\"}[$__rate_interval]) / sylve_container_cpu_cores{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "C"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (sylve_container_cpu_cores{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "D"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (sylve_container_memory_rss_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "E"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (sylve_container_memory_limit_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "F"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (sylve_container_memory_rss_bytes{instance=~\"$instance\"} / sylve_container_memory_limit_bytes{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "G"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, ocid) (sylve_container_image_update_available{instance=~\"$instance\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "H"
            }
          ],
          "title": "Containers",
          "transformations": [
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true,
                  "Value #A": true
                },
                "indexByName": {
                  "Value #B": 6,
                  "Value #C": 7,
                  "Value #D": 8,
                  "Value #E": 9,
                  "Value #F": 10,
                  "Value #G": 11,
                  "Value #H": 12,
                  "image": 3,
                  "instance": 0,
                  "name": 2,
                  "ocid": 1,
                  "pool": 5,
                  "stack": 4
                },
                "renameByName": {
                  "Value #B": "State",
                  "Value #C": "CPU",
                  "Value #D": "Cores",
                  "Value #E": "Memory",
                  "Value #F": "Memory limit",
                  "Value #G": "Limit used",
                  "Value #H": "Image update",
                  "image": "Image",
                  "instance": "Node",
                  "name": "Name",
                  "ocid": "OCID",
                  "pool": "Pool",
                  "stack": "Stack"
                }
              }
            }
          ],
          "type": "table"
        }
      ],
      "title": "Guest inventory",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 69
      },
      "id": 31,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "description": "Data referenced by each dataset itself, excluding descendants and snapshots.",
          "fieldConfig": {
            "defaults": {
              "min": 0,
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 0,
            "y": 70
          },
          "id": 32,
          "options": {
            "displayMode": "basic",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showUnfilled": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "topk(15, sylve_zfs_dataset_referenced_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "instant": true,
              "legendFormat": "{{dataset}} ({{instance}})",
              "range": false,
              "refId": "A"
            }
          ],
          "title": "Largest datasets",
          "type": "bargauge"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "description": "Datasets closest to their quota.",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "max": 1,
              "min": 0,
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "orange",
                    "value": 0.8
                  },
                  {
                    "color": "red",
                    "value": 0.9
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 12,
            "y": 70
          },
          "id": 33,
          "options": {
            "displayMode": "basic",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showUnfilled": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "topk(15, sylve_zfs_dataset_used_bytes{instance=~\"$instance\",pool=~\"$pool\"} / sylve_zfs_dataset_quota_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "instant": true,
              "legendFormat": "{{dataset}} ({{instance}})",
              "range": false,
              "refId": "A"
            }
          ],
          "title": "Quota used",
          "type": "bargauge"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${datasource}"
          },
          "description": "Filesystems and zvols on managed pools. Used includes descendants and snapshots.",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "auto",
                "filterable": true
              },
              "noValue": "-"
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Used"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Available"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Referenced"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Logical used"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Quota"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Volume size"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "bytes"
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "Compression"
                },
                "properties": [
                  {
                    "id": "unit",
                    "value": "suffix:x"
                  },
                  {
                    "id": "decimals",
                    "value": 2
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 10,
            "w": 24,
            "x": 0,
            "y": 80
          },
          "id": 34,
          "options": {
            "cellHeight": "sm",
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "Used"
              }
            ]
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset, type) (sylve_zfs_dataset_info{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_used_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "B"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_available_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "C"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_referenced_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "D"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_logical_used_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "E"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_quota_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "F"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_volume_size_bytes{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "G"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${datasource}"
              },
              "expr": "max by (instance, pool, dataset) (sylve_zfs_dataset_compression_ratio{instance=~\"$instance\",pool=~\"$pool\"})",
              "format": "table",
              "instant": true,
              "range": false,
              "refId": "H"
            }
          ],
          "title": "Datasets",
          "transformations": [
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true,
                  "Value #A": true
                },
                "indexByName": {
                  "Value #B": 4,
                  "Value #C": 5,
                  "Value #D": 6,
                  "Value #E": 7,
                  "Value #F": 8,
                  "Value #G": 9,
                  "Value #H": 10,
                  "dataset": 2,
                  "instance": 0,
                  "pool": 1,
                  "type": 3
                },
                "renameByName": {
                  "Value #B": "Used",
                  "Value #C": "Available",
                  "Value #D": "Referenced",
                  "Value #E": "Logical used",
                  "Value #F": "Quota",
                  "Value #G": "Volume size",
                  "Value #H": "Compression",
                  "dataset": "Dataset",
                  "instance": "Node",
                  "pool": "Pool",
                  "type": "Type"
                }
              }
            }
          ],
          "type": "table"
        }
      ],
      "title": "Datasets",
      "type": "row"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 39,
  "tags": [
    "sylve",
    "freebsd",
    "zfs"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "hide": 0,
        "label": "Data source",
        "name": "datasource",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "type": "datasource"
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${datasource}"
        },
        "definition": "label_values(sylve_collector_success, instance)",
        "hide": 0,
        "includeAll": true,
        "label": "Node",
        "multi": true,
        "name": "instance",
        "options": [],
        "query": {
          "query": "label_values(sylve_collector_success, instance)",
          "refId": "SylveVariable"
        },
        "refresh": 2,
        "regex": "",
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${datasource}"
        },
        "definition": "label_values(sylve_zfs_pool_info{instance=~\"$instance\"}, pool)",
        "hide": 0,
        "includeAll": true,
        "label": "Pool",
        "multi": true,
        "name": "pool",
        "options": [],
        "query": {
          "query": "label_values(sylve_zfs_pool_info{instance=~\"$instance\"}, pool)",
          "refId": "SylveVariable"
        },
        "refresh": 2,
        "regex": "",
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timezone": "browser",
  "title": "Sylve Node",
  "uid": "sylve-node",
  "version": 1
}
