{
  "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": "Operational dashboard for the logback-kafka-appender. Visualizes throughput, fallback routing reasons, send latency, queue saturation, and circuit-breaker state per topic class. Requires Prometheus as the metrics scraper and histogram buckets enabled for kafka.appender.send.duration (management.metrics.distribution.percentiles-histogram.kafka.appender.send.duration=true).",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0},
      "id": 100,
      "panels": [],
      "title": "Health overview",
      "type": "row"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Events accepted by the appender per second, summed across all topic classes. The baseline throughput of the service's logging pipeline.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "thresholds"},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null}
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {"h": 4, "w": 6, "x": 0, "y": 1},
      "id": 1,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "sum(rate(kafka_appender_events_accepted_total{application=~\"$application\",appender=~\"$appender\"}[1m]))",
          "legendFormat": "events/s",
          "refId": "A"
        }
      ],
      "title": "Throughput",
      "type": "stat"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Fraction of events routed to the fallback appender instead of Kafka. A healthy steady-state is 0 %; any sustained non-zero rate means Kafka delivery is failing for some classes or reasons.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "thresholds"},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null},
              {"color": "yellow", "value": 1},
              {"color": "red", "value": 5}
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {"h": 4, "w": 6, "x": 6, "y": 1},
      "id": 2,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "100 * sum(rate(kafka_appender_events_fallback_total{application=~\"$application\",appender=~\"$appender\"}[5m])) / clamp_min(sum(rate(kafka_appender_events_accepted_total{application=~\"$application\",appender=~\"$appender\"}[5m])), 0.001)",
          "legendFormat": "fallback %",
          "refId": "A"
        }
      ],
      "title": "Fallback rate (5m)",
      "type": "stat"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Events dropped by the FallbackDispatcher per second. Any non-zero value means real data loss — the operator's configured fallback appender could not keep up, or the dispatcher was forced to shut down with events still queued. This metric should be zero in a healthy system.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "thresholds"},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null},
              {"color": "red", "value": 0.0001}
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {"h": 4, "w": 6, "x": 12, "y": 1},
      "id": 3,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "sum(rate(kafka_appender_fallback_dropped_total{application=~\"$application\",appender=~\"$appender\"}[5m]))",
          "legendFormat": "drops/s",
          "refId": "A"
        }
      ],
      "title": "Drop rate",
      "type": "stat"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Number of circuit breakers currently in the OPEN state. Any non-zero value means Kafka is unreachable for at least one topic class.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "thresholds"},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null},
              {"color": "red", "value": 1}
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {"h": 4, "w": 6, "x": 18, "y": 1},
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "sum(resilience4j_circuitbreaker_state{application=~\"$application\",name=~\"kafka-appender-.*\",state=\"open\"})",
          "legendFormat": "open breakers",
          "refId": "A"
        }
      ],
      "title": "Breakers open",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5},
      "id": 101,
      "panels": [],
      "title": "Throughput & loss",
      "type": "row"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Per-topic-class throughput. Sustained drops indicate either a quiet service or an upstream stop (e.g. logback level changed). Sustained spikes indicate an error storm — check application logs.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "palette-classic"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "none"},
            "thresholdsStyle": {"mode": "off"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [{"color": "green", "value": null}]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 6},
      "id": 5,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "sum by (topic_class) (rate(kafka_appender_events_accepted_total{application=~\"$application\",appender=~\"$appender\"}[1m]))",
          "legendFormat": "{{topic_class}}",
          "refId": "A"
        }
      ],
      "title": "Events accepted per topic class",
      "type": "timeseries"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Fallback routing broken down by reason. The four reasons have very different operational meanings:\n\n• breaker.open — Kafka is unreachable for that class (cluster failure)\n• send.error — individual records rejected by Kafka (often: payload too large, leader not available)\n• throttle — half-open recovery is in progress (transient)\n• encoder.error — application bug in the encoder or routing (rare)",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "palette-classic"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 30,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "normal"},
            "thresholdsStyle": {"mode": "off"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [{"color": "green", "value": null}]
          },
          "unit": "reqps"
        },
        "overrides": [
          {"matcher": {"id": "byName", "options": "breaker.open"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}]},
          {"matcher": {"id": "byName", "options": "send.error"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "orange"}}]},
          {"matcher": {"id": "byName", "options": "throttle"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "yellow"}}]},
          {"matcher": {"id": "byName", "options": "encoder.error"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "purple"}}]}
        ]
      },
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 6},
      "id": 6,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "sum by (reason) (rate(kafka_appender_events_fallback_total{application=~\"$application\",appender=~\"$appender\"}[1m]))",
          "legendFormat": "{{reason}}",
          "refId": "A"
        }
      ],
      "title": "Fallback events by reason",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 14},
      "id": 102,
      "panels": [],
      "title": "Send latency",
      "type": "row"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "p50 / p95 / p99 send latency per topic class. Healthy baseline is sub-50 ms p99 for a co-located Kafka cluster. Sustained p99 above 200 ms suggests broker congestion or a network issue. Spikes correlated with throughput spikes suggest producer-buffer saturation — consider tuning batch.size, linger.ms, or max.block.ms.\n\nRequires histogram buckets to be enabled in Spring Boot:\nmanagement.metrics.distribution.percentiles-histogram.kafka.appender.send.duration=true",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "palette-classic"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "none"},
            "thresholdsStyle": {"mode": "off"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [{"color": "green", "value": null}]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {"h": 8, "w": 16, "x": 0, "y": 15},
      "id": 7,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "histogram_quantile(0.50, sum by (topic_class, le) (rate(kafka_appender_send_duration_seconds_bucket{application=~\"$application\",appender=~\"$appender\",outcome=\"success\"}[5m])))",
          "legendFormat": "p50 {{topic_class}}",
          "refId": "A"
        },
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "histogram_quantile(0.95, sum by (topic_class, le) (rate(kafka_appender_send_duration_seconds_bucket{application=~\"$application\",appender=~\"$appender\",outcome=\"success\"}[5m])))",
          "legendFormat": "p95 {{topic_class}}",
          "refId": "B"
        },
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "histogram_quantile(0.99, sum by (topic_class, le) (rate(kafka_appender_send_duration_seconds_bucket{application=~\"$application\",appender=~\"$appender\",outcome=\"success\"}[5m])))",
          "legendFormat": "p99 {{topic_class}}",
          "refId": "C"
        }
      ],
      "title": "Send latency percentiles (success only)",
      "type": "timeseries"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Ratio of successful vs failed sends. A non-zero error rate over time suggests records are reaching the cluster but being rejected — often RecordTooLargeException (silently ignored by the breaker by design) or upstream broker errors.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "palette-classic"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 30,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "normal"},
            "thresholdsStyle": {"mode": "off"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [{"color": "green", "value": null}]
          },
          "unit": "reqps"
        },
        "overrides": [
          {"matcher": {"id": "byName", "options": "success"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "green"}}]},
          {"matcher": {"id": "byName", "options": "error"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}]}
        ]
      },
      "gridPos": {"h": 8, "w": 8, "x": 16, "y": 15},
      "id": 8,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "bottom", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "sum by (outcome) (rate(kafka_appender_send_duration_seconds_count{application=~\"$application\",appender=~\"$appender\"}[1m]))",
          "legendFormat": "{{outcome}}",
          "refId": "A"
        }
      ],
      "title": "Send outcomes",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 23},
      "id": 103,
      "panels": [],
      "title": "Fallback pipeline",
      "type": "row"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "FallbackDispatcher queue saturation, as a fraction of the configured capacity. Sustained values above 50 % mean the fallback appender (typically a FileAppender) is slower than the event arrival rate — events will start dropping if this trend continues.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "thresholds"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "scheme",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "none"},
            "thresholdsStyle": {"mode": "line"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null},
              {"color": "yellow", "value": 0.5},
              {"color": "red", "value": 0.8}
            ]
          },
          "unit": "percentunit",
          "max": 1,
          "min": 0
        },
        "overrides": []
      },
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24},
      "id": 9,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "kafka_appender_fallback_queue_size{application=~\"$application\",appender=~\"$appender\"} / clamp_min(kafka_appender_fallback_queue_capacity{application=~\"$application\",appender=~\"$appender\"}, 1)",
          "legendFormat": "{{appender}}",
          "refId": "A"
        }
      ],
      "title": "Fallback queue saturation",
      "type": "timeseries"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Cumulative drop count since the appender started. Any non-zero growth here is the most serious alarm in this dashboard: events have been lost both from Kafka delivery AND from the fallback path. Investigate the fallback appender's downstream (disk full, mount lost, file rotation hang).",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "thresholds"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 30,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "none"},
            "thresholdsStyle": {"mode": "off"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null},
              {"color": "red", "value": 1}
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 24},
      "id": 10,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "increase(kafka_appender_fallback_dropped_total{application=~\"$application\",appender=~\"$appender\"}[$__range])",
          "legendFormat": "{{appender}}",
          "refId": "A"
        }
      ],
      "title": "Dropped events (range increase)",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {"h": 1, "w": 24, "x": 0, "y": 32},
      "id": 104,
      "panels": [],
      "title": "Circuit breaker",
      "type": "row"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Circuit-breaker state per topic class. CLOSED is the healthy state. OPEN means Kafka is unreachable for that class and events are going to the fallback. HALF_OPEN is the recovery probe phase — should be transient (~30 seconds).\n\nThe state metric uses 0/1 values per state label; the visible color reflects which state currently has value 1.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "palette-classic"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 30,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "stepBefore",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "none"},
            "thresholdsStyle": {"mode": "off"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [{"color": "green", "value": null}]
          },
          "unit": "short",
          "max": 1.1,
          "min": 0
        },
        "overrides": [
          {"matcher": {"id": "byRegexp", "options": ".*closed.*"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "green"}}]},
          {"matcher": {"id": "byRegexp", "options": ".*half_open.*"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "yellow"}}]},
          {"matcher": {"id": "byRegexp", "options": ".*open.*"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}]}
        ]
      },
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 33},
      "id": 11,
      "options": {
        "legend": {"calcs": ["lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "resilience4j_circuitbreaker_state{application=~\"$application\",name=~\"kafka-appender-.*\"}",
          "legendFormat": "{{name}} ({{state}})",
          "refId": "A"
        }
      ],
      "title": "Circuit breaker state",
      "type": "timeseries"
    },
    {
      "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
      "description": "Recent failure rate as computed by Resilience4j in its sliding window. Values above 50 % (the default trip threshold) cause the breaker to transition to OPEN.\n\nIgnored exceptions (RecordTooLargeException, InvalidTopicException, etc.) are NOT counted toward this rate — by design.",
      "fieldConfig": {
        "defaults": {
          "color": {"mode": "palette-classic"},
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {"legend": false, "tooltip": false, "viz": false},
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {"type": "linear"},
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {"group": "A", "mode": "none"},
            "thresholdsStyle": {"mode": "line+area"}
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {"color": "green", "value": null},
              {"color": "yellow", "value": 30},
              {"color": "red", "value": 50}
            ]
          },
          "unit": "percent",
          "max": 100,
          "min": -10
        },
        "overrides": []
      },
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 33},
      "id": 12,
      "options": {
        "legend": {"calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "right", "showLegend": true},
        "tooltip": {"mode": "multi", "sort": "desc"}
      },
      "targets": [
        {
          "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
          "editorMode": "code",
          "expr": "resilience4j_circuitbreaker_failure_rate{application=~\"$application\",name=~\"kafka-appender-.*\"}",
          "legendFormat": "{{name}}",
          "refId": "A"
        }
      ],
      "title": "Circuit breaker failure rate",
      "type": "timeseries"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 38,
  "style": "dark",
  "tags": ["kafka", "logback", "logging"],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "Prometheus"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "DS_PROMETHEUS",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {"selected": false, "text": "All", "value": "$__all"},
        "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
        "definition": "label_values(kafka_appender_events_accepted_total, application)",
        "hide": 0,
        "includeAll": true,
        "label": "Application",
        "multi": true,
        "name": "application",
        "options": [],
        "query": {
          "query": "label_values(kafka_appender_events_accepted_total, application)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {"selected": false, "text": "All", "value": "$__all"},
        "datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
        "definition": "label_values(kafka_appender_events_accepted_total{application=~\"$application\"}, appender)",
        "hide": 0,
        "includeAll": true,
        "label": "Appender",
        "multi": true,
        "name": "appender",
        "options": [],
        "query": {
          "query": "label_values(kafka_appender_events_accepted_total{application=~\"$application\"}, appender)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {"from": "now-1h", "to": "now"},
  "timepicker": {},
  "timezone": "",
  "title": "Kafka Appender",
  "uid": "kafka-appender",
  "version": 1,
  "weekStart": ""
}
