apiVersion: v1
data:
  grafana_dashboard_applications.json: |-
    {
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": {
            "type": "grafana",
            "uid": "-- Grafana --"
          },
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "target": {
            "limit": 100,
            "matchAny": false,
            "tags": [ ],
            "type": "dashboard"
          },
          "type": "dashboard"
        }
      ]
    },
    "editable": true,
    "fiscalYearStartMonth": 0,
    "graphTooltip": 0,
    "links": [ ],
    "liveNow": false,
    "panels": [
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "fixedColor": "green",
              "mode": "fixed"
            },
            "mappings": [ ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 6,
          "w": 2,
          "x": 0,
          "y": 0
        },
        "id": 19,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "sum"
            ],
            "fields": "",
            "values": false
          },
          "text": {
            "valueSize": 80
          },
          "textMode": "auto"
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Succeeded\", keptn_deployment_app_name=\"$Application\"}",
            "format": "table",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Succeeded",
        "transformations": [
          {
            "id": "groupBy",
            "options": {
              "fields": {
                "Value": {
                  "aggregations": [
                    "max"
                  ],
                  "operation": "aggregate"
                },
                "keptn_deployment_app_version": {
                  "aggregations": [ ],
                  "operation": "groupby"
                }
              }
            }
          }
        ],
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "mappings": [ ],
            "thresholds": {
              "mode": "percentage",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "orange",
                  "value": 70
                },
                {
                  "color": "red",
                  "value": 85
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 6,
          "w": 8,
          "x": 2,
          "y": 0
        },
        "id": 4,
        "options": {
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showThresholdLabels": false,
          "showThresholdMarkers": true
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Active Deployments",
        "type": "gauge"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "fixedColor": "red",
              "mode": "fixed"
            },
            "mappings": [ ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "red",
                  "value": null
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 6,
          "w": 2,
          "x": 10,
          "y": 0
        },
        "id": 3,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "sum"
            ],
            "fields": "",
            "values": false
          },
          "text": {
            "valueSize": 80
          },
          "textMode": "auto"
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Failed\", keptn_deployment_app_name=\"$Application\"}",
            "format": "table",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Failed",
        "transformations": [
          {
            "id": "groupBy",
            "options": {
              "fields": {
                "Value": {
                  "aggregations": [
                    "max"
                  ],
                  "operation": "aggregate"
                },
                "keptn_deployment_app_version": {
                  "aggregations": [
                    "count"
                  ],
                  "operation": "groupby"
                }
              }
            }
          }
        ],
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [ ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 86400
                }
              ]
            },
            "unit": "s"
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 6,
          "w": 2,
          "x": 0,
          "y": 6
        },
        "id": 10,
        "options": {
          "displayMode": "gradient",
          "minVizHeight": 10,
          "minVizWidth": 0,
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showUnfilled": true
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "avg by(keptn_deployment_app_previousversion, keptn_deployment_app_version) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})",
            "format": "time_series",
            "legendFormat": "{{keptn_deployment_app_previousversion}} - {{keptn_deployment_app_version}}",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Time between Deployments",
        "type": "bargauge"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [ ],
            "min": 2,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "#EAB839",
                  "value": 43200
                },
                {
                  "color": "red",
                  "value": 86400
                }
              ]
            },
            "unit": "s"
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 6,
          "w": 8,
          "x": 2,
          "y": 6
        },
        "id": 16,
        "options": {
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "last"
            ],
            "fields": "",
            "values": false
          },
          "showThresholdLabels": false,
          "showThresholdMarkers": true
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "avg by(keptn_deployment_workload_previousversion) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})",
            "format": "table",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Average Time between Deployments",
        "type": "gauge"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [ ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 6,
          "w": 2,
          "x": 10,
          "y": 6
        },
        "id": 14,
        "options": {
          "displayMode": "gradient",
          "minVizHeight": 10,
          "minVizWidth": 0,
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showUnfilled": true
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "max by(keptn_deployment_app_version) (keptn_app_deploymentduration{keptn_deployment_app_name=\"$Application\"})",
            "interval": "",
            "legendFormat": "{{keptn_workload_version}}",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Deployment Time",
        "type": "bargauge"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "bars",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 3,
              "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
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 9,
          "w": 9,
          "x": 0,
          "y": 12
        },
        "id": 6,
        "options": {
          "legend": {
            "calcs": [ ],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})",
            "format": "table",
            "interval": "1",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Deployments Active",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "P1809F7CD0C75ACF3"
        },
        "fieldConfig": {
          "defaults": {
            "mappings": [ ],
            "thresholds": {
              "mode": "percentage",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "orange",
                  "value": 70
                },
                {
                  "color": "red",
                  "value": 85
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 9,
          "w": 3,
          "x": 9,
          "y": 12
        },
        "id": 23,
        "options": {
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "showThresholdLabels": false,
          "showThresholdMarkers": true
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "max(keptn_promotion_count_total{keptn_deployment_app_name=\"$Application\"})",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Successful promotions",
        "type": "gauge"
      },
      {
        "datasource": {
          "type": "jaeger",
          "uid": "PC9A941E8F2E49454"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "custom": {
              "align": "auto",
              "displayMode": "auto",
              "inspect": false
            },
            "mappings": [ ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": [ ]
        },
        "gridPos": {
          "h": 7,
          "w": 9,
          "x": 0,
          "y": 21
        },
        "id": 8,
        "options": {
          "footer": {
            "fields": "",
            "reducer": [
              "sum"
            ],
            "show": false
          },
          "showHeader": true
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "jaeger",
              "uid": "PC9A941E8F2E49454"
            },
            "operation": "AppPreDeployTasks",
            "queryType": "search",
            "refId": "A",
            "service": "lifecycle-operator",
            "tags": "keptn.deployment.app.name=$Application"
          }
        ],
        "title": "Traces",
        "type": "table"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "prometheus"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "custom": {
              "align": "auto",
              "displayMode": "auto",
              "inspect": false
            },
            "mappings": [ ],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": [
            {
              "matcher": {
                "id": "byName",
                "options": "keptn_deployment_workload_version (lastNotNull)"
              },
              "properties": [
                {
                  "id": "custom.width",
                  "value": 100
                }
              ]
            }
          ]
        },
        "gridPos": {
          "h": 7,
          "w": 3,
          "x": 9,
          "y": 21
        },
        "id": 21,
        "options": {
          "footer": {
            "fields": "",
            "reducer": [
              "sum"
            ],
            "show": false
          },
          "showHeader": false
        },
        "pluginVersion": "9.2.1",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "prometheus"
            },
            "editorMode": "builder",
            "expr": "keptn_deployment_deploymentduration{keptn_deployment_app_name=\"$Application\"}",
            "format": "table",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Active Workloads",
        "transformations": [
          {
            "id": "groupBy",
            "options": {
              "fields": {
                "Value": {
                  "aggregations": [ ]
                },
                "keptn_deployment_workload_name": {
                  "aggregations": [ ],
                  "operation": "groupby"
                },
                "keptn_deployment_workload_version": {
                  "aggregations": [ ],
                  "operation": "aggregate"
                }
              }
            }
          },
          {
            "id": "sortBy",
            "options": {
              "fields": { },
              "sort": [
                {
                  "desc": true,
                  "field": "keptn_deployment_workload_version"
                }
              ]
            }
          }
        ],
        "type": "table"
      }
    ],
    "refresh": "5s",
    "schemaVersion": 37,
    "style": "dark",
    "tags": [ ],
    "templating": {
      "list": [
        {
          "current": {
            "selected": true,
            "text": "podtato-head",
            "value": "podtato-head"
          },
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "definition": "label_values(keptn_deployment_app_name)",
          "hide": 0,
          "includeAll": false,
          "multi": false,
          "name": "Application",
          "options": [ ],
          "query": {
            "query": "label_values(keptn_deployment_app_name)",
            "refId": "StandardVariableQuery"
          },
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "type": "query"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "filters": [ ],
          "hide": 0,
          "name": "Filters",
          "skipUrlSync": false,
          "type": "adhoc"
        }
      ]
    },
    "time": {
      "from": "now-2d",
      "to": "now"
    },
    "timepicker": { },
    "timezone": "",
    "title": "Keptn Applications",
    "uid": "nbiPNgN4z",
    "version": 1,
    "weekStart": ""
    }
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: grafana-dashboard-keptn-applications
  namespace: monitoring
  labels:
    grafana_dashboard: '1'
