{
  "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": "Investigate the end-to-end telemetry pipeline of a COS deployment: targets, to edge collectors, to the COS collector, to the backends (Mimir, Loki, Tempo). The pipeline rows follow each signal hop by hop, then the Collectors row covers the collectors' own health, the Backends row covers the datastores, and the High availability row checks that the COS applications are scaled.\n\nSet the COS model variable to the model that hosts your COS applications; the High availability and Backends rows are scoped to it. The backend panels are global and are not affected by the Collector variables.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 192,
      "panels": [],
      "title": "Setup",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 171,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "<div style=\"\n  background-color: rgba(255, 152, 48, 0.18);\n  border: 2px solid #ff9830;\n  border-radius: 6px;\n  padding: 16px;\n  text-align: center;\n  color: #ff9830;\n  font-size: 22px;\n  font-weight: bold;\n  letter-spacing: 0.5px;\n\">\n  \u26a0\ufe0f Set the \"COS model\" variable for your deployment. This dashboard is synced from git, so make changes in the source JSON and remove this row once your deployment is configured.\n</div>",
        "mode": "html"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "id": 190,
      "panels": [],
      "title": "High availability (COS model only)",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Whether the COS deployment is highly available: every HA application runs two or more replicas. Degraded means at least one does not. Scaling guidance: https://canonical.com/observability/docs/latest/reference/topology/#cos",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "0": {
                  "index": 0,
                  "text": "Mode: HA"
                },
                "1": {
                  "index": 1,
                  "text": "Degraded"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "#FF9830",
                "value": 1
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 8,
        "x": 0,
        "y": 5
      },
      "id": 180,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "value",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "((count(count by (juju_application) (up{juju_model=~\"$cos_model\",juju_application=~\"mimir.*|loki.*|tempo.*|alertmanager|traefik|grafana|otelcol|opentelemetry-collector\"}) < 2) or vector(0)) > bool 0) and on() (count(up{juju_model=~\"$cos_model\"}) > bool 0)",
          "instant": true,
          "legendFormat": "{{juju_application}}",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "HA mode",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "HA applications running fewer than two replicas. Empty means every HA application is scaled. Scaling guidance: https://canonical.com/observability/docs/latest/reference/topology/#cos",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "noValue": "Set the COS model, or all scaled",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#FF9830",
                "value": 0
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "juju_application"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "App"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Units"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 8,
        "x": 8,
        "y": 5
      },
      "id": 181,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "App"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "count by (juju_application) (up{juju_model=~\"$cos_model\",juju_application=~\"mimir.*|loki.*|tempo.*|alertmanager|traefik|grafana|otelcol|opentelemetry-collector\"}) < 2",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "HA applications not scaled",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Number of COS units in the COS model whose scrape target is down. Zero is healthy. Scaling guidance: https://canonical.com/observability/docs/latest/reference/topology/#cos",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "0": {
                  "index": 0,
                  "text": "All reporting"
                }
              },
              "type": "value"
            }
          ],
          "noValue": "Set the COS model",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "#FF9830",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 8,
        "x": 16,
        "y": 5
      },
      "id": 182,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "value",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "(count(up{juju_model=~\"$cos_model\",juju_application=~\"mimir.*|loki.*|tempo.*|alertmanager|traefik|grafana|otelcol|opentelemetry-collector\"} == 0) or vector(0)) and on() (count(up{juju_model=~\"$cos_model\"}) > bool 0)",
          "instant": true,
          "legendFormat": "units not reporting",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "HA units not reporting",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 151,
      "panels": [],
      "title": "Telemetry pipelines",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 12
      },
      "id": 152,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "End-to-end telemetry flow: targets, to edge collector(s), to the COS collector, to the datastore. Each panel: left axis = records/s or spans/s (accepted/refused in, exported/enqueue-failed/send-failed out); right axis = receive acceptance %. A break appears as refusals or exporter failures on the panel of the node where it happens, then the next node's accepted drops. Read left to right. 100% on every ratio = happy path.",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "id": 173,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "Logs",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Log records per second for the edge collectors: the collectors closest to the targets. accepted/refused = Log records pushed into their pipelines; exported/enqueue failed/send failed = the hop to the next tier. Right axis: receive acceptance %. Shows the collectors in the Collector scope, excluding the COS model.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "records/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "No edge collectors reporting"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*refused.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*failed.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "acceptance %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "exported (sent)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 16
      },
      "id": 153,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "accepted",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "refused",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "exported (sent)",
          "range": true,
          "refId": "C"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_enqueue_failed_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "enqueue failed (queue full)",
          "range": true,
          "refId": "D"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "send failed (delivery error)",
          "range": true,
          "refId": "E"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate({__name__=~\"otelcol_receiver_accepted_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])) / (sum(rate({__name__=~\"otelcol_receiver_accepted_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])) + sum(rate({__name__=~\"otelcol_receiver_refused_log_records.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "F"
        }
      ],
      "title": "Edge collectors",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Log records per second for the collector in the COS model, the final hop before Loki. accepted/refused = log records arriving from the edge tier plus the collector's own self-scrape; exported/enqueue failed/send failed = the hop to the backend. Right axis: receive acceptance %.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "records/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*refused.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*failed.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "exported (sent)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "acceptance %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "#5794F2",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 16
      },
      "id": 186,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "accepted",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "refused",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "exported (sent)",
          "range": true,
          "refId": "C"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_enqueue_failed_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "enqueue failed (queue full)",
          "range": true,
          "refId": "D"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "send failed (delivery error)",
          "range": true,
          "refId": "E"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate({__name__=~\"otelcol_receiver_accepted_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])) / (sum(rate({__name__=~\"otelcol_receiver_accepted_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])) + sum(rate({__name__=~\"otelcol_receiver_refused_log_records.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "F"
        }
      ],
      "title": "COS collector",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Loki write path (distributor). received = log lines the distributor received (loki_distributor_lines_received_total); discarded = lines Loki dropped for any reason (loki_discarded_samples_total: rate_limited, out_of_order, too_far_behind, etc.). Right axis: acceptance %.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "received/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*discarded.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 16
      },
      "id": 156,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate(loki_distributor_lines_received_total[$__rate_interval]))",
          "legendFormat": "received",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate(loki_discarded_samples_total[$__rate_interval]))",
          "legendFormat": "discarded",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate(loki_distributor_lines_received_total[$__rate_interval])) / (sum(rate(loki_distributor_lines_received_total[$__rate_interval])) + sum(rate(loki_discarded_samples_total[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "C"
        }
      ],
      "title": "Loki",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 25
      },
      "id": 174,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "Metrics",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Metric points per second for the edge collectors: the collectors closest to the targets. accepted/refused = Metric points pushed into their pipelines; exported/enqueue failed/send failed = the hop to the next tier. Right axis: receive acceptance %. Shows the collectors in the Collector scope, excluding the COS model.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "points/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "No edge collectors reporting"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*refused.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*failed.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "acceptance %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "exported (sent)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 27
      },
      "id": 141,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "accepted",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "refused",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "exported (sent)",
          "range": true,
          "refId": "C"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_enqueue_failed_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "enqueue failed (queue full)",
          "range": true,
          "refId": "D"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "send failed (delivery error)",
          "range": true,
          "refId": "E"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate({__name__=~\"otelcol_receiver_accepted_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])) / (sum(rate({__name__=~\"otelcol_receiver_accepted_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])) + sum(rate({__name__=~\"otelcol_receiver_refused_metric_points.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "F"
        }
      ],
      "title": "Edge collectors",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Metric points per second for the collector in the COS model, the final hop before Mimir. accepted/refused = metric points arriving from the edge tier plus the collector's own self-scrape; exported/enqueue failed/send failed = the hop to the backend. Right axis: receive acceptance %.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "points/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*refused.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*failed.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "exported (sent)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "acceptance %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "#5794F2",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 27
      },
      "id": 187,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "accepted",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "refused",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "exported (sent)",
          "range": true,
          "refId": "C"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_enqueue_failed_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "enqueue failed (queue full)",
          "range": true,
          "refId": "D"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "send failed (delivery error)",
          "range": true,
          "refId": "E"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate({__name__=~\"otelcol_receiver_accepted_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])) / (sum(rate({__name__=~\"otelcol_receiver_accepted_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])) + sum(rate({__name__=~\"otelcol_receiver_refused_metric_points.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "F"
        }
      ],
      "title": "COS collector",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Mimir write path (distributor). ingested = samples the distributor received (cortex_distributor_received_samples_total); discarded = samples discarded for any reason, including sample_timestamp_too_old (cortex_discarded_samples_total). Right axis: acceptance %.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "received/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*discarded.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 27
      },
      "id": 137,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate(cortex_distributor_received_samples_total[$__rate_interval]))",
          "legendFormat": "ingested",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate(cortex_discarded_samples_total[$__rate_interval]))",
          "legendFormat": "discarded",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate(cortex_distributor_received_samples_total[$__rate_interval])) / (sum(rate(cortex_distributor_received_samples_total[$__rate_interval])) + sum(rate(cortex_discarded_samples_total[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "C"
        }
      ],
      "title": "Mimir",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 36
      },
      "id": 175,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "Traces",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Spans per second for the edge collectors, within the Collector scope. accepted/refused = spans pushed into their pipelines; exported/enqueue failed/send failed = the hop to the next tier. Right axis: receive acceptance %. Excludes the COS model.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "spans/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "No edge collectors reporting"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*refused.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*failed.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "acceptance %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "exported (sent)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 38
      },
      "id": 183,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "accepted",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "refused",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "exported (sent)",
          "range": true,
          "refId": "C"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_enqueue_failed_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "enqueue failed (queue full)",
          "range": true,
          "refId": "D"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "send failed (delivery error)",
          "range": true,
          "refId": "E"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate({__name__=~\"otelcol_receiver_accepted_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])) / (sum(rate({__name__=~\"otelcol_receiver_accepted_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])) + sum(rate({__name__=~\"otelcol_receiver_refused_spans.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",juju_model!~\"$cos_model\"}[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "F"
        }
      ],
      "title": "Edge collectors",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Spans per second for the collector in the COS model, the final hop before Tempo. accepted/refused = spans arriving from the edge tier plus the collector's own self-scrape; exported/enqueue failed/send failed = the hop to the backend. Right axis: receive acceptance %.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "spans/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*refused.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*failed.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "exported (sent)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "acceptance %"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "#5794F2",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 38
      },
      "id": 188,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "accepted",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "refused",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "exported (sent)",
          "range": true,
          "refId": "C"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_enqueue_failed_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "enqueue failed (queue full)",
          "range": true,
          "refId": "D"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "send failed (delivery error)",
          "range": true,
          "refId": "E"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate({__name__=~\"otelcol_receiver_accepted_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])) / (sum(rate({__name__=~\"otelcol_receiver_accepted_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])) + sum(rate({__name__=~\"otelcol_receiver_refused_spans.*\",job=\"$job\",juju_model=~\"$cos_model\"}[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "F"
        }
      ],
      "title": "COS collector",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Tempo write path (distributor). received = spans the distributor received (tempo_distributor_spans_received_total); discarded = spans Tempo dropped for any reason (tempo_discarded_spans_total). Right axis: acceptance %.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "received/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*discarded.*"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": ".*acceptance %.*"
            },
            "properties": [
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "min",
                "value": 0
              },
              {
                "id": "max",
                "value": 100
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.lineStyle",
                "value": {
                  "dash": [
                    10,
                    10
                  ],
                  "fill": "dash"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 38
      },
      "id": 185,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum(rate(tempo_distributor_spans_received_total[$__rate_interval]))",
          "legendFormat": "received",
          "range": true,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "sum(rate(tempo_discarded_spans_total[$__rate_interval]))",
          "legendFormat": "discarded",
          "range": true,
          "refId": "B"
        },
        {
          "editorMode": "code",
          "expr": "100 * sum(rate(tempo_distributor_spans_received_total[$__rate_interval])) / (sum(rate(tempo_distributor_spans_received_total[$__rate_interval])) + sum(rate(tempo_discarded_spans_total[$__rate_interval])))",
          "legendFormat": "acceptance %",
          "range": true,
          "refId": "C"
        }
      ],
      "title": "Tempo",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 47
      },
      "id": 100,
      "panels": [],
      "title": "Backends (COS model only)",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Backend process restarts per application over the dashboard time range (changes of process_start_time_seconds), worst first. Red = at least one restart; all green means nothing restarted in the range. Change how many applications are shown with the Top N variable.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 0,
        "y": 48
      },
      "id": 113,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "value_and_name",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "topk(5, sum by (juju_application) (changes(process_start_time_seconds{juju_model=~\"$cos_model\",juju_application=~\"mimir.*|loki.*|tempo.*\"}[$__range])))",
          "instant": true,
          "legendFormat": "{{juju_application}}",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Top backend restarts in range",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Resident memory of every Mimir, Loki and Tempo process, per unit. Container memory limits and node sizes are not visible (the cluster is not scraped), so there is no % of limit: watch the trend.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "RSS",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "bytes",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 18,
        "x": 6,
        "y": 48
      },
      "id": 111,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "max"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "sortBy": "Last *",
          "sortDesc": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "max by (juju_unit) (process_resident_memory_bytes{juju_model=~\"$cos_model\",juju_application=~\"mimir.*|loki.*|tempo.*\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Memory (RSS) per unit",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 56
      },
      "id": 210,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "Loki",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Streams held in memory by the Loki ingester.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "series",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 58
      },
      "id": 203,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (loki_ingester_memory_streams{juju_model=~\"$cos_model\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Active",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Chunks held in memory by the Loki ingester.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "chunks",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 58
      },
      "id": 204,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (loki_ingester_memory_chunks{juju_model=~\"$cos_model\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "In memory",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Chunks flushed to object storage per second, per Loki ingester unit.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "flushed/s",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 16,
        "y": 58
      },
      "id": 205,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (rate(loki_ingester_chunks_flushed_total{juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Flushed to S3",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 66
      },
      "id": 211,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "Mimir",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Active series held by the Mimir ingester.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "series",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 68
      },
      "id": 200,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (cortex_ingester_active_series{juju_model=~\"$cos_model\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Active",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Series held in memory by the Mimir ingester.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "series",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 68
      },
      "id": 201,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (cortex_ingester_memory_series{juju_model=~\"$cos_model\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "In memory",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Blocks uploaded to object storage per second, per Mimir ingester unit.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "uploaded/s",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 16,
        "y": 68
      },
      "id": 202,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (rate(cortex_ingester_shipper_uploads_total{juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Flushed to S3",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 76
      },
      "id": 212,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "Tempo",
        "mode": "markdown"
      },
      "pluginVersion": "12.4.2",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Traces held in memory by the Tempo ingester.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "traces",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 78
      },
      "id": 206,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (tempo_ingester_live_traces{juju_model=~\"$cos_model\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Active",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Bytes of live (not yet cut into a block) traces held in memory by the Tempo ingester.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "bytes",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "bytes",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 78
      },
      "id": 207,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (tempo_ingester_live_trace_bytes{juju_model=~\"$cos_model\"})",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "In memory",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Blocks flushed to object storage per second, per Tempo ingester unit.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "flushed/s",
            "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": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              }
            ]
          },
          "unit": "short",
          "noValue": "Set the COS model"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 16,
        "y": 78
      },
      "id": 208,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_unit) (rate(tempo_ingester_blocks_flushed_total{juju_model=~\"$cos_model\"}[$__rate_interval]))",
          "legendFormat": "{{juju_unit}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Flushed to S3",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 86
      },
      "id": 135,
      "panels": [],
      "title": "Collectors",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Collector process restarts per collector over the dashboard time range (resets() of otelcol_process_uptime), worst first. Columns are Model, Unit and Restarts. Red = at least one restart; all green means nothing restarted. Change how many rows with the Top N variable.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "juju_model"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Model"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "juju_unit"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Unit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Restarts"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 0,
        "y": 87
      },
      "id": 124,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Restarts"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "topk($top_n, max by (juju_model, juju_unit) (resets({__name__=~\"otelcol_process_uptime.*\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"}[$__range])))",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Top collector restarts in range",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Collectors with the lowest process uptime, which is the most recently restarted, up to Top N. Every drop to zero is a restart.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "s"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "juju_model"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Model"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "juju_unit"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Unit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Uptime (s)"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 6,
        "y": 87
      },
      "id": 123,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "Uptime (s)"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "bottomk($top_n, max by (juju_model, juju_unit) ({__name__=~\"otelcol_process_uptime.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"}))",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Lowest collector uptime",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Collectors with the highest CPU usage (100% = one core), worst first, up to Top N.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "juju_model"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Model"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "juju_unit"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Unit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "CPU %"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 12,
        "y": 87
      },
      "id": 107,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "CPU %"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "topk($top_n, sum by (juju_model, juju_unit) (rate({__name__=~\"otelcol_process_cpu_seconds.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"}[$__rate_interval])) * 100)",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Top CPU usage",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Collectors with the highest memory use, worst by RSS first, up to Top N. RSS is otelcol_process_memory_rss; Heap is the Go heap in use.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "juju_model"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Model"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "juju_unit"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Unit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #A"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RSS"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value #B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Heap"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 18,
        "y": 87
      },
      "id": 121,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "RSS"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "topk($top_n, max by (juju_model, juju_unit) ({__name__=~\"otelcol_process_memory_rss.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"}))",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        },
        {
          "editorMode": "code",
          "expr": "max by (juju_model, juju_unit) ({__name__=~\"otelcol_process_runtime_heap_alloc_bytes.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"})",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "B"
        }
      ],
      "title": "Top memory per collector: RSS and Go heap",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Items dropped by filter processors: incoming minus outgoing items per unit and processor. A non-zero line means the filter is dropping telemetry (by design or not). Check the collector's processor configuration.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "items/s",
            "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": "never",
            "showValues": false,
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "/Refused.*/"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "red",
                  "mode": "fixed"
                }
              },
              {
                "id": "custom.axisPlacement",
                "value": "right"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 95
      },
      "id": 132,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (juju_model, juju_unit, processor) (${metric:value}({__name__=~\"otelcol_processor_incoming_items.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",processor=~\"filter/.*\"}[$__rate_interval]))\n-\nsum by (juju_model, juju_unit, processor) (${metric:value}({__name__=~\"otelcol_processor_outgoing_items.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\",processor=~\"filter/.*\"}[$__rate_interval]))",
          "legendFormat": "{{juju_model}}/{{juju_unit}} \u2014 {{processor}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Filter (processor) (${metric:text})",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Sending-queue fill level (size / capacity) per unit, exporter and data type. At 100% new data is dropped.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "queue full",
            "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": "line+area"
            }
          },
          "mappings": [],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "transparent",
                "value": 0
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 95
      },
      "id": 106,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "max by (juju_model, juju_unit, exporter, data_type) ({__name__=~\"otelcol_exporter_queue_size.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"}) / min by (juju_model, juju_unit, exporter, data_type) ({__name__=~\"otelcol_exporter_queue_capacity.*\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"})",
          "legendFormat": "{{juju_model}}/{{juju_unit}} {{data_type}} ({{exporter}})",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Exporter queue usage",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "The collector with the most otelcol_* series (the reference) plus the ones with the fewest, up to Top N. Read the lows against the top row: anything far below it has stopped reporting part of its self-telemetry. A collector that stopped entirely is absent from Mimir, so the metrics-missing alerts panel covers that case.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "juju_model"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Model"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "juju_unit"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Unit"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "role"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Role"
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "highest": {
                        "color": "blue",
                        "index": 0,
                        "text": "Highest"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Series"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 103
      },
      "id": 101,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Series"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "label_replace(topk(1, count by (juju_model, juju_unit) ({__name__=~\"otelcol_.+\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"})), \"role\", \"highest\", \"\", \"\") or bottomk($top_n, count by (juju_model, juju_unit) ({__name__=~\"otelcol_.+\",job=\"$job\",juju_model=~\"$juju_model\",juju_application=~\"$juju_application\",juju_model!~\"$exclude_model\"}))",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Collector self-metric series (highest and lowest)",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheusds}"
      },
      "description": "Firing HostMetricsMissing / AggregatorMetricsMissing alerts, by forwarding collector and alert name. A high count means that collector's consumers' data is not reaching the backend.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "_is_forwarded_from_aggregator"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Forwarded from"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "alertname"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Alert"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Firing"
              },
              {
                "id": "custom.align",
                "value": "right"
              },
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-text"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 103
      },
      "id": 213,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Firing"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "count by (_is_forwarded_from_aggregator, alertname) (ALERTS{alertstate=\"firing\",alertname=~\"HostMetricsMissing|AggregatorMetricsMissing\"})",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "title": "Firing \"metrics missing\" alerts, by forwarding collector",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "exclude": {
              "names": [
                "Time"
              ]
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "preload": false,
  "refresh": "30s",
  "schemaVersion": 42,
  "tags": [
    "cos",
    "template",
    "observability"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "text": "",
          "value": ""
        },
        "hide": 3,
        "includeAll": false,
        "label": "Mimir datasource",
        "name": "prometheusds",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "type": "datasource"
      },
      {
        "current": {
          "text": "",
          "value": ""
        },
        "hide": 3,
        "includeAll": false,
        "label": "Loki datasource",
        "name": "lokids",
        "options": [],
        "query": "loki",
        "refresh": 1,
        "regex": "",
        "type": "datasource"
      },
      {
        "current": {
          "text": "otelcol-internal",
          "value": "otelcol-internal"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheusds}"
        },
        "definition": "label_values({__name__=~\"otelcol_process_uptime.*\"}, job)",
        "description": "Mimir job under which the collectors expose their own telemetry. Usually `otelcol-internal`; some deployments use `otelcol`.",
        "includeAll": false,
        "label": "Collector job",
        "name": "job",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values({__name__=~\"otelcol_process_uptime.*\"}, job)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheusds}"
        },
        "definition": "label_values({__name__=~\"otelcol_process_uptime.*\"}, juju_model)",
        "description": "Which collector models the collector panels show. Values come from the collectors' own telemetry, so backend-only models are not listed.",
        "includeAll": true,
        "label": "Collector model(s)",
        "multi": true,
        "name": "juju_model",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values({__name__=~\"otelcol_process_uptime.*\"}, juju_model)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheusds}"
        },
        "definition": "label_values({__name__=~\"otelcol_process_uptime.*\", juju_model=~\"$juju_model\"}, juju_application)",
        "description": "Which collector applications the collector panels show, within the selected model(s).",
        "includeAll": true,
        "label": "Collector application(s)",
        "multi": true,
        "name": "juju_application",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values({__name__=~\"otelcol_process_uptime.*\", juju_model=~\"$juju_model\"}, juju_application)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": "a^",
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheusds}"
        },
        "definition": "label_values({__name__=~\"otelcol_process_uptime.*\"}, juju_model)",
        "description": "Hide collectors from these models in the Edge and resource panels (the backend panels are not affected).",
        "includeAll": true,
        "label": "Exclude collector model(s)",
        "multi": true,
        "name": "exclude_model",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values({__name__=~\"otelcol_process_uptime.*\"}, juju_model)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheusds}"
        },
        "definition": "label_values(up, juju_model)",
        "description": "The Juju model that hosts the COS applications. The High availability and Backends rows are scoped to this model. Leave at All until you pick it, so those rows stay empty rather than silently scoping to another model.",
        "includeAll": true,
        "label": "COS model",
        "name": "cos_model",
        "options": [],
        "query": {
          "qryType": 1,
          "query": "label_values(up, juju_model)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query",
        "allValue": "a^"
      },
      {
        "current": {
          "text": "5",
          "value": "5"
        },
        "description": "How many collectors or applications the restart panels show, worst offender first.",
        "includeAll": false,
        "label": "Top N",
        "name": "top_n",
        "options": [],
        "query": "1 : 1, 3 : 3, 5 : 5, 10 : 10",
        "type": "custom",
        "valuesFormat": "csv"
      },
      {
        "current": {
          "text": "rate",
          "value": "rate"
        },
        "description": "The filter panel: per-second rate, or increase per interval.",
        "includeAll": false,
        "label": "Base metric",
        "name": "metric",
        "options": [],
        "query": "Rate : rate, Count : increase",
        "type": "custom",
        "valuesFormat": "csv",
        "hide": 3
      }
    ]
  },
  "time": {
    "from": "now-2h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "COS deployment overview",
  "uid": "cos-deployment-overview",
  "version": 0,
  "weekStart": ""
}
