{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#33FF00",
                "value": null
              },
              {
                "color": "#FFCC00",
                "value": 0.7
              },
              {
                "color": "#FF4444",
                "value": 0.9
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "options": {
        "colorMode": "background_gradient",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "fields": "",
          "calcs": [
            "lastNotNull"
          ]
        },
        "text": {},
        "textMode": "auto",
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "count(up{job=\"$job_node\"}==1) / count(up{job=\"$job_node\"}) or vector(0)",
          "refId": "A",
          "format": "time_series"
        }
      ],
      "title": "Overall Health Score",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#33FF00",
                "value": null
              },
              {
                "color": "#FFCC00",
                "value": 100
              },
              {
                "color": "#FF4444",
                "value": 500
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 6,
        "y": 0
      },
      "id": 2,
      "options": {
        "colorMode": "background_gradient",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "fields": "",
          "calcs": [
            "lastNotNull"
          ]
        },
        "text": {},
        "textMode": "auto",
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "histogram_quantile(0.5, rate(http_request_duration_seconds_bucket[5m])) * 1000",
          "refId": "A",
          "format": "time_series"
        }
      ],
      "title": "Avg Request Latency (p50)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#33FF00",
                "value": null
              },
              {
                "color": "#FFCC00",
                "value": 0.01
              },
              {
                "color": "#FF4444",
                "value": 0.05
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 12,
        "y": 0
      },
      "id": 3,
      "options": {
        "colorMode": "background_gradient",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "fields": "",
          "calcs": [
            "lastNotNull"
          ]
        },
        "text": {},
        "textMode": "auto",
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m])) / sum(rate(http_requests_total[5m]))",
          "refId": "A",
          "format": "time_series"
        }
      ],
      "title": "Total Error Rate",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#33FF00",
                "value": null
              },
              {
                "color": "#FFCC00",
                "value": 0.6
              },
              {
                "color": "#FF4444",
                "value": 0.85
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 4,
      "options": {
        "colorMode": "background_gradient",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "fields": "",
          "calcs": [
            "lastNotNull"
          ]
        },
        "text": {},
        "textMode": "auto",
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m]))",
          "refId": "A",
          "format": "time_series"
        }
      ],
      "title": "Avg CPU Saturation",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "custom": {
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 10,
              "gradientMode": "none",
              "hideFrom": {
                "tooltip": false,
                "viz": false,
                "legend": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 2,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "never",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Latency p50"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#33FF00"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Latency p95"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#00A3FF"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Error Rate"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FF4444"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Saturation"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#FFCC00"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 6
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [
            "last",
            "max"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        },
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "histogram_quantile(0.5, rate(http_request_duration_seconds_bucket[5m])) * 1000",
          "legendFormat": "Latency p50",
          "refId": "A"
        },
        {
          "expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) * 1000",
          "legendFormat": "Latency p95",
          "refId": "B"
        },
        {
          "expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m])) / sum(rate(http_requests_total[5m])) * 100",
          "legendFormat": "Error Rate",
          "refId": "C"
        },
        {
          "expr": "avg(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) * 100",
          "legendFormat": "Saturation",
          "refId": "D"
        }
      ],
      "title": "Golden Signals Summary",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 6
      },
      "id": 6,
      "options": {
        "displayMode": "table",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "displayName": "Status",
            "desc": false
          }
        ],
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "up{job=\"$job_node\"}",
          "format": "table",
          "instant": true,
          "refId": "A"
        }
      ],
      "title": "Node Status Grid",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": false
            },
            "indexByName": {},
            "renameByName": {
              "instance": "Node",
              "job": "Job",
              "Value": "Status"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            }
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#33FF00",
                "value": null
              },
              {
                "color": "#FFCC00",
                "value": 70
              },
              {
                "color": "#FF4444",
                "value": 90
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 15
      },
      "id": 7,
      "options": {
        "displayMode": "gradient",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "fields": "",
          "calcs": [
            "lastNotNull"
          ]
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {},
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "count(kube_pod_status_phase{phase=\"Running\"} == 1) by (phase) or vector(0)",
          "legendFormat": "Running",
          "refId": "A"
        },
        {
          "expr": "count(kube_pod_status_phase{phase=\"Pending\"} == 1) by (phase) or vector(0)",
          "legendFormat": "Pending",
          "refId": "B"
        },
        {
          "expr": "count(kube_pod_status_phase{phase=\"Failed\"} == 1) by (phase) or vector(0)",
          "legendFormat": "Failed",
          "refId": "C"
        }
      ],
      "title": "Kubernetes Pod Status",
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "CPU (cores)"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "#33FF00"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 15
      },
      "id": 8,
      "options": {
        "displayMode": "table",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "displayName": "CPU (cores)",
            "desc": true
          }
        ],
        "transparent": true
      },
      "pluginVersion": "10.2.0",
      "targets": [
        {
          "expr": "topk(5, sum by (pod_name) (rate(container_cpu_usage_seconds_total[5m])))",
          "format": "table",
          "instant": true,
          "refId": "A"
        }
      ],
      "title": "Top Resource Consumers",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": false
            },
            "indexByName": {},
            "renameByName": {
              "pod_name": "Pod Name",
              "Value": "CPU (cores)"
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 39,
  "tags": [
    "retrodash",
    "golden-signals",
    "overview"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "prometheus"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "DS_PROMETHEUS",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "datasource"
      },
      {
        "name": "job_node",
        "type": "custom",
        "label": "Node Exporter Job",
        "current": {
          "text": "node-exporter",
          "value": "node-exporter"
        },
        "options": [
          {
            "text": "node-exporter",
            "value": "node-exporter",
            "selected": true
          },
          {
            "text": "node",
            "value": "node",
            "selected": false
          }
        ],
        "query": "node-exporter,node"
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "RetroDash // OVERVIEW",
  "uid": "retrodash-overview",
  "version": 1,
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "Prometheus datasource",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ]
}
