apiVersion: v1
data:
  general.json: |-
    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "editable": true,
      "gnetId": null,
      "graphTooltip": 0,
      "id": 172,
      "iteration": 1622473480763,
      "links": [],
      "panels": [
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 18,
          "panels": [
            {
              "content": "",
              "datasource": null,
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "gridPos": {
                "h": 5,
                "w": 16,
                "x": 0,
                "y": 9
              },
              "id": 89,
              "links": [],
              "mode": "markdown",
              "options": {
                "content": "# Policies\n Remember to save updates to panel json/definition to [policies-ui-backend repo](https://github.com/RedHatInsights/policies-ui-backend/blob/master/.rhcicd/grafana-dashboard-insights-policies.configmap.yaml).\n\n To view:\n- Prod metrics, use [the prod Grafana instance](https://grafana.app-sre.devshift.net/d/zEvWtW6Mz/p?orgId=1&refresh=5m): select \"datasource=crcp01ue1-prometheus\" \n \n- Stage metrics, use [the stage Grafana instance](https://grafana.stage.devshift.net/d/zEvWtW6Mz/p?orgId=1&refresh=5m): select \"datasource=crcs02ue1-prometheus\" ",
                "mode": "markdown"
              },
              "pluginVersion": "7.1.0",
              "title": "",
              "transparent": true,
              "type": "text"
            },
            {
              "cacheTimeout": null,
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "#299c46",
                "rgba(237, 129, 40, 0.89)",
                "#d44a3a"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 5,
                "w": 8,
                "x": 16,
                "y": 9
              },
              "id": 38,
              "interval": null,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": true,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "100 * kubelet_volume_stats_used_bytes{persistentvolumeclaim=\"policies-engine-data\"} / (kubelet_volume_stats_used_bytes{persistentvolumeclaim=\"policies-engine-data\"} + kubelet_volume_stats_available_bytes{persistentvolumeclaim=\"policies-engine-data\"})",
                  "format": "time_series",
                  "groupBy": [
                    {
                      "params": [
                        "$__interval"
                      ],
                      "type": "time"
                    },
                    {
                      "params": [
                        "null"
                      ],
                      "type": "fill"
                    }
                  ],
                  "instant": true,
                  "intervalFactor": 1,
                  "orderByTime": "ASC",
                  "policy": "default",
                  "refId": "A",
                  "resultFormat": "time_series",
                  "select": [
                    [
                      {
                        "params": [
                          "value"
                        ],
                        "type": "field"
                      },
                      {
                        "params": [],
                        "type": "mean"
                      }
                    ]
                  ],
                  "tags": []
                }
              ],
              "thresholds": "60,80",
              "title": "Policies Engine persistent volume disk usage",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "title": "Details",
          "type": "row"
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 1
          },
          "id": 16,
          "panels": [
            {
              "cacheTimeout": null,
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 3,
                "w": 5,
                "x": 0,
                "y": 10
              },
              "id": 90,
              "interval": null,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "repeatDirection": "h",
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": true,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "up{service=\"policies-ui-backend\"}",
                  "format": "time_series",
                  "groupBy": [
                    {
                      "params": [
                        "$__interval"
                      ],
                      "type": "time"
                    },
                    {
                      "params": [
                        "null"
                      ],
                      "type": "fill"
                    }
                  ],
                  "instant": true,
                  "intervalFactor": 1,
                  "legendFormat": "",
                  "orderByTime": "ASC",
                  "policy": "default",
                  "refId": "A",
                  "resultFormat": "time_series",
                  "select": [
                    [
                      {
                        "params": [
                          "value"
                        ],
                        "type": "field"
                      },
                      {
                        "params": [],
                        "type": "mean"
                      }
                    ]
                  ],
                  "tags": []
                }
              ],
              "thresholds": "0,1",
              "timeFrom": null,
              "title": "Up/Down \"policies-ui-backend\"",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "Up",
                  "value": "1"
                },
                {
                  "op": "=",
                  "text": "Down",
                  "value": "0"
                }
              ],
              "valueName": "min"
            },
            {
              "cacheTimeout": null,
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "#299c46",
                "rgba(237, 129, 40, 0.89)",
                "#d44a3a"
              ],
              "datasource": "$datasource",
              "description": "This shows the number of restarts for the latest pod that's running in that time period",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 3,
                "w": 6,
                "x": 5,
                "y": 10
              },
              "id": 2,
              "interval": null,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "maxPerRow": 12,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "repeat": "service",
              "repeatDirection": "h",
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "kube_pod_container_status_restarts_total{container=\"policies-ui-backend\"}",
                  "format": "time_series",
                  "groupBy": [
                    {
                      "params": [
                        "$__interval"
                      ],
                      "type": "time"
                    },
                    {
                      "params": [
                        "null"
                      ],
                      "type": "fill"
                    }
                  ],
                  "instant": true,
                  "intervalFactor": 1,
                  "legendFormat": "",
                  "orderByTime": "ASC",
                  "policy": "default",
                  "refId": "A",
                  "resultFormat": "time_series",
                  "select": [
                    [
                      {
                        "params": [
                          "value"
                        ],
                        "type": "field"
                      },
                      {
                        "params": [],
                        "type": "mean"
                      }
                    ]
                  ],
                  "tags": []
                }
              ],
              "thresholds": "1,5",
              "title": "restarts \"policies-ui-backend\"",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "cacheTimeout": null,
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 3,
                "w": 5,
                "x": 11,
                "y": 10
              },
              "id": 32,
              "interval": null,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "repeat": "service",
              "repeatDirection": "h",
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": true,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "up{service=\"policies-engine\"}",
                  "format": "time_series",
                  "groupBy": [
                    {
                      "params": [
                        "$__interval"
                      ],
                      "type": "time"
                    },
                    {
                      "params": [
                        "null"
                      ],
                      "type": "fill"
                    }
                  ],
                  "instant": true,
                  "intervalFactor": 1,
                  "legendFormat": "",
                  "orderByTime": "ASC",
                  "policy": "default",
                  "refId": "A",
                  "resultFormat": "time_series",
                  "select": [
                    [
                      {
                        "params": [
                          "value"
                        ],
                        "type": "field"
                      },
                      {
                        "params": [],
                        "type": "mean"
                      }
                    ]
                  ],
                  "tags": []
                }
              ],
              "thresholds": "0,1",
              "timeFrom": null,
              "title": "Up/Down \"policies-engine\"",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "Up",
                  "value": "1"
                },
                {
                  "op": "=",
                  "text": "Down",
                  "value": "0"
                }
              ],
              "valueName": "min"
            },
            {
              "cacheTimeout": null,
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "#299c46",
                "rgba(237, 129, 40, 0.89)",
                "#d44a3a"
              ],
              "datasource": "$datasource",
              "description": "This shows the number of restarts for the latest pod that's running in that time period",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 3,
                "w": 5,
                "x": 16,
                "y": 10
              },
              "id": 91,
              "interval": null,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "maxPerRow": 12,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "repeatDirection": "h",
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "kube_pod_container_status_restarts_total{container=\"policies-engine\"}",
                  "format": "time_series",
                  "groupBy": [
                    {
                      "params": [
                        "$__interval"
                      ],
                      "type": "time"
                    },
                    {
                      "params": [
                        "null"
                      ],
                      "type": "fill"
                    }
                  ],
                  "instant": true,
                  "intervalFactor": 1,
                  "legendFormat": "",
                  "orderByTime": "ASC",
                  "policy": "default",
                  "refId": "A",
                  "resultFormat": "time_series",
                  "select": [
                    [
                      {
                        "params": [
                          "value"
                        ],
                        "type": "field"
                      },
                      {
                        "params": [],
                        "type": "mean"
                      }
                    ]
                  ],
                  "tags": []
                }
              ],
              "thresholds": "1,5",
              "title": "restarts \"policies-engine\"",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "title": "Status",
          "type": "row"
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 2
          },
          "id": 14,
          "panels": [
            {
              "cacheTimeout": null,
              "colorBackground": true,
              "colorValue": false,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 2,
                "w": 5,
                "x": 0,
                "y": 3
              },
              "id": 11,
              "interval": null,
              "links": [
                {
                  "targetBlank": true,
                  "url": ""
                }
              ],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "#f9d9f9",
                "show": false
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "sum(increase(api_3scale_gateway_api_status{exported_service=\"policies\"}[$__range]))",
                  "interval": "5m",
                  "refId": "A"
                }
              ],
              "thresholds": "1,5",
              "title": "3scale API Requests",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "cacheTimeout": null,
              "colorBackground": true,
              "colorValue": false,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 2,
                "w": 5,
                "x": 5,
                "y": 3
              },
              "id": 98,
              "interval": null,
              "links": [
                {
                  "targetBlank": true,
                  "url": ""
                }
              ],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "#f9d9f9",
                "show": false
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"2xx\"})",
                  "interval": "5m",
                  "refId": "A"
                }
              ],
              "thresholds": "1,5",
              "title": "2xx Status",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "cacheTimeout": null,
              "colorBackground": true,
              "colorValue": false,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 2,
                "w": 5,
                "x": 10,
                "y": 3
              },
              "id": 99,
              "interval": null,
              "links": [
                {
                  "targetBlank": true,
                  "url": ""
                }
              ],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "#f9d9f9",
                "show": false
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"4xx\"})",
                  "interval": "5m",
                  "refId": "A"
                }
              ],
              "thresholds": "1,5",
              "title": "4xx Status",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "cacheTimeout": null,
              "colorBackground": true,
              "colorValue": false,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 2,
                "w": 5,
                "x": 0,
                "y": 5
              },
              "id": 94,
              "interval": null,
              "links": [
                {
                  "targetBlank": true,
                  "url": ""
                }
              ],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "#f9d9f9",
                "show": false
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"2xx\"}) + sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"3xx\"}) + sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"4xx\"}) + sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"5xx\"})",
                  "interval": "5m",
                  "refId": "A"
                }
              ],
              "thresholds": "1,5",
              "title": "HTTP Requests",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "cacheTimeout": null,
              "colorBackground": true,
              "colorValue": false,
              "colors": [
                "#299c46",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 2,
                "w": 5,
                "x": 5,
                "y": 5
              },
              "id": 97,
              "interval": null,
              "links": [
                {
                  "targetBlank": true,
                  "url": ""
                }
              ],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "#f9d9f9",
                "show": false
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"3xx\"}) ",
                  "interval": "5m",
                  "refId": "A"
                }
              ],
              "thresholds": "1,5",
              "title": "3xx Status",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "cacheTimeout": null,
              "colorBackground": true,
              "colorValue": false,
              "colors": [
                "#d44a3a",
                "rgba(237, 129, 40, 0.89)",
                "#299c46"
              ],
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "gridPos": {
                "h": 2,
                "w": 5,
                "x": 10,
                "y": 5
              },
              "id": 100,
              "interval": null,
              "links": [
                {
                  "targetBlank": true,
                  "url": ""
                }
              ],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "nullText": null,
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "#f9d9f9",
                "show": false
              },
              "tableColumn": "",
              "targets": [
                {
                  "expr": "sum(api_3scale_gateway_api_status{exported_service=\"policies\",status=\"5xx\"})",
                  "interval": "5m",
                  "refId": "A"
                }
              ],
              "thresholds": "1,5",
              "title": "5xx Status",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "title": "3Scale",
          "type": "row"
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 3
          },
          "id": 12,
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "fill": 1,
              "fillGradient": 0,
              "gridPos": {
                "h": 8,
                "w": 12,
                "x": 0,
                "y": 4
              },
              "hiddenSeries": false,
              "id": 102,
              "interval": "",
              "legend": {
                "avg": false,
                "current": false,
                "max": false,
                "min": false,
                "show": true,
                "total": false,
                "values": false
              },
              "lines": true,
              "linewidth": 1,
              "nullPointMode": "null",
              "options": {
                "alertThreshold": true
              },
              "percentage": false,
              "pluginVersion": "7.2.1",
              "pointradius": 2,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(irate(kafka_server_brokertopicmetrics_messagesin_total{topic=~\"platform.notifications.ingress\",topic!=\"\"}[1m]))",
                  "interval": "",
                  "legendFormat": "",
                  "refId": "A"
                }
              ],
              "thresholds": [],
              "timeFrom": null,
              "timeRegions": [],
              "timeShift": null,
              "title": "Messages In Per Second",
              "tooltip": {
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "buckets": null,
                "mode": "time",
                "name": null,
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                },
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                }
              ],
              "yaxis": {
                "align": false,
                "alignLevel": null
              }
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {}
                },
                "overrides": []
              },
              "fill": 1,
              "fillGradient": 0,
              "gridPos": {
                "h": 8,
                "w": 12,
                "x": 12,
                "y": 4
              },
              "hiddenSeries": false,
              "id": 103,
              "interval": "",
              "legend": {
                "avg": false,
                "current": false,
                "max": false,
                "min": false,
                "show": true,
                "total": false,
                "values": false
              },
              "lines": true,
              "linewidth": 1,
              "nullPointMode": "null",
              "options": {
                "alertThreshold": true
              },
              "percentage": false,
              "pluginVersion": "7.2.1",
              "pointradius": 2,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(increase(kafka_server_brokertopicmetrics_bytesout_total{topic=~\"platform.notifications.ingress\"}[1m])) by (topic)",
                  "interval": "",
                  "legendFormat": "",
                  "refId": "A"
                }
              ],
              "thresholds": [],
              "timeFrom": null,
              "timeRegions": [],
              "timeShift": null,
              "title": "Bytes Output Per Second",
              "tooltip": {
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "buckets": null,
                "mode": "time",
                "name": null,
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                },
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                }
              ],
              "yaxis": {
                "align": false,
                "alignLevel": null
              }
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {},
                  "links": []
                },
                "overrides": []
              },
              "fill": 1,
              "fillGradient": 0,
              "gridPos": {
                "h": 8,
                "w": 24,
                "x": 0,
                "y": 12
              },
              "hiddenSeries": false,
              "id": 85,
              "legend": {
                "avg": false,
                "current": false,
                "max": false,
                "min": false,
                "show": true,
                "total": false,
                "values": false
              },
              "lines": true,
              "linewidth": 1,
              "links": [],
              "nullPointMode": "null",
              "options": {
                "alertThreshold": true
              },
              "percentage": false,
              "pluginVersion": "7.2.1",
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "sum(increase(api_3scale_gateway_api_time_count{service=\"compliance\"}[5m]))",
                  "yaxis": 2
                },
                {
                  "alias": "count",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(rate(api_3scale_gateway_api_time_count{exported_service=\"policies\"}[5m]))",
                  "format": "time_series",
                  "groupBy": [
                    {
                      "params": [
                        "$__interval"
                      ],
                      "type": "time"
                    },
                    {
                      "params": [
                        "null"
                      ],
                      "type": "fill"
                    }
                  ],
                  "intervalFactor": 1,
                  "legendFormat": "rate",
                  "orderByTime": "ASC",
                  "policy": "default",
                  "refId": "A",
                  "resultFormat": "time_series",
                  "select": [
                    [
                      {
                        "params": [
                          "value"
                        ],
                        "type": "field"
                      },
                      {
                        "params": [],
                        "type": "mean"
                      }
                    ]
                  ],
                  "tags": []
                },
                {
                  "expr": "sum(increase(api_3scale_gateway_api_time_count{exported_service=\"policies\"}[5m]))",
                  "format": "time_series",
                  "intervalFactor": 1,
                  "legendFormat": "count",
                  "refId": "B"
                }
              ],
              "thresholds": [],
              "timeFrom": null,
              "timeRegions": [],
              "timeShift": null,
              "title": "Request Rate",
              "tooltip": {
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "buckets": null,
                "mode": "time",
                "name": null,
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": "0",
                  "show": true
                },
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": "0",
                  "show": true
                }
              ],
              "yaxis": {
                "align": true,
                "alignLevel": 0
              }
            }
          ],
          "title": "Requests",
          "type": "row"
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 4
          },
          "id": 10,
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {},
                  "links": []
                },
                "overrides": []
              },
              "fill": 1,
              "fillGradient": 0,
              "gridPos": {
                "h": 8,
                "w": 12,
                "x": 0,
                "y": 5
              },
              "hiddenSeries": false,
              "id": 98,
              "legend": {
                "avg": false,
                "current": false,
                "max": false,
                "min": false,
                "show": true,
                "total": false,
                "values": false
              },
              "lines": true,
              "linewidth": 1,
              "maxPerRow": 3,
              "nullPointMode": "null",
              "options": {
                "alertThreshold": true
              },
              "percentage": false,
              "pluginVersion": "7.2.1",
              "pointradius": 2,
              "points": false,
              "renderer": "flot",
              "repeat": "service",
              "repeatDirection": "h",
              "seriesOverrides": [],
              "spaceLength": 10,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(container_memory_working_set_bytes{container=\"policies-ui-backend\"}) BY (pod, namespace)",
                  "refId": "A"
                }
              ],
              "thresholds": [],
              "timeFrom": null,
              "timeRegions": [],
              "timeShift": null,
              "title": "Memory usage \"policies-ui-backend\"",
              "tooltip": {
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "buckets": null,
                "mode": "time",
                "name": null,
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                },
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                }
              ],
              "yaxis": {
                "align": false,
                "alignLevel": null
              }
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "$datasource",
              "fieldConfig": {
                "defaults": {
                  "custom": {},
                  "links": []
                },
                "overrides": []
              },
              "fill": 1,
              "fillGradient": 0,
              "gridPos": {
                "h": 8,
                "w": 12,
                "x": 12,
                "y": 5
              },
              "hiddenSeries": false,
              "id": 104,
              "legend": {
                "avg": false,
                "current": false,
                "max": false,
                "min": false,
                "show": true,
                "total": false,
                "values": false
              },
              "lines": true,
              "linewidth": 1,
              "maxPerRow": 3,
              "nullPointMode": "null",
              "options": {
                "alertThreshold": true
              },
              "percentage": false,
              "pluginVersion": "7.2.1",
              "pointradius": 2,
              "points": false,
              "renderer": "flot",
              "repeatDirection": "h",
              "seriesOverrides": [],
              "spaceLength": 10,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(container_memory_working_set_bytes{container=\"policies-engine\"}) BY (pod, namespace)",
                  "refId": "A"
                }
              ],
              "thresholds": [],
              "timeFrom": null,
              "timeRegions": [],
              "timeShift": null,
              "title": "Memory usage \"policies-engine\"",
              "tooltip": {
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "buckets": null,
                "mode": "time",
                "name": null,
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                },
                {
                  "format": "short",
                  "label": null,
                  "logBase": 1,
                  "max": null,
                  "min": null,
                  "show": true
                }
              ],
              "yaxis": {
                "align": false,
                "alignLevel": null
              }
            }
          ],
          "title": "Memory",
          "type": "row"
        },
        {
          "collapsed": false,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 5
          },
          "id": 8,
          "panels": [],
          "title": "Kafka",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 6
          },
          "hiddenSeries": false,
          "id": 50,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "rate(engine_input_processed_total{service=\"policies-engine\"}[2m])",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Received (Per second)",
              "refId": "A"
            },
            {
              "expr": "rate(engine_input_processed_errors_total{service=\"policies-engine\"}[2m])",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "Errors (Absolute)",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Payload processed",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "rps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 6
          },
          "hiddenSeries": false,
          "id": 54,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "engine_actions_notifications_processed_total{service=\"policies-engine\"}",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 1,
              "legendFormat": "Notifications processed",
              "refId": "A"
            },
            {
              "expr": "engine_actions_notifications_aggregated_total{service=\"policies-engine\"}",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Aggregated total",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Messages sent from the engine",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 15
          },
          "id": 6,
          "panels": [],
          "title": "Rollups",
          "type": "row"
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 16
          },
          "id": 4,
          "panels": [],
          "title": "RDS",
          "type": "row"
        },
        {
          "collapsed": true,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 17
          },
          "id": 93,
          "panels": [],
          "title": "Evaluating",
          "type": "row"
        }
      ],
      "refresh": "5m",
      "schemaVersion": 26,
      "style": "dark",
      "tags": [
        "policies"
      ],
      "templating": {
        "list": [
          {
            "current": {
              "selected": false,
              "text": "crcs02ue1-prometheus",
              "value": "crcs02ue1-prometheus"
            },
            "hide": 0,
            "includeAll": false,
            "label": "Datasource",
            "multi": false,
            "name": "datasource",
            "options": [],
            "query": "prometheus",
            "queryValue": "",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          }
        ]
      },
      "time": {
        "from": "now-24h",
        "to": "now"
      },
      "timepicker": {},
      "timezone": "",
      "title": "Policies",
      "uid": "zEvWtW6Mz",
      "version": 17
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-clouddot-policies-general
  labels:
    grafana_dashboard: "true"
  annotations:
    grafana-folder: /grafana-dashboard-definitions/Insights
