apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana-dashboards
  namespace: monitoring-v2
data:
  dashboardsconf.yaml: |-
    apiVersion: 1
    providers:
    - name: dashboards
      type: file
      updateIntervalSeconds: 30
      options:
        path: /etc/grafana/provisioning/dashboards/
        foldersFromFilesStructure: true

  exporterapp.json: |-
    {
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": "prometheus",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "type": "dashboard"
        }
      ]
    },
    "editable": true,
    "fiscalYearStartMonth": 0,
    "gnetId": null,
    "graphTooltip": 0,
    "id": 5,
    "links": [],
    "liveNow": false,
    "panels": [
      {
        "datasource": "prometheus",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "custom": {
              "fillOpacity": 100,
              "lineWidth": 3
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "red",
                  "value": null
                },
                {
                  "color": "green",
                  "value": 1
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "id": 6,
        "options": {
          "colWidth": 0.77,
          "legend": {
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "rowHeight": 0.77,
          "showValue": "never",
          "tooltip": {
            "mode": "none"
          }
        },
        "targets": [
          {
            "exemplar": true,
            "expr": "sample_external_url_up",
            "format": "heatmap",
            "instant": false,
            "interval": "50",
            "intervalFactor": 3,
            "legendFormat": "{{endpoint}}",
            "refId": "A"
          }
        ],
        "title": "Site Status",
        "type": "status-history"
      },
      {
        "datasource": "prometheus",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 16,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 9,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "ms"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 7
        },
        "id": 13,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "single"
          }
        },
        "targets": [
          {
            "exemplar": true,
            "expr": "sample_external_url_response_ms{endpoint=\"https://httpstat.us/200\"}",
            "format": "time_series",
            "interval": "",
            "legendFormat": "{{endpoint}}",
            "refId": "A"
          },
          {
            "exemplar": true,
            "expr": "sample_external_url_response_ms{endpoint=\"https://httpstat.us/503\"}",
            "format": "time_series",
            "hide": false,
            "interval": "",
            "legendFormat": "{{endpoint}}",
            "refId": "B"
          }
        ],
        "title": "Response time",
        "type": "timeseries"
      },
      {
        "datasource": "prometheus",
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "ms"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 6,
          "x": 12,
          "y": 7
        },
        "id": 8,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "auto"
        },
        "pluginVersion": "8.2.3",
        "targets": [
          {
            "exemplar": true,
            "expr": "sample_external_url_response_ms{endpoint=\"https://httpstat.us/200\"}",
            "interval": "",
            "legendFormat": "",
            "refId": "A"
          }
        ],
        "title": "Response time https://httpstat.us/200",
        "type": "stat"
      },
      {
        "datasource": "prometheus",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "ms"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 6,
          "x": 18,
          "y": 7
        },
        "id": 10,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "auto"
        },
        "pluginVersion": "8.2.3",
        "targets": [
          {
            "exemplar": true,
            "expr": "sample_external_url_response_ms{endpoint=\"https://httpstat.us/503\"}",
            "interval": "",
            "legendFormat": "",
            "refId": "A"
          }
        ],
        "title": "Response time https://httpstat.us/503",
        "type": "stat"
      },
      {
        "datasource": null,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 15
        },
        "id": 12,
        "title": "Row title",
        "type": "row"
      }
    ],
    "refresh": "",
    "schemaVersion": 31,
    "style": "dark",
    "tags": [],
    "templating": {
      "list": []
    },
    "time": {
      "from": "now-15m",
      "to": "now"
    },
    "timepicker": {},
    "timezone": "",
    "title": "Status serverx",
    "uid": "abababab",
    "version": 5
    }