{
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "panels": [],
      "repeat": "hosts",
      "title": "$hosts",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1,
          "mappings": [
            {
              "options": {
                "0": {
                  "color": "red",
                  "index": 0,
                  "text": "Down"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 4,
        "x": 0,
        "y": 1
      },
      "id": 2,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "limit": 1,
          "values": false
        },
        "showPercentChange": false,
        "text": {},
        "textMode": "value",
        "wideLayout": true
      },
      "pluginVersion": "12.3.1",
      "targets": [
        {
          "exemplar": false,
          "expr": "sum((node_time_seconds{instance=\"$hosts\",job=\"hosts\"} - node_boot_time_seconds{instance=\"$hosts\",job=\"hosts\"}) OR vector(0))",
          "instant": false,
          "legendFormat": "Uptime",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Uptime",
      "type": "stat"
    },
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "fieldMinMax": true,
          "mappings": [
            {
              "options": {
                "0": {
                  "color": "red",
                  "index": 0,
                  "text": "Off"
                }
              },
              "type": "value"
            }
          ],
          "noValue": "Unknown",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": 0
              }
            ]
          },
          "unit": "dateTimeFromNow"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "rev"
            },
            "properties": [
              {
                "id": "unit",
                "value": "string"
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "dirty": {
                        "color": "yellow",
                        "index": 0
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 4,
        "x": 4,
        "y": 1
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "percentChangeColorMode": "same_as_value",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "showPercentChange": false,
        "text": {},
        "textMode": "auto",
        "wideLayout": false
      },
      "pluginVersion": "12.3.1",
      "targets": [
        {
          "editorMode": "code",
          "exemplar": false,
          "expr": "(nix_registry{name=\"self\",instance=\"$hosts\"} > 1)*1000",
          "format": "table",
          "instant": false,
          "interval": "",
          "legendFormat": "Version",
          "range": true,
          "refId": "Version"
        },
        {
          "editorMode": "code",
          "exemplar": false,
          "expr": "max(nix_registry{name=\"self\"})*1000",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "Newest",
          "range": true,
          "refId": "Newest"
        }
      ],
      "title": "Flake",
      "transformations": [
        {
          "id": "configFromData",
          "options": {
            "applyTo": {
              "id": "byName",
              "options": "Value"
            },
            "configRefId": "Newest",
            "mappings": [
              {
                "fieldName": "Newest",
                "handlerArguments": {
                  "threshold": {
                    "color": "green"
                  }
                },
                "handlerKey": "threshold1"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "instance": true,
              "job": true,
              "name": true
            },
            "includeByName": {},
            "indexByName": {},
            "renameByName": {
              "Time": "",
              "Value": "Commited at",
              "rev": "Revision"
            }
          }
        },
        {
          "id": "formatString",
          "options": {
            "outputFormat": "Substring",
            "stringField": "rev",
            "substringEnd": 8
          }
        }
      ],
      "type": "stat"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 1,
          "noValue": "?",
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "text",
                "value": 0
              },
              {
                "color": "green",
                "value": 0.01
              },
              {
                "color": "yellow",
                "value": 75
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 7,
        "x": 8,
        "y": 1
      },
      "id": 4,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": false
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.3.1",
      "targets": [
        {
          "expr": "sum(node_memory_MemTotal_bytes{instance=\"$hosts\"} - node_memory_MemAvailable_bytes{instance=\"$hosts\"})",
          "instant": false,
          "legendFormat": "Used Memory",
          "range": true,
          "refId": "Used Memory"
        },
        {
          "expr": "node_memory_MemTotal_bytes{instance=\"$hosts\"}",
          "legendFormat": "Total Memory",
          "refId": "Total Memory"
        }
      ],
      "title": "RAM Usage",
      "transformations": [
        {
          "id": "configFromData",
          "options": {
            "applyTo": {
              "id": "byFrameRefID",
              "options": "Used Memory"
            },
            "configRefId": "Total Memory",
            "mappings": [
              {
                "fieldName": "Total Memory",
                "handlerKey": "max"
              },
              {
                "fieldName": "Time",
                "handlerKey": "__ignore"
              }
            ]
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 1,
          "min": 0,
          "noValue": "?",
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "text",
                "value": 0
              },
              {
                "color": "green",
                "value": 0.01
              },
              {
                "color": "yellow",
                "value": 75
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 7,
        "x": 15,
        "y": 1
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "maxHeight": 600,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.3.1",
      "targets": [
        {
          "exemplar": false,
          "expr": "1 - rate(node_cpu_seconds_total{mode=\"idle\",instance=\"$hosts\"}[1m])",
          "instant": false,
          "legendFormat": "{{cpu}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "System Load",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "${__field.displayName}",
          "fieldMinMax": true,
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "text",
                "value": 0
              },
              {
                "color": "green",
                "value": 1e-14
              },
              {
                "color": "yellow",
                "value": 75
              },
              {
                "color": "red",
                "value": 90
              },
              {
                "color": "text",
                "value": 100
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 8,
        "x": 0,
        "y": 8
      },
      "id": 3,
      "options": {
        "minVizHeight": 75,
        "minVizWidth": 75,
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "min"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "sizing": "auto"
      },
      "pluginVersion": "12.3.1",
      "targets": [
        {
          "expr": "sum by (job, instance, uuid) (node_btrfs_used_bytes{instance=\"$hosts\"}) * on(uuid) group_left(label) node_btrfs_info{instance=\"$hosts\"}",
          "range": true,
          "legendFormat": "device={{label}},type=used",
          "instant": false,
          "refId": "Used Space"
        },
        {
          "expr": "sum by (job, instance, uuid) (node_btrfs_device_size_bytes{instance=\"$hosts\"}) * on(uuid) group_left(label) node_btrfs_info{instance=\"$hosts\"}",
          "range": true,
          "legendFormat": "device={{label}},type=total",
          "instant": false,
          "refId": "Total Space"
        }
      ],
      "title": "Storage",
      "transformations": [
        {
          "id": "seriesToRows",
          "options": {}
        },
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "keepTime": false,
            "replace": false,
            "source": "Metric"
          }
        },
        {
          "id": "groupingToMatrix",
          "options": {
            "columnField": "device",
            "rowField": "type",
            "valueField": "Value"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "type\\device": true
            },
            "includeByName": {},
            "indexByName": {},
            "orderByMode": "manual",
            "renameByName": {}
          }
        }
      ],
      "type": "gauge"
    }
  ],
  "preload": false,
  "refresh": "auto",
  "schemaVersion": 42,
  "tags": [],
  "templating": {
    "list": [
      {
        "allowCustomValue": false,
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "definition": "label_values(up{job=\"hosts\"},instance)",
        "includeAll": true,
        "name": "hosts",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values(up{job=\"hosts\"},instance)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "title": "Hosts - Nix"
}
