{
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": {
            "type": "datasource",
            "uid": "grafana"
          },
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "target": {
            "limit": 100,
            "matchAny": false,
            "tags": [],
            "type": "dashboard"
          },
          "type": "dashboard"
        }
      ]
    },
    "editable": true,
    "fiscalYearStartMonth": 0,
    "graphTooltip": 0,
    "id": 18,
    "iteration": 1654783249169,
    "links": [
      {
        "asDropdown": true,
        "icon": "external link",
        "includeVars": true,
        "keepTime": true,
        "tags": [
          "station"
        ],
        "targetBlank": false,
        "title": "Dashboards",
        "tooltip": "",
        "type": "dashboards",
        "url": ""
      }
    ],
    "liveNow": true,
    "panels": [
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "State of the software controller.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [
              {
                "options": {
                  "0": {
                    "color": "green",
                    "index": 0,
                    "text": "ON"
                  },
                  "1": {
                    "color": "red",
                    "index": 1,
                    "text": "OFF"
                  },
                  "7": {
                    "color": "blue",
                    "index": 3,
                    "text": "STANDBY"
                  },
                  "8": {
                    "color": "red",
                    "index": 4,
                    "text": "FAULT"
                  },
                  "9": {
                    "color": "blue",
                    "index": 2,
                    "text": "INIT"
                  },
                  "11": {
                    "color": "orange",
                    "index": 5,
                    "text": "ALARM"
                  }
                },
                "type": "value"
              }
            ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 5,
          "w": 3,
          "x": 0,
          "y": 0
        },
        "id": 12,
        "options": {
          "colorMode": "background",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto"
        },
        "pluginVersion": "8.5.3",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "exemplar": true,
            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/1\",name=\"State\"}",
            "interval": "",
            "legendFormat": "",
            "refId": "A"
          }
        ],
        "title": "LCU Device",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "Status string of the software controller.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 5,
          "w": 4,
          "x": 3,
          "y": 0
        },
        "id": 13,
        "options": {
          "colorMode": "none",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "/^str_value$/",
            "values": false
          },
          "text": {
            "valueSize": 20
          },
          "textMode": "auto"
        },
        "pluginVersion": "8.5.3",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "exemplar": false,
            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/1\",name=\"Status\"}",
            "instant": true,
            "interval": "",
            "legendFormat": "",
            "refId": "A"
          }
        ],
        "title": "LCU Device State",
        "transformations": [
          {
            "id": "labelsToFields",
            "options": {
              "keepLabels": [
                "str_value"
              ]
            }
          }
        ],
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "The amount of time required to read all archiving points.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "s"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 5,
          "w": 4,
          "x": 7,
          "y": 0
        },
        "id": 14,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "8.4.5",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "exemplar": true,
            "expr": "device_scraping{host=\"$station\",device=\"STAT/Beamlet/1\"}",
            "interval": "",
            "legendFormat": "",
            "refId": "A"
          }
        ],
        "title": "Archiving speed",
        "transformations": [
          {
            "id": "labelsToFields",
            "options": {
              "keepLabels": [
                "str_value"
              ]
            }
          }
        ],
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "Whether the FPGA is being controlled",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "transparent",
                  "value": null
                },
                {
                  "color": "green",
                  "value": 1
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 8,
          "x": 0,
          "y": 5
        },
        "id": 2,
        "options": {
          "colorMode": "background",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "name"
        },
        "pluginVersion": "8.5.3",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "exemplar": true,
            "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/1\",name=\"TR_fpga_mask_R\"}",
            "interval": "",
            "legendFormat": "{{x}}",
            "refId": "A"
          }
        ],
        "title": "FPGA Mask",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "Whether Beamlets are being produced.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "transparent",
                  "value": null
                },
                {
                  "color": "#EAB839",
                  "value": 1
                },
                {
                  "color": "red",
                  "value": 10
                },
                {
                  "color": "green",
                  "value": 11
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 8,
          "x": 0,
          "y": 7
        },
        "id": 23,
        "options": {
          "colorMode": "background",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "name"
        },
        "pluginVersion": "8.5.3",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "exemplar": true,
            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/1\", name=\"FPGA_beamlet_output_enable_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/1\", name=\"TR_fpga_mask_R\"})\r\n",
            "interval": "",
            "legendFormat": "{{x}}",
            "refId": "A"
          }
        ],
        "title": "Beamlet Output Enabled",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "Whether the beamlets are in sync with the PPS",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "transparent",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 10
                },
                {
                  "color": "green",
                  "value": 11
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 8,
          "x": 0,
          "y": 9
        },
        "id": 22,
        "options": {
          "colorMode": "background",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "name"
        },
        "pluginVersion": "8.5.3",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "exemplar": true,
            "expr": "(device_attribute{host=\"$station\",device=\"stat/beamlet/1\", name=\"FPGA_beamlet_output_nof_packets_R\"} > bool -1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/1\", name=\"TR_fpga_mask_R\"})\r\n",
            "interval": "",
            "legendFormat": "{{x}}",
            "refId": "A"
          }
        ],
        "title": "Beamlet PPS Sync",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "Beamlet packets emitted, per second, per FPGA, for all of its beamlets.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "pps"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 5,
          "x": 0,
          "y": 11
        },
        "id": 17,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "multi",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/1\",name=\"FPGA_beamlet_output_nof_packets_R\"} > 0",
            "interval": "",
            "legendFormat": "{{name}} - FPGA {{x}} Beamlet {{y}}",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Beamlet Output Speed (packets)",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "description": "Beamlet packets emitted, per second, per FPGA, for all of its beamlets.",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "cps"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 5,
          "x": 5,
          "y": 11
        },
        "id": 21,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "multi",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/1\",name=\"FPGA_beamlet_output_nof_valid_R\"} > 0",
            "interval": "",
            "legendFormat": "{{name}} - FPGA {{x}}",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Beamlet Output Speed (valid words)",
        "type": "timeseries"
      }
    ],
    "refresh": false,
    "schemaVersion": 36,
    "style": "dark",
    "tags": [
      "station"
    ],
    "templating": {
      "list": [
        {
          "current": {
            "selected": false,
            "text": "test-lcu2",
            "value": "test-lcu2"
          },
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "definition": "scrape_series_added\n",
          "description": "",
          "hide": 0,
          "includeAll": false,
          "label": "Station",
          "multi": false,
          "name": "station",
          "options": [],
          "query": {
            "query": "scrape_series_added\n",
            "refId": "StandardVariableQuery"
          },
          "refresh": 1,
          "regex": "/.*host=\"(?<text>[^\"]*)\".*/",
          "skipUrlSync": false,
          "sort": 1,
          "type": "query"
        }
      ]
    },
    "time": {
      "from": "now-5m",
      "to": "now"
    },
    "timepicker": {},
    "timezone": "",
    "title": "Beamlet",
    "uid": "beamlet",
    "version": 7,
    "weekStart": ""
  }