---
apiVersion: v1
kind: Namespace
metadata:
  name: knative-build
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: knative-build-admin
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - namespaces
  - secrets
  - events
  - serviceaccounts
  - configmaps
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - extensions
  resources:
  - deployments
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - admissionregistration.k8s.io
  resources:
  - mutatingwebhookconfigurations
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - build.knative.dev
  resources:
  - builds
  - buildtemplates
  - clusterbuildtemplates
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - caching.internal.knative.dev
  resources:
  - images
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - deletecollection
  - patch
  - watch
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: build-controller
  namespace: knative-build
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: build-controller-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: knative-build-admin
subjects:
- kind: ServiceAccount
  name: build-controller
  namespace: knative-build
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: builds.build.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.conditions[?(@.type=="Succeeded")].status
    name: Succeeded
    type: string
  - JSONPath: .status.conditions[?(@.type=="Succeeded")].reason
    name: Reason
    type: string
  - JSONPath: .status.startTime
    name: StartTime
    type: date
  - JSONPath: .status.completionTime
    name: CompletionTime
    type: date
  group: build.knative.dev
  names:
    categories:
    - all
    - knative
    kind: Build
    plural: builds
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: buildtemplates.build.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .metadata.creationTimestamp
    name: Age
    type: date
  group: build.knative.dev
  names:
    categories:
    - all
    - knative
    kind: BuildTemplate
    plural: buildtemplates
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: clusterbuildtemplates.build.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .metadata.creationTimestamp
    name: Age
    type: date
  group: build.knative.dev
  names:
    categories:
    - all
    - knative
    kind: ClusterBuildTemplate
    plural: clusterbuildtemplates
  scope: Cluster
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: images.caching.internal.knative.dev
spec:
  group: caching.internal.knative.dev
  names:
    categories:
    - all
    - knative-internal
    - caching
    kind: Image
    plural: images
    shortNames:
    - img
    singular: image
  scope: Namespaced
  version: v1alpha1
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: build-controller
  name: build-controller
  namespace: knative-build
spec:
  ports:
  - name: metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    app: build-controller
---
apiVersion: v1
kind: Service
metadata:
  labels:
    role: build-webhook
  name: build-webhook
  namespace: knative-build
spec:
  ports:
  - port: 443
    targetPort: 443
  selector:
    role: build-webhook
---
apiVersion: caching.internal.knative.dev/v1alpha1
kind: Image
metadata:
  name: creds-init
  namespace: knative-build
spec:
  image: gcr.io/knative-releases/github.com/knative/build/cmd/creds-init@sha256:c1c11fafd337f62eea18a1f02b78e6ae6949779bed72d53d19b2870723a8f104
---
apiVersion: caching.internal.knative.dev/v1alpha1
kind: Image
metadata:
  name: git-init
  namespace: knative-build
spec:
  image: gcr.io/knative-releases/github.com/knative/build/cmd/git-init@sha256:6fa8043ed114920cd61e28db3c942647ba48415fe1208acde2fb2ac0746c9164
---
apiVersion: caching.internal.knative.dev/v1alpha1
kind: Image
metadata:
  name: gcs-fetcher
  namespace: knative-build
spec:
  image: gcr.io/cloud-builders/gcs-fetcher
---
apiVersion: caching.internal.knative.dev/v1alpha1
kind: Image
metadata:
  name: nop
  namespace: knative-build
spec:
  image: gcr.io/knative-releases/github.com/knative/build/cmd/nop@sha256:f94e6413749759bc3f80d33e76c36509d6a63f7b206d2ca8fff167a0bb9c77f2
---
apiVersion: v1
data:
  loglevel.controller: info
  loglevel.creds-init: info
  loglevel.git-init: info
  loglevel.webhook: info
  zap-logger-config: |
    {
      "level": "info",
      "development": false,
      "sampling": {
        "initial": 100,
        "thereafter": 100
      },
      "outputPaths": ["stdout"],
      "errorOutputPaths": ["stderr"],
      "encoding": "json",
      "encoderConfig": {
        "timeKey": "",
        "levelKey": "level",
        "nameKey": "logger",
        "callerKey": "caller",
        "messageKey": "msg",
        "stacktraceKey": "stacktrace",
        "lineEnding": "",
        "levelEncoder": "",
        "timeEncoder": "",
        "durationEncoder": "",
        "callerEncoder": ""
      }
    }
kind: ConfigMap
metadata:
  name: config-logging
  namespace: knative-build
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: build-controller
  namespace: knative-build
spec:
  replicas: 1
  selector:
    matchLabels:
      app: build-controller
  template:
    metadata:
      labels:
        app: build-controller
    spec:
      containers:
      - args:
        - -logtostderr
        - -stderrthreshold
        - INFO
        - -creds-image
        - gcr.io/knative-releases/github.com/knative/build/cmd/creds-init@sha256:c1c11fafd337f62eea18a1f02b78e6ae6949779bed72d53d19b2870723a8f104
        - -git-image
        - gcr.io/knative-releases/github.com/knative/build/cmd/git-init@sha256:6fa8043ed114920cd61e28db3c942647ba48415fe1208acde2fb2ac0746c9164
        - -nop-image
        - gcr.io/knative-releases/github.com/knative/build/cmd/nop@sha256:f94e6413749759bc3f80d33e76c36509d6a63f7b206d2ca8fff167a0bb9c77f2
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: gcr.io/knative-releases/github.com/knative/build/cmd/controller@sha256:2667d0ff68a406e0103c58145edef916edc1b41695b38964dc6ccb0b38c0aedf
        name: build-controller
        volumeMounts:
        - mountPath: /etc/config-logging
          name: config-logging
      serviceAccountName: build-controller
      volumes:
      - configMap:
          name: config-logging
        name: config-logging
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: build-webhook
  namespace: knative-build
spec:
  replicas: 1
  selector:
    matchLabels:
      app: build-webhook
  template:
    metadata:
      labels:
        app: build-webhook
        role: build-webhook
    spec:
      containers:
      - args:
        - -logtostderr
        - -stderrthreshold
        - INFO
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: gcr.io/knative-releases/github.com/knative/build/cmd/webhook@sha256:58775663a5bc0d782c8505a28cc88616a5e08115959dc62fa07af5ad76c54a97
        name: build-webhook
        volumeMounts:
        - mountPath: /etc/config-logging
          name: config-logging
      serviceAccountName: build-controller
      volumes:
      - configMap:
          name: config-logging
        name: config-logging
---
---
apiVersion: v1
kind: Namespace
metadata:
  labels:
    istio-injection: enabled
  name: knative-serving
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: knative-serving-admin
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - namespaces
  - secrets
  - configmaps
  - endpoints
  - services
  - events
  - serviceaccounts
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - extensions
  resources:
  - ingresses
  - deployments
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - apps
  resources:
  - deployments
  - deployments/scale
  - statefulsets
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - admissionregistration.k8s.io
  resources:
  - mutatingwebhookconfigurations
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - serving.knative.dev
  resources:
  - configurations
  - configurationgenerations
  - routes
  - revisions
  - revisionuids
  - autoscalers
  - services
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - autoscaling.internal.knative.dev
  resources:
  - podautoscalers
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - caching.internal.knative.dev
  resources:
  - images
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - networking.internal.knative.dev
  resources:
  - clusteringresses
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - build.knative.dev
  resources:
  - builds
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
- apiGroups:
  - networking.istio.io
  resources:
  - virtualservices
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: knative-serving-write
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - namespaces
  - secrets
  - configmaps
  - endpoints
  - services
  - events
  - serviceaccounts
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - extensions
  resources:
  - ingresses
  - deployments
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - apps
  resources:
  - deployments
  - deployments/scale
  - statefulsets
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - admissionregistration.k8s.io
  resources:
  - mutatingwebhookconfigurations
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - serving.knative.dev
  resources:
  - configurations
  - configurationgenerations
  - routes
  - revisions
  - revisionuids
  - autoscalers
  - services
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - build.knative.dev
  resources:
  - builds
  verbs:
  - get
  - list
  - update
  - patch
  - watch
- apiGroups:
  - networking.istio.io
  resources:
  - virtualservices
  verbs:
  - get
  - list
  - create
  - update
  - delete
  - patch
  - watch
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: controller
  namespace: knative-serving
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: autoscaler
  namespace: knative-serving
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: knative-serving-controller-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: knative-serving-admin
subjects:
- kind: ServiceAccount
  name: controller
  namespace: knative-serving
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: knative-serving-autoscaler-write
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: knative-serving-write
subjects:
- kind: ServiceAccount
  name: autoscaler
  namespace: knative-serving
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: knative-shared-gateway
  namespace: knative-serving
spec:
  selector:
    knative: ingressgateway
  servers:
  - hosts:
    - '*'
    port:
      name: http
      number: 80
      protocol: HTTP
  - hosts:
    - '*'
    port:
      name: https
      number: 443
      protocol: HTTPS
    tls:
      mode: PASSTHROUGH
---
apiVersion: v1
kind: Service
metadata:
  annotations: null
  labels:
    app: knative-ingressgateway
    chart: gateways-1.0.1
    heritage: Tiller
    knative: ingressgateway
    release: RELEASE-NAME
  name: knative-ingressgateway
  namespace: istio-system
spec:
  ports:
  - name: http2
    nodePort: 32380
    port: 80
    targetPort: 80
  - name: https
    nodePort: 32390
    port: 443
  - name: tcp
    nodePort: 32400
    port: 31400
  - name: tcp-pilot-grpc-tls
    port: 15011
    targetPort: 15011
  - name: tcp-citadel-grpc-tls
    port: 8060
    targetPort: 8060
  - name: tcp-dns-tls
    port: 853
    targetPort: 853
  - name: http2-prometheus
    port: 15030
    targetPort: 15030
  - name: http2-grafana
    port: 15031
    targetPort: 15031
  selector:
    app: knative-ingressgateway
    knative: ingressgateway
  type: LoadBalancer
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: knative-ingressgateway
    chart: gateways-1.0.1
    heritage: Tiller
    knative: ingressgateway
    release: RELEASE-NAME
  name: knative-ingressgateway
  namespace: istio-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: knative-ingressgateway
      knative: ingressgateway
  template:
    metadata:
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ""
        sidecar.istio.io/inject: "false"
      labels:
        app: knative-ingressgateway
        knative: ingressgateway
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
            weight: 2
          - preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - ppc64le
            weight: 2
          - preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - s390x
            weight: 2
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
      - args:
        - proxy
        - router
        - -v
        - "2"
        - --discoveryRefreshDelay
        - 1s
        - --drainDuration
        - 45s
        - --parentShutdownDuration
        - 1m0s
        - --connectTimeout
        - 10s
        - --serviceCluster
        - knative-ingressgateway
        - --zipkinAddress
        - zipkin:9411
        - --statsdUdpAddress
        - istio-statsd-prom-bridge:9125
        - --proxyAdminPort
        - "15000"
        - --controlPlaneAuthPolicy
        - NONE
        - --discoveryAddress
        - istio-pilot:8080
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: INSTANCE_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.podIP
        - name: ISTIO_META_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        image: docker.io/istio/proxyv2:1.0.2
        imagePullPolicy: IfNotPresent
        name: istio-proxy
        ports:
        - containerPort: 80
        - containerPort: 443
        - containerPort: 31400
        - containerPort: 15011
        - containerPort: 8060
        - containerPort: 853
        - containerPort: 15030
        - containerPort: 15031
        resources:
          requests:
            cpu: 10m
        volumeMounts:
        - mountPath: /etc/certs
          name: istio-certs
          readOnly: true
        - mountPath: /etc/istio/ingressgateway-certs
          name: ingressgateway-certs
          readOnly: true
        - mountPath: /etc/istio/ingressgateway-ca-certs
          name: ingressgateway-ca-certs
          readOnly: true
      serviceAccountName: istio-ingressgateway-service-account
      volumes:
      - name: istio-certs
        secret:
          optional: true
          secretName: istio.istio-ingressgateway-service-account
      - name: ingressgateway-certs
        secret:
          optional: true
          secretName: istio-ingressgateway-certs
      - name: ingressgateway-ca-certs
        secret:
          optional: true
          secretName: istio-ingressgateway-ca-certs
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: knative-ingressgateway
  namespace: istio-system
spec:
  maxReplicas: 10
  metrics:
  - resource:
      name: cpu
      targetAverageUtilization: 60
    type: Resource
  minReplicas: 1
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: knative-ingressgateway
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: clusteringresses.networking.internal.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.conditions[?(@.type=="Ready")].status
    name: Ready
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].reason
    name: Reason
    type: string
  group: networking.internal.knative.dev
  names:
    categories:
    - all
    - knative-internal
    - networking
    kind: ClusterIngress
    plural: clusteringresses
    singular: clusteringress
  scope: Cluster
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: configurations.serving.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.latestCreatedRevisionName
    name: LatestCreated
    type: string
  - JSONPath: .status.latestReadyRevisionName
    name: LatestReady
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].status
    name: Ready
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].reason
    name: Reason
    type: string
  group: serving.knative.dev
  names:
    categories:
    - all
    - knative
    - serving
    kind: Configuration
    plural: configurations
    shortNames:
    - config
    - cfg
    singular: configuration
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: images.caching.internal.knative.dev
spec:
  group: caching.internal.knative.dev
  names:
    categories:
    - all
    - knative-internal
    - caching
    kind: Image
    plural: images
    shortNames:
    - img
    singular: image
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: podautoscalers.autoscaling.internal.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.conditions[?(@.type=="Ready")].status
    name: Ready
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].reason
    name: Reason
    type: string
  group: autoscaling.internal.knative.dev
  names:
    categories:
    - all
    - knative-internal
    - autoscaling
    kind: PodAutoscaler
    plural: podautoscalers
    shortNames:
    - kpa
    singular: podautoscaler
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: revisions.serving.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.serviceName
    name: Service Name
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].status
    name: Ready
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].reason
    name: Reason
    type: string
  group: serving.knative.dev
  names:
    categories:
    - all
    - knative
    - serving
    kind: Revision
    plural: revisions
    shortNames:
    - rev
    singular: revision
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: routes.serving.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.domain
    name: Domain
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].status
    name: Ready
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].reason
    name: Reason
    type: string
  group: serving.knative.dev
  names:
    categories:
    - all
    - knative
    - serving
    kind: Route
    plural: routes
    shortNames:
    - rt
    singular: route
  scope: Namespaced
  version: v1alpha1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: services.serving.knative.dev
spec:
  additionalPrinterColumns:
  - JSONPath: .status.domain
    name: Domain
    type: string
  - JSONPath: .status.latestCreatedRevisionName
    name: LatestCreated
    type: string
  - JSONPath: .status.latestReadyRevisionName
    name: LatestReady
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].status
    name: Ready
    type: string
  - JSONPath: .status.conditions[?(@.type=="Ready")].reason
    name: Reason
    type: string
  group: serving.knative.dev
  names:
    categories:
    - all
    - knative
    - serving
    kind: Service
    plural: services
    shortNames:
    - kservice
    - ksvc
    singular: service
  scope: Namespaced
  version: v1alpha1
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: activator
  name: activator-service
  namespace: knative-serving
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    app: activator
  type: NodePort
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: controller
  name: controller
  namespace: knative-serving
spec:
  ports:
  - name: metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    app: controller
---
apiVersion: v1
kind: Service
metadata:
  labels:
    role: webhook
  name: webhook
  namespace: knative-serving
spec:
  ports:
  - port: 443
    targetPort: 443
  selector:
    role: webhook
---
apiVersion: caching.internal.knative.dev/v1alpha1
kind: Image
metadata:
  name: queue-proxy
  namespace: knative-serving
spec:
  image: gcr.io/knative-releases/github.com/knative/serving/cmd/queue@sha256:ce66dd18f0d504e40e050f31b9de4315f8c225f308e9885eb4cbd82b2ba03c1a
---
apiVersion: caching.internal.knative.dev/v1alpha1
kind: Image
metadata:
  name: fluentd-sidecar
  namespace: knative-serving
spec:
  image: k8s.gcr.io/fluentd-elasticsearch:v2.0.4
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: activator
  namespace: knative-serving
spec:
  replicas: 3
  selector:
    matchLabels:
      app: activator
      role: activator
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "true"
      labels:
        app: activator
        role: activator
    spec:
      containers:
      - args:
        - -logtostderr=false
        - -stderrthreshold=FATAL
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        image: gcr.io/knative-releases/github.com/knative/serving/cmd/activator@sha256:7e7abd88a292cf24a0db80d71fa16e8505dd288c241cab0b6716848f0e7fcc04
        name: activator
        ports:
        - containerPort: 8080
          name: activator-port
        - containerPort: 9090
          name: metrics-port
        volumeMounts:
        - mountPath: /etc/config-logging
          name: config-logging
      serviceAccountName: controller
      volumes:
      - configMap:
          name: config-logging
        name: config-logging
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: autoscaler
  name: autoscaler
  namespace: knative-serving
spec:
  ports:
  - name: websocket
    port: 8080
    protocol: TCP
    targetPort: 8080
  - name: metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    app: autoscaler
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: autoscaler
  namespace: knative-serving
spec:
  replicas: 1
  selector:
    matchLabels:
      app: autoscaler
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "true"
      labels:
        app: autoscaler
    spec:
      containers:
      - image: gcr.io/knative-releases/github.com/knative/serving/cmd/autoscaler@sha256:ee07884132c73b0eb0b3368ed096073b611f6a2c82289afacca1080fd6308c09
        name: autoscaler
        ports:
        - containerPort: 8080
          name: websocket
        - containerPort: 9090
          name: metrics
        volumeMounts:
        - mountPath: /etc/config-autoscaler
          name: config-autoscaler
        - mountPath: /etc/config-logging
          name: config-logging
      serviceAccountName: controller
      volumes:
      - configMap:
          name: config-autoscaler
        name: config-autoscaler
      - configMap:
          name: config-logging
        name: config-logging
---
apiVersion: v1
data:
  container-concurrency-target-default: "100"
  container-concurrency-target-percentage: "1.0"
  enable-scale-to-zero: "true"
  enable-vertical-pod-autoscaling: "false"
  max-scale-up-rate: "10"
  panic-window: 6s
  scale-to-zero-grace-period: 2m
  scale-to-zero-threshold: 5m
  stable-window: 60s
  tick-interval: 2s
kind: ConfigMap
metadata:
  name: config-autoscaler
  namespace: knative-serving
---
apiVersion: v1
data:
  queueSidecarImage: gcr.io/knative-releases/github.com/knative/serving/cmd/queue@sha256:ce66dd18f0d504e40e050f31b9de4315f8c225f308e9885eb4cbd82b2ba03c1a
  registriesSkippingTagResolving: ko.local,dev.local
kind: ConfigMap
metadata:
  name: config-controller
  namespace: knative-serving
---
apiVersion: v1
data:
  example.com: ""
kind: ConfigMap
metadata:
  name: config-domain
  namespace: knative-serving
---
apiVersion: v1
data:
  stale-revision-create-delay: 24h
  stale-revision-lastpinned-debounce: 5h
  stale-revision-minimum-generations: "1"
  stale-revision-timeout: 15h
kind: ConfigMap
metadata:
  name: config-gc
  namespace: knative-serving
---
apiVersion: v1
data:
  loglevel.activator: info
  loglevel.autoscaler: info
  loglevel.controller: info
  loglevel.queueproxy: info
  loglevel.webhook: info
  zap-logger-config: |
    {
      "level": "info",
      "development": false,
      "outputPaths": ["stdout"],
      "errorOutputPaths": ["stderr"],
      "encoding": "json",
      "encoderConfig": {
        "timeKey": "ts",
        "levelKey": "level",
        "nameKey": "logger",
        "callerKey": "caller",
        "messageKey": "msg",
        "stacktraceKey": "stacktrace",
        "lineEnding": "",
        "levelEncoder": "",
        "timeEncoder": "iso8601",
        "durationEncoder": "",
        "callerEncoder": ""
      }
    }
kind: ConfigMap
metadata:
  name: config-logging
  namespace: knative-serving
---
apiVersion: v1
data:
  istio.sidecar.includeOutboundIPRanges: '*'
kind: ConfigMap
metadata:
  name: config-network
  namespace: knative-serving
---
apiVersion: v1
data:
  logging.enable-var-log-collection: "false"
  logging.fluentd-sidecar-image: k8s.gcr.io/fluentd-elasticsearch:v2.0.4
  logging.fluentd-sidecar-output-config: |
    # Parse json log before sending to Elastic Search
    <filter **>
      @type parser
      key_name log
      <parse>
        @type multi_format
        <pattern>
          format json
          time_key fluentd-time # fluentd-time is reserved for structured logs
          time_format %Y-%m-%dT%H:%M:%S.%NZ
        </pattern>
        <pattern>
          format none
          message_key log
        </pattern>
      </parse>
    </filter>
    # Send to Elastic Search
    <match **>
      @id elasticsearch
      @type elasticsearch
      @log_level info
      include_tag_key true
      # Elasticsearch service is in monitoring namespace.
      host elasticsearch-logging.knative-monitoring
      port 9200
      logstash_format true
      <buffer>
        @type file
        path /var/log/fluentd-buffers/kubernetes.system.buffer
        flush_mode interval
        retry_type exponential_backoff
        flush_thread_count 2
        flush_interval 5s
        retry_forever
        retry_max_interval 30
        chunk_limit_size 2M
        queue_limit_length 8
        overflow_action block
      </buffer>
    </match>
  logging.revision-url-template: |
    http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana#/discover?_a=(query:(match:(kubernetes.labels.knative-dev%2FrevisionUID:(query:'${REVISION_UID}',type:phrase))))
kind: ConfigMap
metadata:
  name: config-observability
  namespace: knative-serving
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller
  namespace: knative-serving
spec:
  replicas: 1
  selector:
    matchLabels:
      app: controller
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app: controller
    spec:
      containers:
      - image: gcr.io/knative-releases/github.com/knative/serving/cmd/controller@sha256:bcfe127285a64f54a80ddbf00d62123a8795bbde6f7d360e4ffd86833ddc7612
        name: controller
        ports:
        - containerPort: 9090
          name: metrics
        volumeMounts:
        - mountPath: /etc/config-logging
          name: config-logging
      serviceAccountName: controller
      volumes:
      - configMap:
          name: config-logging
        name: config-logging
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: webhook
  namespace: knative-serving
spec:
  replicas: 1
  selector:
    matchLabels:
      app: webhook
      role: webhook
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app: webhook
        role: webhook
    spec:
      containers:
      - image: gcr.io/knative-releases/github.com/knative/serving/cmd/webhook@sha256:179b194db647b976c1e9b35c26013b52a016ef1889c6466c772ef60b40723525
        name: webhook
        volumeMounts:
        - mountPath: /etc/config-logging
          name: config-logging
      serviceAccountName: controller
      volumes:
      - configMap:
          name: config-logging
        name: config-logging
---
---
---
apiVersion: v1
kind: Namespace
metadata:
  name: knative-monitoring
---
apiVersion: v1
kind: Service
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: elasticsearch-logging
    kubernetes.io/cluster-service: "true"
    kubernetes.io/name: Elasticsearch
  name: elasticsearch-logging
  namespace: knative-monitoring
spec:
  ports:
  - port: 9200
    protocol: TCP
    targetPort: db
  selector:
    app: elasticsearch-logging
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: elasticsearch-logging
    kubernetes.io/cluster-service: "true"
  name: elasticsearch-logging
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: elasticsearch-logging
    kubernetes.io/cluster-service: "true"
  name: elasticsearch-logging
rules:
- apiGroups:
  - ""
  resources:
  - services
  - namespaces
  - endpoints
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: elasticsearch-logging
    kubernetes.io/cluster-service: "true"
  name: elasticsearch-logging
  namespace: knative-monitoring
roleRef:
  apiGroup: ""
  kind: ClusterRole
  name: elasticsearch-logging
subjects:
- apiGroup: ""
  kind: ServiceAccount
  name: elasticsearch-logging
  namespace: knative-monitoring
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: elasticsearch-logging
    kubernetes.io/cluster-service: "true"
    version: v5.6.4
  name: elasticsearch-logging
  namespace: knative-monitoring
spec:
  replicas: 2
  selector:
    matchLabels:
      app: elasticsearch-logging
      version: v5.6.4
  serviceName: elasticsearch-logging
  template:
    metadata:
      labels:
        app: elasticsearch-logging
        kubernetes.io/cluster-service: "true"
        version: v5.6.4
    spec:
      containers:
      - env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: k8s.gcr.io/elasticsearch:v5.6.4
        name: elasticsearch-logging
        ports:
        - containerPort: 9200
          name: db
          protocol: TCP
        - containerPort: 9300
          name: transport
          protocol: TCP
        resources:
          limits:
            cpu: 1000m
          requests:
            cpu: 100m
        volumeMounts:
        - mountPath: /data
          name: elasticsearch-logging
      initContainers:
      - command:
        - /sbin/sysctl
        - -w
        - vm.max_map_count=262144
        image: alpine:3.6
        name: elasticsearch-logging-init
        securityContext:
          privileged: true
      serviceAccountName: elasticsearch-logging
      volumes:
      - emptyDir: {}
        name: elasticsearch-logging
---
apiVersion: v1
kind: Service
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: kibana-logging
    kubernetes.io/cluster-service: "true"
    kubernetes.io/name: Kibana
  name: kibana-logging
  namespace: knative-monitoring
spec:
  ports:
  - port: 5601
    protocol: TCP
    targetPort: ui
  selector:
    app: kibana-logging
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: kibana-logging
    kubernetes.io/cluster-service: "true"
  name: kibana-logging
  namespace: knative-monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kibana-logging
  template:
    metadata:
      labels:
        app: kibana-logging
    spec:
      containers:
      - env:
        - name: ELASTICSEARCH_URL
          value: http://elasticsearch-logging:9200
        - name: SERVER_BASEPATH
          value: /api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy
        - name: XPACK_MONITORING_ENABLED
          value: "false"
        - name: XPACK_SECURITY_ENABLED
          value: "false"
        image: docker.elastic.co/kibana/kibana:5.6.4
        name: kibana-logging
        ports:
        - containerPort: 5601
          name: ui
          protocol: TCP
        resources:
          limits:
            cpu: 1000m
          requests:
            cpu: 100m
---
apiVersion: v1
data:
  100.system.conf: |-
    <system>
      root_dir /tmp/fluentd-buffers/
    </system>
  200.containers.input.conf: |-
    <source>
      @id fluentd-containers.log
      @type tail
      path /var/log/containers/*user-container-*.log,/var/log/containers/*build-step-*.log,/var/log/containers/controller-*controller-*.log,/var/log/containers/webhook-*webhook-*.log,/var/log/containers/*autoscaler-*autoscaler-*.log,/var/log/containers/*queue-proxy-*.log,/var/log/containers/activator-*activator-*.log
      pos_file /var/log/es-containers.log.pos
      time_format %Y-%m-%dT%H:%M:%S.%NZ
      tag raw.kubernetes.*
      format json
      read_from_head true
    </source>
    # Combine multi line logs which form an exception stack trace into a single log entry
    <match raw.kubernetes.**>
      @id raw.kubernetes
      @type detect_exceptions
      remove_tag_prefix raw
      message log
      stream stream
      multiline_flush_interval 5
      max_bytes 500000
      max_lines 1000
    </match>
    # Add Kubernetes metadata
    <filter kubernetes.**>
      @type kubernetes_metadata
    </filter>
  300.forward.input.conf: |-
    # Takes the messages sent over TCP, e.g. request logs from Istio
    <source>
      @type forward
      port 24224
    </source>
  900.output.conf: |-
    # Send to Elastic Search
    <match **>
      @id elasticsearch
      @type elasticsearch
      @log_level info
      include_tag_key true
      host elasticsearch-logging
      port 9200
      logstash_format true
      <buffer>
        @type file
        path /var/log/fluentd-buffers/kubernetes.system.buffer
        flush_mode interval
        retry_type exponential_backoff
        flush_thread_count 2
        flush_interval 5s
        retry_forever
        retry_max_interval 30
        chunk_limit_size 2M
        queue_limit_length 8
        overflow_action block
      </buffer>
    </match>
kind: ConfigMap
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
  name: fluentd-ds-config
  namespace: knative-monitoring
---
apiVersion: config.istio.io/v1alpha2
kind: logentry
metadata:
  name: requestlog
  namespace: istio-system
spec:
  monitored_resource_type: '"UNSPECIFIED"'
  severity: '"Info"'
  timestamp: request.time
  variables:
    destinationConfiguration: destination.labels["serving.knative.dev/configuration"]
      | "unknown"
    destinationK8sService: destination.service | ""
    destinationNamespace: destination.namespace | ""
    destinationRevision: destination.labels["serving.knative.dev/revision"] | "unknown"
    destinationService: destination.labels["serving.knative.dev/service"] | "unknown"
    latency: response.duration | "0ms"
    method: request.method | ""
    protocol: request.scheme | "http"
    referer: request.referer | "unknown"
    requestHost: request.host | ""
    requestSize: request.size | 0
    responseCode: response.code | 0
    responseSize: response.size | 0
    sourceK8sService: source.service | "unknown"
    sourceNamespace: source.namespace | "unknown"
    traceId: request.headers["x-b3-traceid"] | "unknown"
    url: request.path | ""
    userAgent: request.useragent | "unknown"
---
apiVersion: config.istio.io/v1alpha2
kind: fluentd
metadata:
  name: requestloghandler
  namespace: istio-system
spec:
  address: fluentd-ds.knative-monitoring:24224
---
apiVersion: config.istio.io/v1alpha2
kind: rule
metadata:
  name: requestlogtofluentd
  namespace: istio-system
spec:
  actions:
  - handler: requestloghandler.fluentd
    instances:
    - requestlog.logentry
  match: "true"
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: fluentd-ds
    kubernetes.io/cluster-service: "true"
  name: fluentd-ds
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: fluentd-ds
    kubernetes.io/cluster-service: "true"
  name: fluentd-ds
rules:
- apiGroups:
  - ""
  resources:
  - namespaces
  - pods
  verbs:
  - get
  - watch
  - list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: fluentd-ds
    kubernetes.io/cluster-service: "true"
  name: fluentd-ds
roleRef:
  apiGroup: ""
  kind: ClusterRole
  name: fluentd-ds
subjects:
- apiGroup: ""
  kind: ServiceAccount
  name: fluentd-ds
  namespace: knative-monitoring
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: fluentd-ds
  name: fluentd-ds
  namespace: knative-monitoring
spec:
  ports:
  - name: fluentd-tcp
    port: 24224
    protocol: TCP
    targetPort: 24224
  - name: fluentd-udp
    port: 24224
    protocol: UDP
    targetPort: 24224
  selector:
    app: fluentd-ds
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
    app: fluentd-ds
    kubernetes.io/cluster-service: "true"
    version: v2.0.4
  name: fluentd-ds
  namespace: knative-monitoring
spec:
  selector:
    matchLabels:
      app: fluentd-ds
      version: v2.0.4
  template:
    metadata:
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ""
      labels:
        app: fluentd-ds
        kubernetes.io/cluster-service: "true"
        version: v2.0.4
    spec:
      containers:
      - env:
        - name: FLUENTD_ARGS
          value: --no-supervisor -q
        image: k8s.gcr.io/fluentd-elasticsearch:v2.0.4
        name: fluentd-ds
        resources:
          limits:
            memory: 500Mi
          requests:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - mountPath: /var/log/containers
          name: varlogcontainers
          readOnly: true
        - mountPath: /var/log/pods
          name: varlogpods
          readOnly: true
        - mountPath: /var/lib/docker/containers
          name: varlibdockercontainers
          readOnly: true
        - mountPath: /host/lib
          name: libsystemddir
          readOnly: true
        - mountPath: /etc/fluent/config.d
          name: config-volume
      nodeSelector:
        beta.kubernetes.io/fluentd-ds-ready: "true"
      priorityClassName: system-node-critical
      serviceAccountName: fluentd-ds
      terminationGracePeriodSeconds: 30
      volumes:
      - hostPath:
          path: /var/log/containers
        name: varlogcontainers
      - hostPath:
          path: /var/log/pods
        name: varlogpods
      - hostPath:
          path: /var/lib/docker/containers
        name: varlibdockercontainers
      - hostPath:
          path: /usr/lib64
        name: libsystemddir
      - configMap:
          name: fluentd-ds-config
        name: config-volume
---
apiVersion: v1
data:
  istio-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "id": null,
      "iteration": 1518735681119,
      "links": [
        {
          "icon": "external link",
          "tags": [],
          "title": "istio.io",
          "tooltip": "Istio Home",
          "type": "link",
          "url": "https://istio.io/"
        }
      ],
      "panels": [
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 50,
          "panels": [],
          "repeat": null,
          "title": "Row title",
          "type": "row"
        },
        {
          "content": "<div>\n  <div style=\"position: absolute; bottom: 0\">\n    <a href=\"https://istio.io\" target=\"_blank\" style=\"font-size: 30px; text-decoration: none; color: inherit\"><img src=\"https://istio.io/img/istio-logo.svg\" style=\"height: 50px\"> Istio</a>\n  </div>\n  <div style=\"position: absolute; bottom: 0; right: 0; font-size: 15px\">\n    Istio is an <a href=\"https://github.com/istio/istio\" target=\"_blank\">open platform</a> that provides a uniform way to connect,\n    <a href=\"https://istio.io/docs/concepts/traffic-management/overview.html\" target=\"_blank\">manage</a>, and \n    <a href=\"https://istio.io/docs/concepts/network-and-auth/auth.html\" target=\"_blank\">secure</a> microservices.\n    <br>\n    Need help? Join the <a href=\"https://istio.io/community/\" target=\"_blank\">Istio community</a>.\n  </div>\n</div>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 1
          },
          "height": "50px",
          "id": 13,
          "links": [],
          "mode": "html",
          "style": {
            "font-size": "18pt"
          },
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 4
          },
          "id": 51,
          "panels": [],
          "repeat": null,
          "title": "Dashboard Row",
          "type": "row"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "datasource": "prometheus",
          "format": "ops",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 3,
            "w": 6,
            "x": 0,
            "y": 5
          },
          "id": 20,
          "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": "round(sum(irate(istio_request_count[1m])), 0.001)",
              "intervalFactor": 1,
              "refId": "A",
              "step": 4
            }
          ],
          "thresholds": "",
          "title": "Global Request Volume",
          "transparent": false,
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "datasource": "prometheus",
          "format": "percentunit",
          "gauge": {
            "maxValue": 100,
            "minValue": 80,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": false
          },
          "gridPos": {
            "h": 3,
            "w": 6,
            "x": 6,
            "y": 5
          },
          "id": 21,
          "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": "sum(rate(istio_request_count{response_code!~\"5.*\"}[1m])) / sum(rate(istio_request_count[1m]))",
              "intervalFactor": 1,
              "refId": "A",
              "step": 4
            }
          ],
          "thresholds": "95, 99, 99.5",
          "title": "Global Success Rate (non-5xx responses)",
          "transparent": false,
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "datasource": "prometheus",
          "format": "ops",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 3,
            "w": 6,
            "x": 12,
            "y": 5
          },
          "id": 22,
          "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": "sum(irate(istio_request_count{response_code=~\"4.*\"}[1m])) ",
              "intervalFactor": 1,
              "refId": "A",
              "step": 4
            }
          ],
          "thresholds": "",
          "title": "4xxs",
          "transparent": false,
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "datasource": "prometheus",
          "format": "ops",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 3,
            "w": 6,
            "x": 18,
            "y": 5
          },
          "id": 23,
          "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": "sum(irate(istio_request_count{response_code=~\"5.*\"}[1m])) ",
              "intervalFactor": 1,
              "refId": "A",
              "step": 4
            }
          ],
          "thresholds": "",
          "title": "5xxs",
          "transparent": false,
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 8
          },
          "id": 52,
          "panels": [],
          "repeat": null,
          "title": "Service Mesh",
          "type": "row"
        },
        {
          "content": "<div class=\"text-center dashboard-header\">\n  <span>Service Mesh</span>\n</div>\n",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 9
          },
          "height": "30px",
          "id": 24,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 0,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 12
          },
          "id": 1,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null as zero",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "round(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\"}[1m])), 0.001)",
              "intervalFactor": 1,
              "legendFormat": "All",
              "refId": "B",
              "step": 2
            },
            {
              "expr": "round(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",response_code=\"200\"}[1m])), 0.001)",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "200s",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "round(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",response_code=~\"4.*\"}[1m])), 0.001)",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "400s",
              "refId": "C",
              "step": 2
            },
            {
              "expr": "round(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",connection_mtls=\"true\"}[1m])), 0.001)",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "All Secured Requests",
              "refId": "D",
              "step": 2
            },
            {
              "expr": "round(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",connection_mtls=\"false\"}[1m])), 0.001)",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "All Unsecured Requests",
              "refId": "E",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Request Volume",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": [
              "total"
            ]
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 12
          },
          "id": 7,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(sum(irate(istio_request_count{destination_service=~\"$http_destination\",source_service=~\"$source\",response_code!~\"5.*\",destination_version=~\"$destination_version\"}[1m])) by (destination_service) / sum(irate(istio_request_count{destination_service=~\"$http_destination\",source_service=~\"$source\",destination_version=~\"$destination_version\"}[1m])) by (destination_service), \"destination_service\", \"$1\", \"destination_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ destination_service }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Success Rate by Service (non-5xx responses)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "percentunit",
              "label": null,
              "logBase": 1,
              "max": "1.01",
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 12
          },
          "id": 8,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",response_code=~\"4.*\"}[1m])) by (destination_service), \"destination_service\", \"$1\", \"destination_service\", \"(.*).svc.cluster.local\")",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_service }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "4xxs by Service",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 12
          },
          "id": 25,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(sum(irate(istio_request_count{source_service=~\"$source\",source_version=~\"$source_version\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",response_code=~\"5.*\"}[1m])) by (destination_service) , \"destination_service\", \"$1\", \"destination_service\", \"(.*).svc.cluster.local\")",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_service }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "5xxs by Service",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 19
          },
          "id": 53,
          "panels": [],
          "repeat": null,
          "title": "Services",
          "type": "row"
        },
        {
          "content": "<div class=\"text-center dashboard-header\">\n  <span>HTTP Services</span>\n</div>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 20
          },
          "height": "50px",
          "id": 26,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 23
          },
          "id": 54,
          "panels": [],
          "repeat": "http_destination",
          "title": "$http_destination",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 0,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 0,
            "y": 24
          },
          "id": 27,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null as zero",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(round(sum(irate(istio_request_count{destination_service=~\"$http_destination\",destination_version=~\"$destination_version\"}[1m])) by (source_service, source_version, destination_version, response_code), 0.001), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version}} -> {{destination_version}} : {{ response_code }}",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Requests by Source, Version, and Response Code",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": [
              "total"
            ]
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 6,
            "y": 24
          },
          "id": 30,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(sum(irate(istio_request_count{source_version=~\"$source_version\",destination_service=~\"$http_destination\",source_service=~\"$source\",destination_version=~\"$destination_version\",response_code!~\"5.*\"}[1m])) by (source_service, source_version, destination_version) / sum(irate(istio_request_count{source_version=~\"$source_version\",destination_service=~\"$http_destination\",source_service=~\"$source\",destination_version=~\"$destination_version\"}[1m])) by (source_service, source_version, destination_version), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{source_service}}-{{source_version}} -> {{destination_version}}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Success Rate by Source and Version (non-5xx responses)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "percentunit",
              "label": null,
              "logBase": 1,
              "max": "1.01",
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 12,
            "y": 24
          },
          "id": 28,
          "legend": {
            "alignAsTable": false,
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(irate(istio_request_duration_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version }} -> {{ destination_version }} (p50)",
              "refId": "D",
              "step": 2
            },
            {
              "expr": "label_replace(histogram_quantile(0.90, sum(irate(istio_request_duration_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version,destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{source_version}} -> {{ destination_version }} (p90)",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(irate(istio_request_duration_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version,destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{source_version}} -> {{ destination_version }} (p95)",
              "refId": "B",
              "step": 2
            },
            {
              "expr": "label_replace(histogram_quantile(0.99, sum(irate(istio_request_duration_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{source_version}} -> {{ destination_version }} (p99)",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Response Time by Source and Version",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "s",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 18,
            "y": 24
          },
          "id": 29,
          "legend": {
            "alignAsTable": false,
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(irate(istio_response_size_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version }} -> {{ destination_version }} (p50)",
              "refId": "D",
              "step": 2
            },
            {
              "expr": "label_replace(histogram_quantile(0.90, sum(irate(istio_response_size_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version }} -> {{ destination_version }} (p90)",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(irate(istio_response_size_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version }} -> {{ destination_version }} (p95)",
              "refId": "B",
              "step": 2
            },
            {
              "expr": "label_replace(histogram_quantile(0.99, sum(irate(istio_response_size_bucket{source_service=~\"$source\",destination_service=~\"$http_destination\",destination_version=~\"$destination_version\",source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version, le)), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version }} -> {{ destination_version }} (p99)",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Response Size by Source and Version",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "decbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 30
          },
          "id": 55,
          "panels": [],
          "repeat": null,
          "title": "TCP Services",
          "type": "row"
        },
        {
          "content": "<div class=\"text-center dashboard-header\">\n  <span>TCP Services</span>\n</div>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 31
          },
          "height": "50px",
          "id": 49,
          "links": [],
          "mode": "html",
          "repeat": null,
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 34
          },
          "id": 56,
          "panels": [],
          "repeat": "tcp_destination",
          "title": "$tcp_destination",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 12,
            "x": 0,
            "y": 35
          },
          "id": 47,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(round(sum(irate(istio_tcp_bytes_received{destination_service=~\"$tcp_destination\",destination_version=~\"$destination_version\", source_service=~\"$source\", source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version), 0.001), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "intervalFactor": 1,
              "legendFormat": "{{ source_service }}-{{ source_version}} -> {{ destination_version }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Bytes Received",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 12,
            "x": 12,
            "y": 35
          },
          "id": 48,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(round(sum(irate(istio_tcp_bytes_sent{destination_service=~\"$tcp_destination\",destination_version=~\"$destination_version\", source_service=~\"$source\", source_version=~\"$source_version\"}[1m])) by (source_service, source_version, destination_version), 0.001), \"source_service\", \"$1\", \"source_service\", \"(.*).svc.cluster.local\")",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_version }} -> {{ source_service }}-{{source_version}} ",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Bytes Sent",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "refresh": "5s",
      "schemaVersion": 16,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Source",
            "multi": true,
            "name": "source",
            "options": [],
            "query": "label_values(source_service)",
            "refresh": 1,
            "regex": ".+",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Source Version",
            "multi": true,
            "name": "source_version",
            "options": [],
            "query": "label_values(source_version)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 2,
            "includeAll": true,
            "label": "Destination",
            "multi": true,
            "name": "destination",
            "options": [],
            "query": "label_values(destination_service)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "HTTP Destination",
            "multi": true,
            "name": "http_destination",
            "options": [],
            "query": "label_values(istio_request_count, destination_service)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "TCP Destination",
            "multi": true,
            "name": "tcp_destination",
            "options": [],
            "query": "label_values(istio_tcp_bytes_received, destination_service)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Destination Version",
            "multi": true,
            "name": "destination_version",
            "options": [],
            "query": "label_values(destination_version)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-5m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Istio Dashboard",
      "uid": "1",
      "version": 1
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-istio
  namespace: knative-monitoring
---
apiVersion: v1
data:
  mixer-dashboard.json: |
    {
      "__inputs": [
        {
          "name": "prometheus",
          "label": "Prometheus",
          "description": "",
          "type": "datasource",
          "pluginId": "prometheus",
          "pluginName": "Prometheus"
        }
      ],
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 1,
      "id": null,
      "iteration": 1520470122238,
      "links": [],
      "panels": [
        {
          "content": "<center><h2>Resource Usage</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "height": "40",
          "id": 29,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 3
          },
          "id": 5,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(process_virtual_memory_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Virtual Memory ({{ job }})",
              "refId": "I"
            },
            {
              "expr": "sum(process_resident_memory_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Resident Memory ({{ job }})",
              "refId": "H"
            },
            {
              "expr": "sum(go_memstats_heap_sys_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "heap sys ({{ job }})",
              "refId": "A"
            },
            {
              "expr": "sum(go_memstats_heap_alloc_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "heap alloc ({{ job }})",
              "refId": "D"
            },
            {
              "expr": "sum(go_memstats_alloc_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Alloc ({{ job }})",
              "refId": "F"
            },
            {
              "expr": "sum(go_memstats_heap_inuse_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Heap in-use ({{ job }})",
              "refId": "E"
            },
            {
              "expr": "sum(go_memstats_stack_inuse_bytes{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Stack in-use ({{ job }})",
              "refId": "G"
            },
            {
              "expr": "sum(label_replace(container_memory_usage_bytes{container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (service)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ service }} total (k8s)",
              "refId": "C"
            },
            {
              "expr": "sum(label_replace(container_memory_usage_bytes{container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (container_name, service)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ service }} - {{ container_name }} (k8s)",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 3
          },
          "id": 6,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(label_replace(container_cpu_usage_seconds_total{container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (service)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ service }} total (k8s)",
              "refId": "A"
            },
            {
              "expr": "sum(label_replace(container_cpu_usage_seconds_total{container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (container_name, service)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ service }} - {{ container_name }} (k8s)",
              "refId": "B"
            },
            {
              "expr": "sum(irate(process_cpu_seconds_total{job=~\"mixer-.*\"}[1m])) by (job)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ job }} (self-reported)",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 3
          },
          "id": 7,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(process_open_fds{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "hide": true,
              "instant": false,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "Open FDs ({{ job }})",
              "refId": "A"
            },
            {
              "expr": "sum(label_replace(container_fs_usage_bytes{container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (container_name, service)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ service }} - {{ container_name }}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Disk",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "decimals": null,
              "format": "none",
              "label": "",
              "logBase": 1024,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 3
          },
          "id": 4,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": false,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(go_goroutines{job=~\"mixer-.*\"}) by (job)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Number of Goroutines ({{ job }})",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Goroutines",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        },
        {
          "content": "<center><h2>Mixer Overview</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 10
          },
          "height": "40px",
          "id": 30,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 0,
            "y": 13
          },
          "id": 9,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "rate(envoy_cluster_mixer_check_server_upstream_rq_total[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "envoy (Check)",
              "refId": "A"
            },
            {
              "expr": "rate(envoy_cluster_mixer_report_server_upstream_rq_total[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "envoy (Report)",
              "refId": "D"
            },
            {
              "expr": "sum(rate(grpc_server_handled_total[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "mixer (Total)",
              "refId": "B"
            },
            {
              "expr": "rate(grpc_server_handled_total[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "mixer ({{ grpc_method }})",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Incoming Requests",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 6,
            "y": 13
          },
          "id": 8,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "{}",
              "yaxis": 1
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_cluster_mixer_check_server_upstream_rq_time",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ quantile }} (envoy Check)",
              "refId": "A"
            },
            {
              "expr": "envoy_cluster_mixer_report_server_upstream_rq_time",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ quantile }} (envoy Report)",
              "refId": "E"
            },
            {
              "expr": "histogram_quantile(0.5, sum(rate(grpc_server_handling_seconds_bucket{}[1m])) by (grpc_method, le)) * 1000",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ grpc_method }} 0.5",
              "refId": "B"
            },
            {
              "expr": "histogram_quantile(0.9, sum(rate(grpc_server_handling_seconds_bucket{}[1m])) by (grpc_method, le)) * 1000",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ grpc_method }} 0.9",
              "refId": "C"
            },
            {
              "expr": "histogram_quantile(0.99, sum(rate(grpc_server_handling_seconds_bucket{}[1m])) by (grpc_method, le)) * 1000",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ grpc_method }} 0.99",
              "refId": "D"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Response Durations",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ms",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 12,
            "y": 13
          },
          "id": 11,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "rate(envoy_cluster_mixer_check_server_upstream_rq_5xx[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Envoy Check",
              "refId": "A"
            },
            {
              "expr": "rate(envoy_cluster_mixer_report_server_upstream_rq_5xx[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Envoy Report",
              "refId": "C"
            },
            {
              "expr": "sum(rate(grpc_server_handled_total{grpc_code=~\"Unknown|Unimplemented|Internal|DataLoss\"}[1m])) by (grpc_method)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Mixer {{ grpc_method }}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Server Error Rate (5xx responses)",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 18,
            "y": 13
          },
          "id": 12,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "irate(envoy_cluster_mixer_check_server_upstream_rq_4xx[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Envoy Check",
              "refId": "A"
            },
            {
              "expr": "irate(envoy_cluster_mixer_report_server_upstream_rq_4xx[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Envoy Report",
              "refId": "C"
            },
            {
              "expr": "sum(irate(grpc_server_handled_total{grpc_code!=\"OK\",grpc_service=~\".*Mixer\"}[1m])) by (grpc_method)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Mixer {{ grpc_method }}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Non-successes (4xxs)",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 19
          },
          "id": 10,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_cluster_mixer_check_server_upstream_cx_active",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Active  (mixer_check_server)",
              "refId": "B"
            },
            {
              "expr": "envoy_cluster_mixer_report_server_upstream_cx_active",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Active  (mixer_report_server)",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Connections",
          "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": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 19
          },
          "id": 1,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_cluster_mixer_check_server_membership_healthy",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Healthy (mixer_check_server)",
              "refId": "A"
            },
            {
              "expr": "envoy_cluster_mixer_check_server_membership_total",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Total (mixer_check_server)",
              "refId": "B"
            },
            {
              "expr": "envoy_cluster_mixer_report_server_membership_healthy",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Healthy (mixer_report_server)",
              "refId": "C"
            },
            {
              "expr": "envoy_cluster_mixer_report_server_membership_total",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Total (mixer_report_server)",
              "refId": "D"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Cluster Membership",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 19
          },
          "id": 35,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "rate(envoy_cluster_mixer_check_server_outlier_detection_ejections_enforced_total[1m])",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Total Ejections (mixer_check_server)",
              "refId": "A"
            },
            {
              "expr": "rate(envoy_cluster_mixer_check_server_outlier_detection_ejections_overflow[1m])",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Overflow Ejections (mixer_check_server)",
              "refId": "B"
            },
            {
              "expr": "envoy_cluster_mixer_check_server_outlier_detection_ejections_active",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Active Ejections (mixer_check_server)",
              "refId": "C"
            },
            {
              "expr": "rate(envoy_cluster_mixer_report_server_outlier_detection_ejections_enforced_total[1m])",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Total Ejections (mixer_report_server)",
              "refId": "D"
            },
            {
              "expr": "rate(envoy_cluster_mixer_report_server_outlier_detection_ejections_overflow[1m])",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Overflow Ejections (mixer_report_server)",
              "refId": "E"
            },
            {
              "expr": "envoy_cluster_mixer_report_server_outlier_detection_ejections_active",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Active Ejections (mixer_report_server)",
              "refId": "F"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Outliers",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 19
          },
          "id": 36,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "irate(envoy_cluster_mixer_check_server_upstream_rq_retry[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Total (mixer_check_server)",
              "refId": "A"
            },
            {
              "expr": "irate(envoy_cluster_mixer_check_server_upstream_rq_retry_success[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Success  (mixer_check_server)",
              "refId": "B"
            },
            {
              "expr": "irate(envoy_cluster_mixer_check_server_upstream_rq_retry_overflow[1m])",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Overflow  (mixer_check_server)",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Client Retries",
          "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": false
            }
          ]
        },
        {
          "content": "<center><h2>Adapters and Config</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 26
          },
          "id": 28,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 29
          },
          "id": 13,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(mixer_runtime_dispatch_count{adapter=~\"$adapter\"}[1m])) by (adapter)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ adapter }}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Adapter Dispatch Count",
          "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": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 29
          },
          "id": 14,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "histogram_quantile(0.5, sum(irate(mixer_runtime_dispatch_duration_bucket{adapter=~\"$adapter\"}[1m])) by (adapter, le))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ adapter }} - p50",
              "refId": "A"
            },
            {
              "expr": "histogram_quantile(0.9, sum(irate(mixer_runtime_dispatch_duration_bucket{adapter=~\"$adapter\"}[1m])) by (adapter, le))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ adapter }} - p90 ",
              "refId": "B"
            },
            {
              "expr": "histogram_quantile(0.99, sum(irate(mixer_runtime_dispatch_duration_bucket{adapter=~\"$adapter\"}[1m])) by (adapter, le))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ adapter }} - p99",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Adapter Dispatch Duration",
          "tooltip": {
            "shared": true,
            "sort": 1,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "s",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 36
          },
          "id": 60,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "scalar(topk(1, max(mixer_config_rule_config_count) by (configID)))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Rules",
              "refId": "A"
            },
            {
              "expr": "scalar(topk(1, max(mixer_config_rule_config_error_count) by (configID)))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Config Errors",
              "refId": "B"
            },
            {
              "expr": "scalar(topk(1, max(mixer_config_rule_config_match_error_count) by (configID)))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Match Errors",
              "refId": "C"
            },
            {
              "expr": "scalar(topk(1, max(mixer_config_unsatisfied_action_handler_count) by (configID)))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Unsatisfied Actions",
              "refId": "D"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Rules",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 36
          },
          "id": 56,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "scalar(topk(1, max(mixer_config_instance_config_count) by (configID)))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Instances",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Instances in Latest Config",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 36
          },
          "id": 54,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "scalar(topk(1, max(mixer_config_handler_config_count) by (configID)))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Handlers",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Handlers in Latest Config",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 36
          },
          "id": 58,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "scalar(topk(1, max(mixer_config_attribute_count) by (configID)))",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "Attributes",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Attributes in Latest Config",
          "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
            }
          ]
        },
        {
          "content": "<center><h2>Individual Adapters</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 43
          },
          "id": 23,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 46
          },
          "id": 46,
          "panels": [],
          "repeat": "adapter",
          "title": "$adapter Adapter",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 47
          },
          "id": 17,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(irate(mixer_runtime_dispatch_count{adapter=\"$adapter\"}[1m]),\"handler\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ handler }} (error: {{  error }})",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Dispatch Count By Handler",
          "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": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 47
          },
          "id": 18,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(histogram_quantile(0.5, sum(rate(mixer_runtime_dispatch_duration_bucket{adapter=\"$adapter\"}[1m])) by (handler, error, le)),  \"handler_short\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "p50 - {{ handler_short }} (error: {{ error }})",
              "refId": "A"
            },
            {
              "expr": "label_replace(histogram_quantile(0.9, sum(irate(mixer_runtime_dispatch_duration_bucket{adapter=\"$adapter\"}[1m])) by (handler, error, le)),  \"handler_short\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "p90 - {{ handler_short }} (error: {{ error }})",
              "refId": "D"
            },
            {
              "expr": "label_replace(histogram_quantile(0.99, sum(irate(mixer_runtime_dispatch_duration_bucket{adapter=\"$adapter\"}[1m])) by (handler, error, le)),  \"handler_short\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "p99 - {{ handler_short }} (error: {{ error }})",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Dispatch Duration By Handler",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "s",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "refresh": "5s",
      "schemaVersion": 16,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Adapter",
            "multi": true,
            "name": "adapter",
            "options": [],
            "query": "label_values(adapter)",
            "refresh": 2,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-5m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "",
      "title": "Mixer Dashboard",
      "uid": "2",
      "version": 9
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-mixer
  namespace: knative-monitoring
---
apiVersion: v1
data:
  pilot-dashboard.json: |
    {
      "__inputs": [
        {
          "name": "prometheus",
          "label": "Prometheus",
          "description": "",
          "type": "datasource",
          "pluginId": "prometheus",
          "pluginName": "Prometheus"
        }
      ],
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 1,
      "id": null,
      "links": [],
      "panels": [
        {
          "content": "<center><h2>Resource Usage</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "height": "40",
          "id": 29,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 3
          },
          "id": 5,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "process_virtual_memory_bytes{job=\"pilot\"}",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 2,
              "legendFormat": "Virtual Memory",
              "refId": "I",
              "step": 2
            },
            {
              "expr": "process_resident_memory_bytes{job=\"pilot\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Resident Memory",
              "refId": "H",
              "step": 2
            },
            {
              "expr": "go_memstats_heap_sys_bytes{job=\"pilot\"}",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "heap sys",
              "refId": "A"
            },
            {
              "expr": "go_memstats_heap_alloc_bytes{job=\"pilot\"}",
              "format": "time_series",
              "hide": true,
              "intervalFactor": 2,
              "legendFormat": "heap alloc",
              "refId": "D"
            },
            {
              "expr": "go_memstats_alloc_bytes{job=\"pilot\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Alloc",
              "refId": "F",
              "step": 2
            },
            {
              "expr": "go_memstats_heap_inuse_bytes{job=\"pilot\"}",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Heap in-use",
              "refId": "E",
              "step": 2
            },
            {
              "expr": "go_memstats_stack_inuse_bytes{job=\"pilot\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Stack in-use",
              "refId": "G",
              "step": 2
            },
            {
              "expr": "sum(container_memory_usage_bytes{container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"})",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Total (k8s)",
              "refId": "C",
              "step": 2
            },
            {
              "expr": "container_memory_usage_bytes{container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ container_name }} (k8s)",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Memory",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 3
          },
          "id": 6,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "Total (k8s)",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}[1m])) by (container_name)",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "{{ container_name }} (k8s)",
              "refId": "B",
              "step": 2
            },
            {
              "expr": "irate(process_cpu_seconds_total{job=\"pilot\"}[1m])",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 2,
              "legendFormat": "pilot (self-reported)",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 3
          },
          "id": 7,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "process_open_fds{job=\"pilot\"}",
              "format": "time_series",
              "hide": true,
              "instant": false,
              "interval": "",
              "intervalFactor": 2,
              "legendFormat": "Open FDs (pilot)",
              "refId": "A"
            },
            {
              "expr": "container_fs_usage_bytes{container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ container_name }}",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Disk",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "decimals": null,
              "format": "none",
              "label": "",
              "logBase": 1024,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 3
          },
          "id": 4,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": false,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "go_goroutines{job=\"pilot\"}",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Number of Goroutines",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Goroutines",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        },
        {
          "content": "<center><h2>Pilot Overview</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 10
          },
          "height": "40px",
          "id": 30,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 13
          },
          "id": 9,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(rate(pilot_discovery_calls[1m])) by (method)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ method }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Discovery Calls",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 13
          },
          "id": 12,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(pilot_discovery_errors[1m])) by (method)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ method }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Discovery Errors",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 13
          },
          "id": 38,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(pilot_discovery_cache_size) by (cache_name)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ cache_name }}",
              "refId": "A",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Discovery Cache Sizes",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 13
          },
          "id": 39,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "histogram_quantile(0.5, sum(irate(pilot_discovery_resources_bucket[1m])) by (le, method))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ method }} -  p50",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "histogram_quantile(0.9, sum(irate(pilot_discovery_resources_bucket[1m])) by (le, method))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ method }} -  p90",
              "refId": "B",
              "step": 2
            },
            {
              "expr": "histogram_quantile(0.99, sum(irate(pilot_discovery_resources_bucket[1m])) by (le, method))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ method }} -  p99",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Discovery Returned Resource Counts",
          "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": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 0,
            "y": 20
          },
          "id": 37,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(pilot_discovery_cache_hit{cache_name=\"cds\"}[1m]))",
              "intervalFactor": 2,
              "legendFormat": "Hits",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "sum(irate(pilot_discovery_cache_miss{cache_name=\"cds\"}[1m]))",
              "intervalFactor": 2,
              "legendFormat": "MIsses",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "CDS Cache",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 6,
            "y": 20
          },
          "id": 46,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(pilot_discovery_cache_hit{cache_name=\"lds\"}[1m])) ",
              "intervalFactor": 2,
              "legendFormat": "Hits",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "sum(irate(pilot_discovery_cache_miss{cache_name=\"lds\"}[1m])) ",
              "intervalFactor": 2,
              "legendFormat": "Misses",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "LDS Cache",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 12,
            "y": 20
          },
          "id": 47,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(pilot_discovery_cache_hit{cache_name=\"rds\"}[1m]))",
              "intervalFactor": 2,
              "legendFormat": "Hits",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "sum(irate(pilot_discovery_cache_miss{cache_name=\"rds\"}[1m]))",
              "intervalFactor": 2,
              "legendFormat": "Misses",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "RDS Cache",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 6,
            "x": 18,
            "y": 20
          },
          "id": 48,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(pilot_discovery_cache_hit{cache_name=\"sds\"}[1m]))",
              "intervalFactor": 2,
              "legendFormat": "Hits",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "sum(irate(pilot_discovery_cache_miss{cache_name=\"sds\"}[1m]))",
              "intervalFactor": 2,
              "legendFormat": "Misses",
              "refId": "B",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "SDS Cache",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 27
          },
          "id": 45,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(envoy_cluster_rds_membership_healthy)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Pilot (healthy)",
              "refId": "E",
              "step": 2
            },
            {
              "expr": "sum(envoy_cluster_rds_membership_total)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Pilot (total)",
              "refId": "F",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Cluster Membership",
          "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": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 12,
            "y": 27
          },
          "id": 50,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(envoy_cluster_rds_upstream_rq_time) by (quantile)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "{{ quantile }}",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Request Latency",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ms",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "content": "<center><h2>xDS</h2></center>",
          "gridPos": {
            "h": 3,
            "w": 24,
            "x": 0,
            "y": 34
          },
          "id": 28,
          "links": [],
          "mode": "html",
          "title": "",
          "transparent": true,
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 8,
            "x": 0,
            "y": 37
          },
          "id": 40,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(envoy_cluster_manager_cds_update_attempt[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "CDS Attempts",
              "refId": "F"
            },
            {
              "expr": "sum(irate(envoy_cluster_manager_cds_update_success[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "CDS Successes",
              "refId": "A"
            },
            {
              "expr": "sum(irate(envoy_listener_manager_lds_update_attempt[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "LDS Attempts",
              "refId": "E"
            },
            {
              "expr": "sum(irate(envoy_listener_manager_lds_update_success[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "LDS Successes",
              "refId": "B"
            },
            {
              "expr": "sum(irate(envoy_cluster_rds_update_attempt[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "RDS Attempts",
              "refId": "G"
            },
            {
              "expr": "sum(irate(envoy_cluster_rds_update_success[1m]))",
              "format": "time_series",
              "hide": false,
              "intervalFactor": 1,
              "legendFormat": "RDS Successes",
              "refId": "I"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Updates",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 8,
            "x": 8,
            "y": 37
          },
          "id": 42,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(irate(envoy_cluster_manager_cds_update_failure[1m]))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "CDS",
              "refId": "A",
              "step": 2
            },
            {
              "expr": "sum(irate(envoy_listener_manager_lds_update_failure[1m]))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "LDS",
              "refId": "B",
              "step": 2
            },
            {
              "expr": "sum(irate(envoy_cluster_rds_update_attempt[1m])) - sum(irate(envoy_cluster_rds_update_success[1m]))",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "RDS",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Failures",
          "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 6,
            "w": 8,
            "x": 16,
            "y": 37
          },
          "id": 41,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(envoy_cluster_rds_upstream_cx_active)",
              "format": "time_series",
              "intervalFactor": 2,
              "legendFormat": "Pilot (RDS)",
              "refId": "C",
              "step": 2
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Active Connections",
          "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
            }
          ]
        }
      ],
      "refresh": "5s",
      "schemaVersion": 16,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-5m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Pilot Dashboard",
      "uid": "3",
      "version": 2
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-pilot
  namespace: knative-monitoring
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: kube-state-metrics
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: kube-state-metrics-resizer
  namespace: knative-monitoring
rules:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
- apiGroups:
  - extensions
  resourceNames:
  - kube-state-metrics
  resources:
  - deployments
  verbs:
  - get
  - update
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  name: kube-state-metrics
  namespace: knative-monitoring
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: kube-state-metrics-resizer
subjects:
- kind: ServiceAccount
  name: kube-state-metrics
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: kube-state-metrics
  namespace: knative-monitoring
rules:
- apiGroups:
  - ""
  resources:
  - configmaps
  - secrets
  - nodes
  - pods
  - services
  - resourcequotas
  - replicationcontrollers
  - limitranges
  - persistentvolumeclaims
  - persistentvolumes
  - namespaces
  - endpoints
  verbs:
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - daemonsets
  - deployments
  - replicasets
  verbs:
  - list
  - watch
- apiGroups:
  - apps
  resources:
  - statefulsets
  verbs:
  - list
  - watch
- apiGroups:
  - batch
  resources:
  - cronjobs
  - jobs
  verbs:
  - list
  - watch
- apiGroups:
  - autoscaling
  resources:
  - horizontalpodautoscalers
  verbs:
  - list
  - watch
- apiGroups:
  - authentication.k8s.io
  resources:
  - tokenreviews
  verbs:
  - create
- apiGroups:
  - authorization.k8s.io
  resources:
  - subjectaccessreviews
  verbs:
  - create
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: kube-state-metrics
  namespace: knative-monitoring
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kube-state-metrics
subjects:
- kind: ServiceAccount
  name: kube-state-metrics
  namespace: knative-monitoring
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kube-state-metrics
  namespace: knative-monitoring
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: kube-state-metrics
    spec:
      containers:
      - args:
        - --secure-listen-address=:8443
        - --upstream=http://127.0.0.1:8081/
        image: quay.io/coreos/kube-rbac-proxy:v0.3.0
        name: kube-rbac-proxy-main
        ports:
        - containerPort: 8443
          name: https-main
        resources:
          limits:
            cpu: 20m
            memory: 40Mi
          requests:
            cpu: 10m
            memory: 20Mi
      - args:
        - --secure-listen-address=:9443
        - --upstream=http://127.0.0.1:8082/
        image: quay.io/coreos/kube-rbac-proxy:v0.3.0
        name: kube-rbac-proxy-self
        ports:
        - containerPort: 9443
          name: https-self
        resources:
          limits:
            cpu: 20m
            memory: 40Mi
          requests:
            cpu: 10m
            memory: 20Mi
      - args:
        - --host=127.0.0.1
        - --port=8081
        - --telemetry-host=127.0.0.1
        - --telemetry-port=8082
        image: quay.io/coreos/kube-state-metrics:v1.3.0
        name: kube-state-metrics
      - command:
        - /pod_nanny
        - --container=kube-state-metrics
        - --cpu=100m
        - --extra-cpu=1m
        - --memory=100Mi
        - --extra-memory=2Mi
        - --threshold=5
        - --deployment=kube-state-metrics
        env:
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: k8s.gcr.io/addon-resizer:1.7
        name: addon-resizer
        resources:
          limits:
            cpu: 100m
            memory: 30Mi
          requests:
            cpu: 100m
            memory: 30Mi
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      serviceAccountName: kube-state-metrics
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: kube-state-metrics
  name: kube-state-metrics
  namespace: knative-monitoring
spec:
  clusterIP: None
  ports:
  - name: https-main
    port: 8443
    protocol: TCP
    targetPort: https-main
  - name: https-self
    port: 9443
    protocol: TCP
    targetPort: https-self
  selector:
    app: kube-state-metrics
---
apiVersion: v1
data:
  kubernetes-deployment-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "id": null,
      "links": [],
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "200px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 8,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "cores",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 4,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[3m]))",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "CPU",
              "type": "singlestat",
              "valueFontSize": "110%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 9,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "GB",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "80%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 4,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "sum(container_memory_usage_bytes{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}) / 1024^3",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Memory",
              "type": "singlestat",
              "valueFontSize": "110%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "Bps",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": false
              },
              "id": 7,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 4,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "sum(rate(container_network_transmit_bytes_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{namespace=\"$deployment_namespace\",pod_name=~\"$deployment_name.*\"}[3m]))",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Network",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "100px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": false
              },
              "id": 5,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "metric": "kube_deployment_spec_replicas",
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Desired Replicas",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 6,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Available Replicas",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 3,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(kube_deployment_status_observed_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Observed Generation",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 2,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(kube_deployment_metadata_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Metadata Generation",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "350px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 1,
              "isNew": true,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 12,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "max(kube_deployment_status_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "current replicas",
                  "refId": "A",
                  "step": 30
                },
                {
                  "expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "available",
                  "refId": "B",
                  "step": 30
                },
                {
                  "expr": "max(kube_deployment_status_replicas_unavailable{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "unavailable",
                  "refId": "C",
                  "step": 30
                },
                {
                  "expr": "min(kube_deployment_status_replicas_updated{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "updated",
                  "refId": "D",
                  "step": 30
                },
                {
                  "expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "desired",
                  "refId": "E",
                  "step": 30
                }
              ],
              "title": "Replicas",
              "tooltip": {
                "msResolution": true,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "none",
                  "label": "",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "label": "",
                  "logBase": 1,
                  "show": false
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": ".*",
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Namespace",
            "multi": false,
            "name": "deployment_namespace",
            "options": [],
            "query": "label_values(kube_deployment_metadata_generation, namespace)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": null,
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Deployment",
            "multi": false,
            "name": "deployment_name",
            "options": [],
            "query": "label_values(kube_deployment_metadata_generation{namespace=\"$deployment_namespace\"}, deployment)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "deployment",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Deployment",
      "version": 1
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-deployment
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-capacity-planning-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "id": null,
      "links": [],
      "refresh": false,
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 3,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(rate(node_cpu{mode=\"idle\"}[2m])) * 100",
                  "hide": false,
                  "intervalFactor": 10,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 50
                }
              ],
              "title": "Idle CPU",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "percent",
                  "label": "cpu usage",
                  "logBase": 1,
                  "min": 0,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 9,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(node_load1)",
                  "intervalFactor": 4,
                  "legendFormat": "load 1m",
                  "refId": "A",
                  "step": 20,
                  "target": ""
                },
                {
                  "expr": "sum(node_load5)",
                  "intervalFactor": 4,
                  "legendFormat": "load 5m",
                  "refId": "B",
                  "step": 20,
                  "target": ""
                },
                {
                  "expr": "sum(node_load15)",
                  "intervalFactor": 4,
                  "legendFormat": "load 15m",
                  "refId": "C",
                  "step": 20,
                  "target": ""
                }
              ],
              "title": "System Load",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "percentunit",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 4,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "node_memory_SwapFree{instance=\"172.17.0.1:9100\",job=\"prometheus\"}",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 9,
              "stack": true,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(node_memory_MemTotal) - sum(node_memory_MemFree) - sum(node_memory_Buffers) - sum(node_memory_Cached)",
                  "intervalFactor": 2,
                  "legendFormat": "memory usage",
                  "metric": "memo",
                  "refId": "A",
                  "step": 10,
                  "target": ""
                },
                {
                  "expr": "sum(node_memory_Buffers)",
                  "interval": "",
                  "intervalFactor": 2,
                  "legendFormat": "memory buffers",
                  "metric": "memo",
                  "refId": "B",
                  "step": 10,
                  "target": ""
                },
                {
                  "expr": "sum(node_memory_Cached)",
                  "interval": "",
                  "intervalFactor": 2,
                  "legendFormat": "memory cached",
                  "metric": "memo",
                  "refId": "C",
                  "step": 10,
                  "target": ""
                },
                {
                  "expr": "sum(node_memory_MemFree)",
                  "interval": "",
                  "intervalFactor": 2,
                  "legendFormat": "memory free",
                  "metric": "memo",
                  "refId": "D",
                  "step": 10,
                  "target": ""
                }
              ],
              "title": "Memory Usage",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "min": "0",
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 5,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "((sum(node_memory_MemTotal) - sum(node_memory_MemFree) - sum(node_memory_Buffers) - sum(node_memory_Cached)) / sum(node_memory_MemTotal)) * 100",
                  "intervalFactor": 2,
                  "metric": "",
                  "refId": "A",
                  "step": 60,
                  "target": ""
                }
              ],
              "thresholds": "80, 90",
              "title": "Memory Usage",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "246px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 6,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "read",
                  "yaxis": 1
                },
                {
                  "alias": "{instance=\"172.17.0.1:9100\"}",
                  "yaxis": 2
                },
                {
                  "alias": "io time",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 9,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(rate(node_disk_bytes_read[5m]))",
                  "hide": false,
                  "intervalFactor": 4,
                  "legendFormat": "read",
                  "refId": "A",
                  "step": 20,
                  "target": ""
                },
                {
                  "expr": "sum(rate(node_disk_bytes_written[5m]))",
                  "intervalFactor": 4,
                  "legendFormat": "written",
                  "refId": "B",
                  "step": 20
                },
                {
                  "expr": "sum(rate(node_disk_io_time_ms[5m]))",
                  "intervalFactor": 4,
                  "legendFormat": "io time",
                  "refId": "C",
                  "step": 20
                }
              ],
              "title": "Disk I/O",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "ms",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percentunit",
              "gauge": {
                "maxValue": 1,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 12,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(node_filesystem_size{device!=\"rootfs\"}) - sum(node_filesystem_free{device!=\"rootfs\"})) / sum(node_filesystem_size{device!=\"rootfs\"})",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 60,
                  "target": ""
                }
              ],
              "thresholds": "0.75, 0.9",
              "title": "Disk Space Usage",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 8,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "transmitted",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(rate(node_network_receive_bytes{device!~\"lo\"}[5m]))",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 10,
                  "target": ""
                }
              ],
              "title": "Network Received",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 10,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "transmitted",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(rate(node_network_transmit_bytes{device!~\"lo\"}[5m]))",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "B",
                  "step": 10,
                  "target": ""
                }
              ],
              "title": "Network Transmitted",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "276px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 11,
              "isNew": true,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 11,
              "span": 9,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum(kube_pod_info)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "Current number of Pods",
                  "refId": "A",
                  "step": 10
                },
                {
                  "expr": "sum(kube_node_status_capacity_pods)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "Maximum capacity of pods",
                  "refId": "B",
                  "step": 10
                }
              ],
              "title": "Cluster Pod Utilization",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 7,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "100 - (sum(kube_node_status_capacity_pods) - sum(kube_pod_info)) / sum(kube_node_status_capacity_pods) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 60,
                  "target": ""
                }
              ],
              "thresholds": "80, 90",
              "title": "Pod Utilization",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-1h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Kubernetes Capacity Planning",
      "version": 4
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-capacity-planning
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-cluster-health-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "id": null,
      "links": [],
      "refresh": "10s",
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "254px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 1,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(up{job=~\"apiserver|kube-scheduler|kube-controller-manager\"} == 0)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Control Plane Components Down",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "Everything UP and healthy",
                  "value": "null"
                },
                {
                  "op": "=",
                  "text": "",
                  "value": ""
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 2,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(ALERTS{alertstate=\"firing\",alertname!=\"DeadMansSwitch\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Alerts Firing",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "0",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 3,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(ALERTS{alertstate=\"pending\",alertname!=\"DeadMansSwitch\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "3, 5",
              "title": "Alerts Pending",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "0",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 4,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "count(increase(kube_pod_container_status_restarts[1h]) > 5)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Crashlooping Pods",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "0",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": false,
          "title": "Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 5,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(kube_node_status_condition{condition=\"Ready\",status!=\"true\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Node Not Ready",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 6,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(kube_node_status_condition{condition=\"DiskPressure\",status=\"true\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Node Disk Pressure",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 7,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(kube_node_status_condition{condition=\"MemoryPressure\",status=\"true\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Node Memory Pressure",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 8,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(kube_node_spec_unschedulable)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Nodes Unschedulable",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": false,
          "title": "Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Kubernetes Cluster Health",
      "version": 9
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-cluster-health
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-cluster-status-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "graphTooltip": 0,
      "hideControls": false,
      "links": [],
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "129px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 5,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 6,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(up{job=~\"apiserver|kube-scheduler|kube-controller-manager\"} == 0)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Control Plane UP",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "UP",
                  "value": "null"
                }
              ],
              "valueName": "total"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 6,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 6,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(ALERTS{alertstate=\"firing\",alertname!=\"DeadMansSwitch\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "3, 5",
              "title": "Alerts Firing",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "0",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": true,
          "title": "Cluster Health",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "168px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 1,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(up{job=\"apiserver\"} == 1) / count(up{job=\"apiserver\"})) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "50, 80",
              "title": "API Servers UP",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 2,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(up{job=\"kube-controller-manager\"} == 1) / count(up{job=\"kube-controller-manager\"})) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "50, 80",
              "title": "Controller Managers UP",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 3,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(up{job=\"kube-scheduler\"} == 1) / count(up{job=\"kube-scheduler\"})) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "50, 80",
              "title": "Schedulers UP",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            },
            {
              "colorBackground": false,
              "colorValue": true,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 4,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "count(increase(kube_pod_container_status_restarts{namespace=~\"kube-system|tectonic-system\"}[1h]) > 5)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "1, 3",
              "title": "Crashlooping Control Plane Pods",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "0",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": true,
          "title": "Control Plane Status",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "158px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 8,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "sum(100 - (avg by (instance) (rate(node_cpu{job=\"node-exporter\",mode=\"idle\"}[5m])) * 100)) / count(node_cpu{job=\"node-exporter\",mode=\"idle\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "80, 90",
              "title": "CPU Utilization",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 7,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "((sum(node_memory_MemTotal) - sum(node_memory_MemFree) - sum(node_memory_Buffers) - sum(node_memory_Cached)) / sum(node_memory_MemTotal)) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "80, 90",
              "title": "Memory Utilization",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 9,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(node_filesystem_size{device!=\"rootfs\"}) - sum(node_filesystem_free{device!=\"rootfs\"})) / sum(node_filesystem_size{device!=\"rootfs\"})",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "80, 90",
              "title": "Filesystem Utilization",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 10,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "100 - (sum(kube_node_status_capacity_pods) - sum(kube_pod_info)) / sum(kube_node_status_capacity_pods) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "80, 90",
              "title": "Pod Utilization",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": true,
          "title": "Capacity Planning",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Kubernetes Cluster Status",
      "version": 3
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-cluster-status
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-control-plane-status-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "graphTooltip": 0,
      "hideControls": false,
      "links": [],
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 1,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(up{job=\"apiserver\"} == 1) / sum(up{job=\"apiserver\"})) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "50, 80",
              "title": "API Servers UP",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 2,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(up{job=\"kube-controller-manager\"} == 1) / sum(up{job=\"kube-controller-manager\"})) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "50, 80",
              "title": "Controller Managers UP",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 3,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(up{job=\"kube-scheduler\"} == 1) / sum(up{job=\"kube-scheduler\"})) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "50, 80",
              "title": "Schedulers UP",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 4,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(sum by(instance) (rate(apiserver_request_count{code=~\"5..\"}[5m])) / sum by(instance) (rate(apiserver_request_count[5m]))) * 100",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 600
                }
              ],
              "thresholds": "5, 10",
              "title": "API Server Request Error Rate",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "0",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 7,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 1,
              "links": [],
              "nullPointMode": "null",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 12,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum by(verb) (rate(apiserver_latency_seconds:quantile[5m]) >= 0)",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 30
                }
              ],
              "title": "API Server Request Latency",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 5,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 1,
              "links": [],
              "nullPointMode": "null",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "cluster:scheduler_e2e_scheduling_latency_seconds:quantile",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 60
                }
              ],
              "title": "End to End Scheduling Latency",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "dtdurations",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 6,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 1,
              "links": [],
              "nullPointMode": "null",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum by(instance) (rate(apiserver_request_count{code!~\"2..\"}[5m]))",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "Error Rate",
                  "refId": "A",
                  "step": 60
                },
                {
                  "expr": "sum by(instance) (rate(apiserver_request_count[5m]))",
                  "format": "time_series",
                  "intervalFactor": 2,
                  "legendFormat": "Request Rate",
                  "refId": "B",
                  "step": 60
                }
              ],
              "title": "API Server Request Rates",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Kubernetes Control Plane Status",
      "version": 3
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-control-plane-status
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-resource-requests-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "graphTooltip": 0,
      "hideControls": false,
      "links": [],
      "refresh": false,
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "300px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "description": "This represents the total [CPU resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu) in the cluster.\nFor comparison the total [allocatable CPU cores](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 1,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 1,
              "links": [],
              "nullPointMode": "null",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 9,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "min(sum(kube_node_status_allocatable_cpu_cores) by (instance))",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "Allocatable CPU Cores",
                  "refId": "A",
                  "step": 20
                },
                {
                  "expr": "max(sum(kube_pod_container_resource_requests_cpu_cores) by (instance))",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "Requested CPU Cores",
                  "refId": "B",
                  "step": 20
                }
              ],
              "title": "CPU Cores",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "label": "CPU Cores",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 2,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "max(sum(kube_pod_container_resource_requests_cpu_cores) by (instance)) / min(sum(kube_node_status_allocatable_cpu_cores) by (instance)) * 100",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 240
                }
              ],
              "thresholds": "80, 90",
              "title": "CPU Cores",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "110%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "CPU Cores",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "300px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "description": "This represents the total [memory resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory) in the cluster.\nFor comparison the total [allocatable memory](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 3,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 1,
              "links": [],
              "nullPointMode": "null",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 9,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "min(sum(kube_node_status_allocatable_memory_bytes) by (instance))",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "Allocatable Memory",
                  "refId": "A",
                  "step": 20
                },
                {
                  "expr": "max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance))",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "Requested Memory",
                  "refId": "B",
                  "step": 20
                }
              ],
              "title": "Memory",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "label": "Memory",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 4,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance)) / min(sum(kube_node_status_allocatable_memory_bytes) by (instance)) * 100",
                  "intervalFactor": 2,
                  "legendFormat": "",
                  "refId": "A",
                  "step": 240
                }
              ],
              "thresholds": "80, 90",
              "title": "Memory",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "110%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "Memory",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-3h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Kubernetes Resource Requests",
      "version": 2
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-resource-requests
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-nodes-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "description": "Dashboard to get an overview of one server",
      "editable": false,
      "gnetId": 22,
      "graphTooltip": 0,
      "hideControls": false,
      "links": [],
      "refresh": false,
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 3,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "100 - (avg by (cpu) (irate(node_cpu{mode=\"idle\", instance=\"$server\"}[5m])) * 100)",
                  "hide": false,
                  "intervalFactor": 10,
                  "legendFormat": "{{cpu}}",
                  "refId": "A",
                  "step": 50
                }
              ],
              "title": "Idle CPU",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "percent",
                  "label": "cpu usage",
                  "logBase": 1,
                  "max": 100,
                  "min": 0,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 9,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "node_load1{instance=\"$server\"}",
                  "intervalFactor": 4,
                  "legendFormat": "load 1m",
                  "refId": "A",
                  "step": 20,
                  "target": ""
                },
                {
                  "expr": "node_load5{instance=\"$server\"}",
                  "intervalFactor": 4,
                  "legendFormat": "load 5m",
                  "refId": "B",
                  "step": 20,
                  "target": ""
                },
                {
                  "expr": "node_load15{instance=\"$server\"}",
                  "intervalFactor": 4,
                  "legendFormat": "load 15m",
                  "refId": "C",
                  "step": 20,
                  "target": ""
                }
              ],
              "title": "System Load",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "percentunit",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 4,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "node_memory_SwapFree{instance=\"172.17.0.1:9100\",job=\"prometheus\"}",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 9,
              "stack": true,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "node_memory_MemTotal{instance=\"$server\"} - node_memory_MemFree{instance=\"$server\"} - node_memory_Buffers{instance=\"$server\"} - node_memory_Cached{instance=\"$server\"}",
                  "hide": false,
                  "interval": "",
                  "intervalFactor": 2,
                  "legendFormat": "memory used",
                  "metric": "",
                  "refId": "C",
                  "step": 10
                },
                {
                  "expr": "node_memory_Buffers{instance=\"$server\"}",
                  "interval": "",
                  "intervalFactor": 2,
                  "legendFormat": "memory buffers",
                  "metric": "",
                  "refId": "E",
                  "step": 10
                },
                {
                  "expr": "node_memory_Cached{instance=\"$server\"}",
                  "intervalFactor": 2,
                  "legendFormat": "memory cached",
                  "metric": "",
                  "refId": "F",
                  "step": 10
                },
                {
                  "expr": "node_memory_MemFree{instance=\"$server\"}",
                  "intervalFactor": 2,
                  "legendFormat": "memory free",
                  "metric": "",
                  "refId": "D",
                  "step": 10
                }
              ],
              "title": "Memory Usage",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "individual"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "min": "0",
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percent",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 5,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "((node_memory_MemTotal{instance=\"$server\"} - node_memory_MemFree{instance=\"$server\"}  - node_memory_Buffers{instance=\"$server\"} - node_memory_Cached{instance=\"$server\"}) / node_memory_MemTotal{instance=\"$server\"}) * 100",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 60,
                  "target": ""
                }
              ],
              "thresholds": "80, 90",
              "title": "Memory Usage",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 6,
              "isNew": true,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "read",
                  "yaxis": 1
                },
                {
                  "alias": "{instance=\"172.17.0.1:9100\"}",
                  "yaxis": 2
                },
                {
                  "alias": "io time",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 9,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum by (instance) (rate(node_disk_bytes_read{instance=\"$server\"}[2m]))",
                  "hide": false,
                  "intervalFactor": 4,
                  "legendFormat": "read",
                  "refId": "A",
                  "step": 20,
                  "target": ""
                },
                {
                  "expr": "sum by (instance) (rate(node_disk_bytes_written{instance=\"$server\"}[2m]))",
                  "intervalFactor": 4,
                  "legendFormat": "written",
                  "refId": "B",
                  "step": 20
                },
                {
                  "expr": "sum by (instance) (rate(node_disk_io_time_ms{instance=\"$server\"}[2m]))",
                  "intervalFactor": 4,
                  "legendFormat": "io time",
                  "refId": "C",
                  "step": 20
                }
              ],
              "title": "Disk I/O",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "ms",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(50, 172, 45, 0.97)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(245, 54, 54, 0.9)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "percentunit",
              "gauge": {
                "maxValue": 1,
                "minValue": 0,
                "show": true,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "hideTimeOverride": false,
              "id": 7,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "(sum(node_filesystem_size{device!=\"rootfs\",instance=\"$server\"}) - sum(node_filesystem_free{device!=\"rootfs\",instance=\"$server\"})) / sum(node_filesystem_size{device!=\"rootfs\",instance=\"$server\"})",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 60,
                  "target": ""
                }
              ],
              "thresholds": "0.75, 0.9",
              "title": "Disk Space Usage",
              "transparent": false,
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "current"
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 8,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "transmitted",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "rate(node_network_receive_bytes{instance=\"$server\",device!~\"lo\"}[5m])",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "{{device}}",
                  "refId": "A",
                  "step": 10,
                  "target": ""
                }
              ],
              "title": "Network Received",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                }
              ]
            },
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 10,
              "isNew": false,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [
                {
                  "alias": "transmitted",
                  "yaxis": 2
                }
              ],
              "spaceLength": 10,
              "span": 6,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "rate(node_network_transmit_bytes{instance=\"$server\",device!~\"lo\"}[5m])",
                  "hide": false,
                  "intervalFactor": 2,
                  "legendFormat": "{{device}}",
                  "refId": "B",
                  "step": 10,
                  "target": ""
                }
              ],
              "title": "Network Transmitted",
              "tooltip": {
                "msResolution": false,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "server",
            "options": [],
            "query": "label_values(node_boot_time, instance)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-1h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Nodes",
      "version": 2
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-nodes
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-pods-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "graphTooltip": 1,
      "hideControls": false,
      "links": [],
      "refresh": false,
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 1,
              "isNew": false,
              "legend": {
                "alignAsTable": true,
                "avg": true,
                "current": true,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": true,
                "show": true,
                "total": false,
                "values": true
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 12,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum by(container_name) (container_memory_usage_bytes{pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
                  "interval": "10s",
                  "intervalFactor": 1,
                  "legendFormat": "Current: {{ container_name }}",
                  "metric": "container_memory_usage_bytes",
                  "refId": "A",
                  "step": 15
                },
                {
                  "expr": "kube_pod_container_resource_requests_memory_bytes{pod=\"$pod\", container=~\"$container\"}",
                  "interval": "10s",
                  "intervalFactor": 2,
                  "legendFormat": "Requested: {{ container }}",
                  "metric": "kube_pod_container_resource_requests_memory_bytes",
                  "refId": "B",
                  "step": 20
                },
                {
                  "expr": "kube_pod_container_resource_limits_memory_bytes{pod=\"$pod\", container=~\"$container\"}",
                  "interval": "10s",
                  "intervalFactor": 2,
                  "legendFormat": "Limit: {{ container }}",
                  "metric": "kube_pod_container_resource_limits_memory_bytes",
                  "refId": "C",
                  "step": 20
                }
              ],
              "title": "Memory Usage",
              "tooltip": {
                "msResolution": true,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 2,
              "isNew": false,
              "legend": {
                "alignAsTable": true,
                "avg": true,
                "current": true,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": true,
                "show": true,
                "total": false,
                "values": true
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 12,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sum by (container_name)(rate(container_cpu_usage_seconds_total{image!=\"\",container_name!=\"POD\",pod_name=\"$pod\"}[1m]))",
                  "intervalFactor": 2,
                  "legendFormat": "{{ container_name }}",
                  "refId": "A",
                  "step": 30
                },
                {
                  "expr": "kube_pod_container_resource_requests_cpu_cores{pod=\"$pod\", container=~\"$container\"}",
                  "interval": "10s",
                  "intervalFactor": 2,
                  "legendFormat": "Requested: {{ container }}",
                  "metric": "kube_pod_container_resource_requests_cpu_cores",
                  "refId": "B",
                  "step": 20
                },
                {
                  "expr": "kube_pod_container_resource_limits_cpu_cores{pod=\"$pod\", container=~\"$container\"}",
                  "interval": "10s",
                  "intervalFactor": 2,
                  "legendFormat": "Limit: {{ container }}",
                  "metric": "kube_pod_container_resource_limits_memory_bytes",
                  "refId": "C",
                  "step": 20
                }
              ],
              "title": "CPU Usage",
              "tooltip": {
                "msResolution": true,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "250px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 3,
              "isNew": false,
              "legend": {
                "alignAsTable": true,
                "avg": true,
                "current": true,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": true,
                "show": true,
                "total": false,
                "values": true
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 12,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "sort_desc(sum by (pod_name) (rate(container_network_receive_bytes_total{pod_name=\"$pod\"}[1m])))",
                  "intervalFactor": 2,
                  "legendFormat": "{{ pod_name }}",
                  "refId": "A",
                  "step": 30
                }
              ],
              "title": "Network I/O",
              "tooltip": {
                "msResolution": true,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "bytes",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "logBase": 1,
                  "show": true
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "New Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": ".*",
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Namespace",
            "multi": false,
            "name": "namespace",
            "options": [],
            "query": "label_values(kube_pod_info, namespace)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Pod",
            "multi": false,
            "name": "pod",
            "options": [],
            "query": "label_values(kube_pod_info{namespace=~\"$namespace\"}, pod)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": ".*",
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Container",
            "multi": false,
            "name": "container",
            "options": [],
            "query": "label_values(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\"}, container)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "Pods",
      "version": 1
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-pods
  namespace: knative-monitoring
---
apiVersion: v1
data:
  kubernetes-statefulset-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "editable": false,
      "graphTooltip": 1,
      "hideControls": false,
      "links": [],
      "rows": [
        {
          "collapse": false,
          "editable": false,
          "height": "200px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 8,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "cores",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 4,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$statefulset_namespace\",pod_name=~\"$statefulset_name.*\"}[3m]))",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "CPU",
              "type": "singlestat",
              "valueFontSize": "110%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 9,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "GB",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "80%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 4,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "sum(container_memory_usage_bytes{namespace=\"$statefulset_namespace\",pod_name=~\"$statefulset_name.*\"}) / 1024^3",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Memory",
              "type": "singlestat",
              "valueFontSize": "110%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "Bps",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": false
              },
              "id": 7,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfix": "",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 4,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": true
              },
              "targets": [
                {
                  "expr": "sum(rate(container_network_transmit_bytes_total{namespace=\"$statefulset_namespace\",pod_name=~\"$statefulset_name.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{namespace=\"$statefulset_namespace\",pod_name=~\"$statefulset_name.*\"}[3m]))",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Network",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "100px",
          "panels": [
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": false
              },
              "id": 5,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(kube_statefulset_replicas{statefulset=\"$statefulset_name\",namespace=\"$statefulset_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "metric": "kube_statefulset_replicas",
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Desired Replicas",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 6,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "min(kube_statefulset_status_replicas{statefulset=\"$statefulset_name\",namespace=\"$statefulset_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Available Replicas",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 3,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(kube_statefulset_status_observed_generation{statefulset=\"$statefulset_name\",namespace=\"$statefulset_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Observed Generation",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            },
            {
              "colorBackground": false,
              "colorValue": false,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "datasource": "prometheus",
              "editable": false,
              "format": "none",
              "gauge": {
                "maxValue": 100,
                "minValue": 0,
                "show": false,
                "thresholdLabels": false,
                "thresholdMarkers": true
              },
              "id": 2,
              "links": [],
              "mappingType": 1,
              "mappingTypes": [
                {
                  "name": "value to text",
                  "value": 1
                },
                {
                  "name": "range to text",
                  "value": 2
                }
              ],
              "maxDataPoints": 100,
              "nullPointMode": "connected",
              "postfixFontSize": "50%",
              "prefix": "",
              "prefixFontSize": "50%",
              "rangeMaps": [
                {
                  "from": "null",
                  "text": "N/A",
                  "to": "null"
                }
              ],
              "span": 3,
              "sparkline": {
                "fillColor": "rgba(31, 118, 189, 0.18)",
                "full": false,
                "lineColor": "rgb(31, 120, 193)",
                "show": false
              },
              "targets": [
                {
                  "expr": "max(kube_statefulset_metadata_generation{statefulset=\"$statefulset_name\",namespace=\"$statefulset_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "refId": "A",
                  "step": 600
                }
              ],
              "title": "Metadata Generation",
              "type": "singlestat",
              "valueFontSize": "80%",
              "valueMaps": [
                {
                  "op": "=",
                  "text": "N/A",
                  "value": "null"
                }
              ],
              "valueName": "avg"
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        },
        {
          "collapse": false,
          "editable": false,
          "height": "350px",
          "panels": [
            {
              "aliasColors": {},
              "bars": false,
              "dashLength": 10,
              "dashes": false,
              "datasource": "prometheus",
              "editable": false,
              "error": false,
              "fill": 1,
              "grid": {
                "threshold1Color": "rgba(216, 200, 27, 0.27)",
                "threshold2Color": "rgba(234, 112, 112, 0.22)"
              },
              "id": 1,
              "isNew": true,
              "legend": {
                "alignAsTable": false,
                "avg": false,
                "current": false,
                "hideEmpty": false,
                "hideZero": false,
                "max": false,
                "min": false,
                "rightSide": false,
                "show": true,
                "total": false
              },
              "lines": true,
              "linewidth": 2,
              "links": [],
              "nullPointMode": "connected",
              "percentage": false,
              "pointradius": 5,
              "points": false,
              "renderer": "flot",
              "seriesOverrides": [],
              "spaceLength": 10,
              "span": 12,
              "stack": false,
              "steppedLine": false,
              "targets": [
                {
                  "expr": "min(kube_statefulset_status_replicas{statefulset=\"$statefulset_name\",namespace=\"$statefulset_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "available",
                  "refId": "B",
                  "step": 30
                },
                {
                  "expr": "max(kube_statefulset_replicas{statefulset=\"$statefulset_name\",namespace=\"$statefulset_namespace\"}) without (instance, pod)",
                  "intervalFactor": 2,
                  "legendFormat": "desired",
                  "refId": "E",
                  "step": 30
                }
              ],
              "title": "Replicas",
              "tooltip": {
                "msResolution": true,
                "shared": true,
                "sort": 0,
                "value_type": "cumulative"
              },
              "type": "graph",
              "xaxis": {
                "mode": "time",
                "show": true,
                "values": []
              },
              "yaxes": [
                {
                  "format": "none",
                  "label": "",
                  "logBase": 1,
                  "show": true
                },
                {
                  "format": "short",
                  "label": "",
                  "logBase": 1,
                  "show": false
                }
              ]
            }
          ],
          "showTitle": false,
          "title": "Dashboard Row",
          "titleSize": "h6"
        }
      ],
      "schemaVersion": 14,
      "sharedCrosshair": false,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": ".*",
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Namespace",
            "multi": false,
            "name": "statefulset_namespace",
            "options": [],
            "query": "label_values(kube_statefulset_metadata_generation, namespace)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": null,
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "StatefulSet",
            "multi": false,
            "name": "statefulset_name",
            "options": [],
            "query": "label_values(kube_statefulset_metadata_generation{namespace=\"$statefulset_namespace\"}, statefulset)",
            "refresh": 1,
            "regex": "",
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "statefulset",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "browser",
      "title": "StatefulSet",
      "version": 1
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-kubernetes-statefulset
  namespace: knative-monitoring
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: node-exporter
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: node-exporter
  namespace: knative-monitoring
rules:
- apiGroups:
  - authentication.k8s.io
  resources:
  - tokenreviews
  verbs:
  - create
- apiGroups:
  - authorization.k8s.io
  resources:
  - subjectaccessreviews
  verbs:
  - create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: node-exporter
  namespace: knative-monitoring
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: node-exporter
subjects:
- kind: ServiceAccount
  name: node-exporter
  namespace: knative-monitoring
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: node-exporter
  namespace: knative-monitoring
spec:
  template:
    metadata:
      labels:
        app: node-exporter
      name: node-exporter
      namespace: knative-monitoring
    spec:
      containers:
      - args:
        - --web.listen-address=127.0.0.1:9101
        - --path.procfs=/host/proc
        - --path.sysfs=/host/sys
        image: quay.io/prometheus/node-exporter:v0.15.2
        name: node-exporter
        resources:
          limits:
            cpu: 200m
            memory: 50Mi
          requests:
            cpu: 100m
            memory: 30Mi
        volumeMounts:
        - mountPath: /host/proc
          name: proc
          readOnly: true
        - mountPath: /host/sys
          name: sys
          readOnly: true
      - args:
        - --secure-listen-address=:9100
        - --upstream=http://127.0.0.1:9101/
        image: quay.io/coreos/kube-rbac-proxy:v0.3.0
        name: kube-rbac-proxy
        ports:
        - containerPort: 9100
          hostPort: 9100
          name: https
        resources:
          limits:
            cpu: 20m
            memory: 40Mi
          requests:
            cpu: 10m
            memory: 20Mi
      hostNetwork: true
      hostPID: true
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      serviceAccountName: node-exporter
      tolerations:
      - effect: NoSchedule
        operator: Exists
      volumes:
      - hostPath:
          path: /proc
        name: proc
      - hostPath:
          path: /sys
        name: sys
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: node-exporter
  name: node-exporter
  namespace: knative-monitoring
spec:
  clusterIP: None
  ports:
  - name: https
    port: 9100
    protocol: TCP
  selector:
    app: node-exporter
  type: ClusterIP
---
apiVersion: v1
data:
  knative-control-plane-efficiency-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "description": "Knative Serving - Control Plane Efficiency",
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "id": null,
      "links": [],
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "decimals": 2,
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 0
          },
          "id": 2,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"knative-serving\"}[1m]))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "knative-serving",
              "refId": "A"
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"knative-build\"}[1m]))",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "knative-build",
              "refId": "C"
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"istio-system\"}[1m]))",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "istio-system",
              "refId": "D"
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"kube-system\"}[1m]))",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "kube-system",
              "refId": "F"
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"kube-public\"}[1m]))",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "kube-public",
              "refId": "E"
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"knative-monitoring\"}[1m]))",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "knative-monitoring",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Namespace CPU Usage",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "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
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "decimals": null,
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 0
          },
          "id": 3,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"knative-serving\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "knative-serving",
              "refId": "A"
            },
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"knative-build\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "knative-build",
              "refId": "C"
            },
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"istio-system\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "istio-system",
              "refId": "D"
            },
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"kube-system\"})",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "kube-system",
              "refId": "F"
            },
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"kube-public\"})",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "kube-public",
              "refId": "E"
            },
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"knative-monitoring\"})",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "knative-monitoring",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Namespace Memory Usage",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "decbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "decimals": 2,
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 9
          },
          "id": 4,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace!~\"knative-serving|knative-monitoring|knative-build|istio-system|kube-system|kube-public|^$\"}[1m]))",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "Data plane",
              "refId": "A"
            },
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"knative-serving|knative-monitoring|knative-build|istio-system|kube-system|kube-public\"}[1m]))",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Control plane",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Control Plane vs Data Plane CPU Usage",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 9
          },
          "id": 5,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(container_memory_usage_bytes{namespace!~\"knative-serving|knative-monitoring|knative-build|istio-system|kube-system|kube-public|^$\"})",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "Data plane",
              "refId": "A"
            },
            {
              "expr": "sum(container_memory_usage_bytes{namespace=~\"knative-serving|knative-monitoring|knative-build|istio-system|kube-system|kube-public\"})",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Control plane",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Control Plane vs Data Plane Memory Usage",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "decbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "refresh": "5s",
      "schemaVersion": 16,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": []
      },
      "time": {
        "from": "now-15m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "",
      "title": "Knative Serving - Control Plane Efficiency",
      "uid": "1oI1URnik",
      "version": 2
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-knative-efficiency
  namespace: knative-monitoring
---
apiVersion: v1
data:
  scaling-dashboard.json: "{  \n   \"__inputs\":[  \n      {  \n         \"name\":\"prometheus\",\n
    \        \"label\":\"prometheus\",\n         \"description\":\"\",\n         \"type\":\"datasource\",\n
    \        \"pluginId\":\"prometheus\",\n         \"pluginName\":\"Prometheus\"\n
    \     }\n   ],\n   \"__requires\":[  \n      {  \n         \"type\":\"grafana\",\n
    \        \"id\":\"grafana\",\n         \"name\":\"Grafana\",\n         \"version\":\"5.0.3\"\n
    \     },\n      {  \n         \"id\":\"graph\",\n         \"name\":\"Graph\",\n
    \        \"type\":\"panel\",\n         \"version\":\"5.0.0\"\n      },\n      {
    \ \n         \"type\":\"datasource\",\n         \"id\":\"prometheus\",\n         \"name\":\"Prometheus\",\n
    \        \"version\":\"5.0.0\"\n      }\n   ],\n   \"annotations\":{  \n      \"list\":[
    \ \n         {  \n            \"builtIn\":1,\n            \"datasource\":\"--
    Grafana --\",\n            \"enable\":true,\n            \"hide\":true,\n            \"iconColor\":\"rgba(0,
    211, 255, 1)\",\n            \"name\":\"Annotations & Alerts\",\n            \"type\":\"dashboard\"\n
    \        }\n      ]\n   },\n   \"description\":\"Knative Serving - Scaling Debugging\",\n
    \  \"editable\":false,\n   \"gnetId\":null,\n   \"graphTooltip\":0,\n   \"id\":null,\n
    \  \"iteration\":1527886043818,\n   \"links\":[  \n\n   ],\n   \"panels\":[  \n
    \     {  \n\n         \"collapsed\":true,\n         \"gridPos\":{  \n            \"h\":1,\n
    \           \"w\":24,\n            \"x\":0,\n            \"y\":0\n         },\n
    \        \"id\":14,\n         \"panels\":[  \n            {  \n               \"aliasColors\":{
    \ \n\n               },\n               \"bars\":false,\n               \"dashLength\":10,\n
    \              \"dashes\":false,\n               \"datasource\":\"prometheus\",\n
    \              \"fill\":1,\n               \"gridPos\":{  \n                  \"h\":11,\n
    \                 \"w\":24,\n                  \"x\":0,\n                  \"y\":1\n
    \              },\n               \"id\":2,\n               \"legend\":{  \n                  \"avg\":false,\n
    \                 \"current\":false,\n                  \"max\":false,\n                  \"min\":false,\n
    \                 \"show\":true,\n                  \"total\":false,\n                  \"values\":false\n
    \              },\n               \"lines\":true,\n               \"linewidth\":1,\n
    \              \"links\":[  \n\n               ],\n               \"nullPointMode\":\"null\",\n
    \              \"percentage\":false,\n               \"pointradius\":5,\n               \"points\":false,\n
    \              \"renderer\":\"flot\",\n               \"seriesOverrides\":[  \n\n
    \              ],\n               \"spaceLength\":10,\n               \"stack\":false,\n
    \              \"steppedLine\":true,\n               \"targets\":[  \n                  {
    \ \n                     \"expr\":\"sum(autoscaler_actual_pod_count{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"interval\":\"1s\",\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"Actual Pods\",\n                     \"refId\":\"A\"\n
    \                 },\n                  {  \n                     \"expr\":\"sum(autoscaler_requested_pod_count{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"interval\":\"1s\",\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"Requested Pods\",\n                     \"refId\":\"C\"\n
    \                 }\n               ],\n               \"thresholds\":[  \n\n
    \              ],\n               \"timeFrom\":null,\n               \"timeShift\":null,\n
    \              \"title\":\"Revision Pod Counts\",\n               \"tooltip\":{
    \ \n                  \"shared\":true,\n                  \"sort\":0,\n                  \"value_type\":\"individual\"\n
    \              },\n               \"type\":\"graph\",\n               \"xaxis\":{
    \ \n                  \"buckets\":null,\n                  \"mode\":\"time\",\n
    \                 \"name\":null,\n                  \"show\":true,\n                  \"values\":[
    \ \n\n                  ]\n               },\n               \"yaxes\":[  \n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":true\n                  },\n                  {
    \ \n                     \"decimals\":null,\n                     \"format\":\"short\",\n
    \                    \"label\":\"Concurrency\",\n                     \"logBase\":1,\n
    \                    \"max\":\"1\",\n                     \"min\":null,\n                     \"show\":false\n
    \                 }\n               ]\n            }\n         ],\n         \"title\":\"Revision
    Pod Counts\",\n         \"type\":\"row\"\n      },\n      {  \n         \"collapsed\":true,\n
    \        \"gridPos\":{  \n            \"h\":1,\n            \"w\":24,\n            \"x\":0,\n
    \           \"y\":1\n         },\n         \"id\":18,\n         \"panels\":[  \n
    \           {  \n               \"aliasColors\":{  \n\n               },\n               \"bars\":false,\n
    \              \"dashLength\":10,\n               \"dashes\":false,\n               \"datasource\":\"prometheus\",\n
    \              \"fill\":1,\n               \"gridPos\":{  \n                  \"h\":9,\n
    \                 \"w\":12,\n                  \"x\":0,\n                  \"y\":13\n
    \              },\n               \"id\":4,\n               \"legend\":{  \n                  \"avg\":false,\n
    \                 \"current\":false,\n                  \"max\":false,\n                  \"min\":false,\n
    \                 \"show\":true,\n                  \"total\":false,\n                  \"values\":false\n
    \              },\n               \"lines\":true,\n               \"linewidth\":1,\n
    \              \"links\":[  \n\n               ],\n               \"nullPointMode\":\"null\",\n
    \              \"percentage\":false,\n               \"pointradius\":5,\n               \"points\":false,\n
    \              \"renderer\":\"flot\",\n               \"seriesOverrides\":[  \n\n
    \              ],\n               \"spaceLength\":10,\n               \"stack\":false,\n
    \              \"steppedLine\":false,\n               \"targets\":[  \n                  {
    \ \n                     \"expr\":\"sum(kube_pod_container_resource_requests_cpu_cores{namespace=\\\"$namespace\\\",
    pod=~\\\"$revision-deployment-.*\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"interval\":\"\",\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"Cores requested\",\n                     \"refId\":\"A\"\n
    \                 },\n                  {  \n                     \"expr\":\"sum(rate(container_cpu_usage_seconds_total{namespace=\\\"$namespace\\\",
    pod_name=~\\\"$revision-deployment-.*\\\"}[1m]))\",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"legendFormat\":\"Cores
    used\",\n                     \"refId\":\"B\"\n                  },\n                  {
    \ \n                     \"expr\":\"sum(kube_pod_container_resource_limits_cpu_cores{namespace=\\\"$namespace\\\",
    pod=~\\\"$revision-deployment-.*\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"legendFormat\":\"Core
    limit\",\n                     \"refId\":\"C\"\n                  }\n               ],\n
    \              \"thresholds\":[  \n\n               ],\n               \"timeFrom\":null,\n
    \              \"timeShift\":null,\n               \"title\":\"Revision CPU Usage\",\n
    \              \"tooltip\":{  \n                  \"shared\":true,\n                  \"sort\":2,\n
    \                 \"value_type\":\"individual\"\n               },\n               \"type\":\"graph\",\n
    \              \"xaxis\":{  \n                  \"buckets\":null,\n                  \"mode\":\"time\",\n
    \                 \"name\":null,\n                  \"show\":true,\n                  \"values\":[
    \ \n\n                  ]\n               },\n               \"yaxes\":[  \n                  {
    \ \n                     \"decimals\":null,\n                     \"format\":\"short\",\n
    \                    \"label\":null,\n                     \"logBase\":1,\n                     \"max\":null,\n
    \                    \"min\":null,\n                     \"show\":true\n                  },\n
    \                 {  \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":false\n                  }\n               ]\n            },\n
    \           {  \n               \"aliasColors\":{  \n\n               },\n               \"bars\":false,\n
    \              \"dashLength\":10,\n               \"dashes\":false,\n               \"datasource\":\"prometheus\",\n
    \              \"fill\":1,\n               \"gridPos\":{  \n                  \"h\":9,\n
    \                 \"w\":12,\n                  \"x\":12,\n                  \"y\":13\n
    \              },\n               \"id\":6,\n               \"legend\":{  \n                  \"avg\":false,\n
    \                 \"current\":false,\n                  \"max\":false,\n                  \"min\":false,\n
    \                 \"show\":true,\n                  \"total\":false,\n                  \"values\":false\n
    \              },\n               \"lines\":true,\n               \"linewidth\":1,\n
    \              \"links\":[  \n\n               ],\n               \"nullPointMode\":\"null\",\n
    \              \"percentage\":false,\n               \"pointradius\":5,\n               \"points\":false,\n
    \              \"renderer\":\"flot\",\n               \"seriesOverrides\":[  \n\n
    \              ],\n               \"spaceLength\":10,\n               \"stack\":false,\n
    \              \"steppedLine\":false,\n               \"targets\":[  \n                  {
    \ \n                     \"expr\":\"sum(kube_pod_container_resource_requests_memory_bytes{namespace=\\\"$namespace\\\",
    pod=~\\\"$revision-deployment-.*\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"interval\":\"\",\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"Memory requested\",\n                     \"refId\":\"A\"\n
    \                 },\n                  {  \n                     \"expr\":\"sum(container_memory_usage_bytes{namespace=\\\"$namespace\\\",
    pod_name=~\\\"$revision-deployment-.*\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"hide\":false,\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"Memory used\",\n                     \"refId\":\"B\"\n
    \                 },\n                  {  \n                     \"expr\":\"sum(kube_pod_container_resource_limits_memory_bytes{namespace=\\\"$namespace\\\",
    pod=~\\\"$revision-deployment-.*\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"refId\":\"C\"\n
    \                 }\n               ],\n               \"thresholds\":[  \n\n
    \              ],\n               \"timeFrom\":null,\n               \"timeShift\":null,\n
    \              \"title\":\"Pod Memory Usage\",\n               \"tooltip\":{  \n
    \                 \"shared\":true,\n                  \"sort\":2,\n                  \"value_type\":\"individual\"\n
    \              },\n               \"type\":\"graph\",\n               \"xaxis\":{
    \ \n                  \"buckets\":null,\n                  \"mode\":\"time\",\n
    \                 \"name\":null,\n                  \"show\":true,\n                  \"values\":[
    \ \n\n                  ]\n               },\n               \"yaxes\":[  \n                  {
    \ \n                     \"format\":\"decbytes\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":true\n                  },\n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":false\n                  }\n               ]\n            }\n
    \        ],\n         \"title\":\"Resource Usages\",\n         \"type\":\"row\"\n
    \     },\n      {  \n         \"collapsed\":true,\n         \"gridPos\":{  \n
    \           \"h\":1,\n            \"w\":24,\n            \"x\":0,\n            \"y\":2\n
    \        },\n         \"id\":16,\n         \"panels\":[  \n            {  \n               \"aliasColors\":{
    \ \n\n               },\n               \"bars\":false,\n               \"dashLength\":10,\n
    \              \"dashes\":false,\n               \"datasource\":\"prometheus\",\n
    \              \"fill\":1,\n               \"gridPos\":{  \n                  \"h\":10,\n
    \                 \"w\":24,\n                  \"x\":0,\n                  \"y\":3\n
    \              },\n               \"id\":10,\n               \"legend\":{  \n
    \                 \"avg\":false,\n                  \"current\":false,\n                  \"max\":false,\n
    \                 \"min\":false,\n                  \"show\":true,\n                  \"total\":false,\n
    \                 \"values\":false\n               },\n               \"lines\":true,\n
    \              \"linewidth\":1,\n               \"links\":[  \n\n               ],\n
    \              \"nullPointMode\":\"null\",\n               \"percentage\":false,\n
    \              \"pointradius\":5,\n               \"points\":false,\n               \"renderer\":\"flot\",\n
    \              \"seriesOverrides\":[  \n\n               ],\n               \"spaceLength\":10,\n
    \              \"stack\":false,\n               \"steppedLine\":true,\n               \"targets\":[
    \ \n                  {  \n                     \"expr\":\"sum(autoscaler_desired_pod_count{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"}) \",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"legendFormat\":\"Desired
    Pods\",\n                     \"refId\":\"A\"\n                  },\n                  {
    \ \n                     \"expr\":\"sum(autoscaler_observed_pod_count{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"legendFormat\":\"Observed
    Pods\",\n                     \"refId\":\"B\"\n                  }\n               ],\n
    \              \"thresholds\":[  \n\n               ],\n               \"timeFrom\":null,\n
    \              \"timeShift\":null,\n               \"title\":\"Pod Counts\",\n
    \              \"tooltip\":{  \n                  \"shared\":true,\n                  \"sort\":0,\n
    \                 \"value_type\":\"individual\"\n               },\n               \"type\":\"graph\",\n
    \              \"xaxis\":{  \n                  \"buckets\":null,\n                  \"mode\":\"time\",\n
    \                 \"name\":null,\n                  \"show\":true,\n                  \"values\":[
    \ \n\n                  ]\n               },\n               \"yaxes\":[  \n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":true\n                  },\n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":true\n                  }\n               ]\n            },\n
    \           {  \n               \"aliasColors\":{  \n\n               },\n               \"bars\":false,\n
    \              \"dashLength\":10,\n               \"dashes\":false,\n               \"datasource\":\"prometheus\",\n
    \              \"fill\":1,\n               \"gridPos\":{  \n                  \"h\":9,\n
    \                 \"w\":24,\n                  \"x\":0,\n                  \"y\":13\n
    \              },\n               \"id\":8,\n               \"legend\":{  \n                  \"avg\":false,\n
    \                 \"current\":false,\n                  \"max\":false,\n                  \"min\":false,\n
    \                 \"show\":true,\n                  \"total\":false,\n                  \"values\":false\n
    \              },\n               \"lines\":true,\n               \"linewidth\":1,\n
    \              \"links\":[  \n\n               ],\n               \"nullPointMode\":\"null\",\n
    \              \"percentage\":false,\n               \"pointradius\":5,\n               \"points\":false,\n
    \              \"renderer\":\"flot\",\n               \"seriesOverrides\":[  \n
    \                 {  \n                     \"alias\":\"Panic Mode\",\n                     \"color\":\"#ea6460\",\n
    \                    \"dashes\":true,\n                     \"fill\":2,\n                     \"linewidth\":2,\n
    \                    \"steppedLine\":true,\n                     \"yaxis\":2\n
    \                 },\n                  {  \n                     \"alias\":\"Target
    Concurrency Per Pod\",\n                     \"color\":\"#0a50a1\",\n                     \"dashes\":true,\n
    \                    \"steppedLine\":false\n                  }\n               ],\n
    \              \"spaceLength\":10,\n               \"stack\":false,\n               \"steppedLine\":true,\n
    \              \"targets\":[  \n                  {  \n                     \"expr\":\"sum(autoscaler_observed_stable_concurrency{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"interval\":\"1s\",\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"60 Second Average Concurrency\",\n                     \"refId\":\"A\"\n
    \                 },\n                  {  \n                     \"expr\":\"sum(autoscaler_observed_panic_concurrency{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"interval\":\"1s\",\n                     \"intervalFactor\":1,\n
    \                    \"legendFormat\":\"6 Second Average Panic Concurrency\",\n
    \                    \"refId\":\"B\"\n                  },\n                  {
    \ \n                     \"expr\":\"sum(autoscaler_target_concurrency_per_pod{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"})\",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"legendFormat\":\"60
    Second Target Concurrency\",\n                     \"refId\":\"C\"\n                  }\n
    \              ],\n               \"thresholds\":[  \n\n               ],\n               \"timeFrom\":null,\n
    \              \"timeShift\":null,\n               \"title\":\"Observed Concurrency\",\n
    \              \"tooltip\":{  \n                  \"shared\":true,\n                  \"sort\":0,\n
    \                 \"value_type\":\"individual\"\n               },\n               \"type\":\"graph\",\n
    \              \"xaxis\":{  \n                  \"buckets\":null,\n                  \"mode\":\"time\",\n
    \                 \"name\":null,\n                  \"show\":true,\n                  \"values\":[
    \ \n\n                  ]\n               },\n               \"yaxes\":[  \n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":\"\",\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":true\n                  },\n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":\"\",\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":false\n                  }\n               ]\n            },\n
    \           {  \n               \"aliasColors\":{  \n\n               },\n               \"bars\":false,\n
    \              \"dashLength\":10,\n               \"dashes\":false,\n               \"datasource\":\"prometheus\",\n
    \              \"decimals\":null,\n               \"fill\":1,\n               \"gridPos\":{
    \ \n                  \"h\":9,\n                  \"w\":24,\n                  \"x\":0,\n
    \                 \"y\":22\n               },\n               \"id\":12,\n               \"legend\":{
    \ \n                  \"avg\":false,\n                  \"current\":false,\n                  \"hideZero\":false,\n
    \                 \"max\":false,\n                  \"min\":false,\n                  \"show\":false,\n
    \                 \"total\":false,\n                  \"values\":false\n               },\n
    \              \"lines\":true,\n               \"linewidth\":1,\n               \"links\":[
    \ \n\n               ],\n               \"nullPointMode\":\"null\",\n               \"percentage\":false,\n
    \              \"pointradius\":5,\n               \"points\":false,\n               \"renderer\":\"flot\",\n
    \              \"seriesOverrides\":[  \n                  {  \n                     \"alias\":\"Panic
    Mode\",\n                     \"color\":\"#e24d42\",\n                     \"linewidth\":2,\n
    \                    \"yaxis\":2\n                  }\n               ],\n               \"spaceLength\":10,\n
    \              \"stack\":false,\n               \"steppedLine\":true,\n               \"targets\":[
    \ \n                  {  \n                     \"expr\":\"sum(autoscaler_panic_mode{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\", revision=\\\"$revision\\\"} )\",\n                     \"format\":\"time_series\",\n
    \                    \"intervalFactor\":1,\n                     \"legendFormat\":\"Panic
    Mode\",\n                     \"refId\":\"A\"\n                  }\n               ],\n
    \              \"thresholds\":[  \n\n               ],\n               \"timeFrom\":null,\n
    \              \"timeShift\":null,\n               \"title\":\"Panic Mode\",\n
    \              \"tooltip\":{  \n                  \"shared\":true,\n                  \"sort\":0,\n
    \                 \"value_type\":\"individual\"\n               },\n               \"type\":\"graph\",\n
    \              \"xaxis\":{  \n                  \"buckets\":null,\n                  \"mode\":\"time\",\n
    \                 \"name\":null,\n                  \"show\":true,\n                  \"values\":[
    \ \n\n                  ]\n               },\n               \"yaxes\":[  \n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":\"1.0\",\n                     \"min\":\"0\",\n
    \                    \"show\":true\n                  },\n                  {
    \ \n                     \"format\":\"short\",\n                     \"label\":null,\n
    \                    \"logBase\":1,\n                     \"max\":null,\n                     \"min\":null,\n
    \                    \"show\":false\n                  }\n               ]\n            }\n
    \        ],\n         \"title\":\"Autoscaler Metrics\",\n         \"type\":\"row\"\n
    \     },\n      {  \n         \"collapsed\":true,\n         \"gridPos\":{  \n
    \           \"h\":1,\n            \"w\":24,\n            \"x\":0,\n            \"y\":3\n
    \        },\n         \"id\":20,\n         \"panels\":[  \n                     {
    \ \n                        \"aliasColors\":{  \n\n                        },\n
    \                       \"bars\":false,\n                        \"dashLength\":10,\n
    \                       \"dashes\":false,\n                        \"datasource\":\"prometheus\",\n
    \                       \"fill\":1,\n                        \"gridPos\":{  \n
    \                          \"h\":11,\n                           \"w\":24,\n                           \"x\":0,\n
    \                          \"y\":1\n                        },\n                        \"id\":22,\n
    \                       \"legend\":{  \n                           \"avg\":false,\n
    \                          \"current\":false,\n                           \"max\":false,\n
    \                          \"min\":false,\n                           \"show\":true,\n
    \                          \"total\":false,\n                           \"values\":false\n
    \                       },\n                        \"lines\":true,\n                        \"linewidth\":1,\n
    \                       \"links\":[  \n\n                        ],\n                        \"nullPointMode\":\"null\",\n
    \                       \"percentage\":false,\n                        \"pointradius\":5,\n
    \                       \"points\":false,\n                        \"renderer\":\"flot\",\n
    \                       \"seriesOverrides\":[  \n\n                        ],\n
    \                       \"spaceLength\":10,\n                        \"stack\":false,\n
    \                       \"steppedLine\":false,\n                        \"targets\":[
    \ \n                           {  \n                              \"expr\":\"label_replace(sum(increase(activator_revision_request_count{destination_namespace=\\\"$namespace\\\",
    destination_configuration=~\\\"$configuration\\\",destination_revision=~\\\"$revision\\\"}[1m]))
    by (destination_revision), \\\"destination_revision\\\", \\\"$2\\\", \\\"destination_revision\\\",
    \\\"$configuration(-+)(.*)\\\")\",\n                              \"format\":\"time_series\",\n
    \                             \"interval\":\"\",\n                              \"intervalFactor\":1,\n
    \                             \"legendFormat\":\"{{destination_revision}}\",\n
    \                             \"refId\":\"A\"\n                           }\n
    \                       ],\n                        \"thresholds\":[  \n\n                        ],\n
    \                       \"timeFrom\":null,\n                        \"timeShift\":null,\n
    \                       \"title\":\"Request Count in last minute by Revision\",\n
    \                       \"tooltip\":{  \n                           \"shared\":true,\n
    \                          \"sort\":0,\n                           \"value_type\":\"individual\"\n
    \                       },\n                        \"type\":\"graph\",\n                        \"xaxis\":{
    \ \n                           \"buckets\":null,\n                           \"mode\":\"time\",\n
    \                          \"name\":null,\n                           \"show\":true,\n
    \                          \"values\":[  \n\n                           ]\n                        },\n
    \                       \"yaxes\":[  \n                           {  \n                              \"format\":\"none\",\n
    \                             \"label\":null,\n                              \"logBase\":1,\n
    \                             \"max\":null,\n                              \"min\":\"0\",\n
    \                             \"show\":true\n                           },\n                           {
    \ \n                              \"format\":\"short\",\n                              \"label\":null,\n
    \                             \"logBase\":1,\n                              \"max\":null,\n
    \                             \"min\":null,\n                              \"show\":true\n
    \                          }\n                        ]\n                     },\n
    \                    {  \n                        \"aliasColors\":{  \n\n                        },\n
    \                       \"bars\":false,\n                        \"dashLength\":10,\n
    \                       \"dashes\":false,\n                        \"datasource\":\"prometheus\",\n
    \                       \"fill\":1,\n                        \"gridPos\":{  \n
    \                          \"h\":10,\n                           \"w\":24,\n                           \"x\":0,\n
    \                          \"y\":12\n                        },\n                        \"id\":24,\n
    \                       \"legend\":{  \n                           \"avg\":false,\n
    \                          \"current\":false,\n                           \"max\":false,\n
    \                          \"min\":false,\n                           \"show\":true,\n
    \                          \"total\":false,\n                           \"values\":false\n
    \                       },\n                        \"lines\":true,\n                        \"linewidth\":1,\n
    \                       \"links\":[  \n\n                        ],\n                        \"nullPointMode\":\"null\",\n
    \                       \"percentage\":false,\n                        \"pointradius\":5,\n
    \                       \"points\":false,\n                        \"renderer\":\"flot\",\n
    \                       \"seriesOverrides\":[  \n\n                        ],\n
    \                       \"spaceLength\":10,\n                        \"stack\":false,\n
    \                       \"steppedLine\":false,\n                        \"targets\":[
    \ \n                           {  \n                              \"expr\":\"round(sum(increase(activator_revision_response_count{destination_namespace=\\\"$namespace\\\",
    destination_configuration=~\\\"$configuration\\\",destination_revision=~\\\"$revision\\\"}[1m]))
    by (response_code))\",\n                              \"format\":\"time_series\",\n
    \                             \"intervalFactor\":1,\n                              \"legendFormat\":\"{{
    response_code }}\",\n                              \"refId\":\"A\"\n                           }\n
    \                       ],\n                        \"thresholds\":[  \n\n                        ],\n
    \                       \"timeFrom\":null,\n                        \"timeShift\":null,\n
    \                       \"title\":\"Response Count in last minute by Response
    Code\",\n                        \"tooltip\":{  \n                           \"shared\":true,\n
    \                          \"sort\":0,\n                           \"value_type\":\"individual\"\n
    \                       },\n                        \"type\":\"graph\",\n                        \"xaxis\":{
    \ \n                           \"buckets\":null,\n                           \"mode\":\"time\",\n
    \                          \"name\":null,\n                           \"show\":true,\n
    \                          \"values\":[  \n\n                           ]\n                        },\n
    \                       \"yaxes\":[  \n                           {  \n                              \"format\":\"none\",\n
    \                             \"label\":null,\n                              \"logBase\":1,\n
    \                             \"max\":null,\n                              \"min\":\"0\",\n
    \                             \"show\":true\n                           },\n                           {
    \ \n                              \"format\":\"short\",\n                              \"label\":null,\n
    \                             \"logBase\":1,\n                              \"max\":null,\n
    \                             \"min\":null,\n                              \"show\":true\n
    \                          }\n                        ]\n                     },\n
    \                    {  \n                        \"aliasColors\":{  \n\n                        },\n
    \                       \"bars\":false,\n                        \"dashLength\":10,\n
    \                       \"dashes\":false,\n                        \"datasource\":\"prometheus\",\n
    \                       \"fill\":1,\n                        \"gridPos\":{  \n
    \                          \"h\":10,\n                           \"w\":24,\n                           \"x\":0,\n
    \                          \"y\":32\n                        },\n                        \"id\":28,\n
    \                       \"legend\":{  \n                           \"avg\":true,\n
    \                          \"current\":false,\n                           \"max\":false,\n
    \                          \"min\":false,\n                           \"show\":true,\n
    \                          \"total\":false,\n                           \"values\":true\n
    \                       },\n                        \"lines\":true,\n                        \"linewidth\":1,\n
    \                       \"links\":[  \n\n                        ],\n                        \"nullPointMode\":\"null\",\n
    \                       \"percentage\":false,\n                        \"pointradius\":5,\n
    \                       \"points\":false,\n                        \"renderer\":\"flot\",\n
    \                       \"seriesOverrides\":[  \n\n                        ],\n
    \                       \"spaceLength\":10,\n                        \"stack\":false,\n
    \                       \"steppedLine\":false,\n                        \"targets\":[
    \ \n                           {  \n                              \"expr\":\"label_replace(histogram_quantile(0.50,
    sum(rate(activator_response_time_msec_bucket{destination_namespace=\\\"$namespace\\\",
    destination_configuration=~\\\"$configuration\\\",destination_revision=~\\\"$revision\\\"}[1m]))
    by (destination_revision, le)), \\\"destination_revision\\\", \\\"$2\\\", \\\"destination_revision\\\",
    \\\"$configuration(-+)(.*)\\\")\",\n                              \"format\":\"time_series\",\n
    \                             \"intervalFactor\":1,\n                              \"legendFormat\":\"{{
    destination_revision }} (p50)\",\n                              \"refId\":\"A\"\n
    \                          },\n                           {  \n                              \"expr\":\"label_replace(histogram_quantile(0.90,
    sum(rate(activator_response_time_msec_bucket{destination_namespace=\\\"$namespace\\\",
    destination_configuration=~\\\"$configuration\\\",destination_revision=~\\\"$revision\\\"}[1m]))
    by (destination_revision, le)), \\\"destination_revision\\\", \\\"$2\\\", \\\"destination_revision\\\",
    \\\"$configuration(-+)(.*)\\\")\",\n                              \"format\":\"time_series\",\n
    \                             \"intervalFactor\":1,\n                              \"legendFormat\":\"{{
    destination_revision }} (p90)\",\n                              \"refId\":\"B\"\n
    \                          },\n                           {  \n                              \"expr\":\"label_replace(histogram_quantile(0.95,
    sum(rate(activator_response_time_msec_bucket{destination_namespace=\\\"$namespace\\\",
    destination_configuration=~\\\"$configuration\\\",destination_revision=~\\\"$revision\\\"}[1m]))
    by (destination_revision, le)), \\\"destination_revision\\\", \\\"$2\\\", \\\"destination_revision\\\",
    \\\"$configuration(-+)(.*)\\\")\",\n                              \"format\":\"time_series\",\n
    \                             \"intervalFactor\":1,\n                              \"legendFormat\":\"{{
    destination_revision }} (p95)\",\n                              \"refId\":\"C\"\n
    \                          },\n                           {  \n                              \"expr\":\"label_replace(histogram_quantile(0.99,
    sum(rate(activator_response_time_msec_bucket{destination_namespace=\\\"$namespace\\\",
    destination_configuration=~\\\"$configuration\\\",destination_revision=~\\\"$revision\\\"}[1m]))
    by (destination_revision, le)), \\\"destination_revision\\\", \\\"$2\\\", \\\"destination_revision\\\",
    \\\"$configuration(-+)(.*)\\\")\",\n                              \"format\":\"time_series\",\n
    \                             \"intervalFactor\":1,\n                              \"legendFormat\":\"{{
    destination_revision }} (p99)\",\n                              \"refId\":\"D\"\n
    \                          }\n                        ],\n                        \"thresholds\":[
    \ \n\n                        ],\n                        \"timeFrom\":null,\n
    \                       \"timeShift\":null,\n                        \"title\":\"Response
    Time in last minute\",\n                        \"tooltip\":{  \n                           \"shared\":true,\n
    \                          \"sort\":0,\n                           \"value_type\":\"individual\"\n
    \                       },\n                        \"type\":\"graph\",\n                        \"xaxis\":{
    \ \n                           \"buckets\":null,\n                           \"mode\":\"time\",\n
    \                          \"name\":null,\n                           \"show\":true,\n
    \                          \"values\":[  \n\n                           ]\n                        },\n
    \                       \"yaxes\":[  \n                           {  \n                              \"format\":\"ms\",\n
    \                             \"label\":null,\n                              \"logBase\":1,\n
    \                             \"max\":null,\n                              \"min\":null,\n
    \                             \"show\":true\n                           },\n                           {
    \ \n                              \"format\":\"short\",\n                              \"label\":null,\n
    \                             \"logBase\":1,\n                              \"max\":null,\n
    \                             \"min\":null,\n                              \"show\":true\n
    \                          }\n                         ]\n                       }
    \    \n         ],\n         \"title\":\"Activator Metrics\",\n         \"type\":\"row\"\n
    \     }\n   ],\n   \"refresh\":false,\n   \"schemaVersion\":16,\n   \"style\":\"dark\",\n
    \  \"tags\":[  \n\n   ],\n   \"templating\":{  \n      \"list\":[  \n         {
    \ \n            \"allValue\":null,\n            \"current\":{  \n\n            },\n
    \           \"datasource\":\"prometheus\",\n            \"hide\":0,\n            \"includeAll\":false,\n
    \           \"label\":\"Namespace\",\n            \"multi\":false,\n            \"name\":\"namespace\",\n
    \           \"options\":[  \n\n            ],\n            \"query\":\"label_values(autoscaler_observed_pod_count,
    configuration_namespace)\",\n            \"refresh\":1,\n            \"regex\":\"\",\n
    \           \"sort\":1,\n            \"tagValuesQuery\":\"\",\n            \"tags\":[
    \ \n\n            ],\n            \"tagsQuery\":\"\",\n            \"type\":\"query\",\n
    \           \"useTags\":false\n         },\n         {  \n            \"allValue\":null,\n
    \           \"current\":{  \n\n            },\n            \"datasource\":\"prometheus\",\n
    \           \"hide\":0,\n            \"includeAll\":false,\n            \"label\":\"Configuration\",\n
    \           \"multi\":false,\n            \"name\":\"configuration\",\n            \"options\":[
    \ \n\n            ],\n            \"query\":\"label_values(autoscaler_observed_pod_count{configuration_namespace=\\\"$namespace\\\"},
    configuration)\",\n            \"refresh\":1,\n            \"regex\":\"\",\n            \"sort\":1,\n
    \           \"tagValuesQuery\":\"\",\n            \"tags\":[  \n\n            ],\n
    \           \"tagsQuery\":\"\",\n            \"type\":\"query\",\n            \"useTags\":false\n
    \        },\n         {  \n            \"allValue\":null,\n            \"current\":{
    \ \n\n            },\n            \"datasource\":\"prometheus\",\n            \"hide\":0,\n
    \           \"includeAll\":false,\n            \"label\":\"Revision\",\n            \"multi\":false,\n
    \           \"name\":\"revision\",\n            \"options\":[  \n\n            ],\n
    \           \"query\":\"label_values(autoscaler_observed_pod_count{configuration_namespace=\\\"$namespace\\\",
    configuration=\\\"$configuration\\\"}, revision)\",\n            \"refresh\":1,\n
    \           \"regex\":\"\",\n            \"sort\":2,\n            \"tagValuesQuery\":\"\",\n
    \           \"tags\":[  \n\n            ],\n            \"tagsQuery\":\"\",\n
    \           \"type\":\"query\",\n            \"useTags\":false\n         }\n      ]\n
    \  },\n   \"time\":{  \n      \"from\":\"now-15m\",\n      \"to\":\"now\"\n   },\n
    \  \"timepicker\":{  \n      \"refresh_intervals\":[  \n         \"5s\",\n         \"10s\",\n
    \        \"30s\",\n         \"1m\",\n         \"5m\",\n         \"15m\",\n         \"30m\",\n
    \        \"1h\",\n         \"2h\",\n         \"1d\"\n      ],\n      \"time_options\":[
    \ \n         \"5m\",\n         \"15m\",\n         \"1h\",\n         \"6h\",\n
    \        \"12h\",\n         \"24h\",\n         \"2d\",\n         \"7d\",\n         \"30d\"\n
    \     ]\n   },\n   \"timezone\":\"\",\n   \"title\":\"Knative Serving - Scaling
    Debugging\",\n   \"uid\":\"u_-9SIMiz\",\n   \"version\":2\n}\n"
kind: ConfigMap
metadata:
  name: scaling-config
  namespace: knative-monitoring
---
apiVersion: v1
data:
  resource-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "description": "Knative Serving - Revision CPU and Memory Usage",
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "links": [],
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 0
          },
          "id": 2,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod_name=~\"$revision.*\", container_name != \"POD\"}[1m])) by (container_name)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{container_name}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Total CPU Usage",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "s",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 0
          },
          "id": 3,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "sum(container_memory_usage_bytes{namespace=\"$namespace\", pod_name=~\"$revision.*\", container_name != \"POD\"}) by (container_name)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{container_name}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Total Memory Usage",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "decbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        }
      ],
      "refresh": "5s",
      "schemaVersion": 16,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Namespace",
            "multi": false,
            "name": "namespace",
            "options": [],
            "query": "label_values(container_memory_usage_bytes{container_name=\"user-container\"}, namespace)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Configuration",
            "multi": false,
            "name": "configuration",
            "options": [],
            "query": "label_values(container_memory_usage_bytes{namespace=\"$namespace\"}, pod_name)",
            "refresh": 1,
            "regex": "(.+?)-\\d\\d\\d\\d\\d-deployment-.*",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Revision",
            "multi": false,
            "name": "revision",
            "options": [],
            "query": "label_values(container_memory_usage_bytes{namespace=\"$namespace\", pod_name=~\"$configuration.*?-deployment.*?\"}, pod_name)",
            "refresh": 1,
            "regex": "(.+?-\\d\\d\\d\\d\\d)-deployment-.*",
            "sort": 2,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-15m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "",
      "title": "Knative Serving - Revision CPU and Memory Usage",
      "uid": "bKOoE9Wmk",
      "version": 4
    }
  revision-dashboard.json: |
    {
      "__inputs": [
        {
          "description": "",
          "label": "prometheus",
          "name": "prometheus",
          "pluginId": "prometheus",
          "pluginName": "Prometheus",
          "type": "datasource"
        }
      ],
      "annotations": {
        "list": []
      },
      "description": "Knative Serving - Revision HTTP Requests",
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "links": [],
      "panels": [
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 8,
          "panels": [],
          "title": "Overview (average over the selected time range)",
          "type": "row"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "prometheus",
          "format": "ops",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 4,
            "w": 6,
            "x": 0,
            "y": 1
          },
          "id": 2,
          "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": null,
          "repeatDirection": "v",
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": true,
            "lineColor": "rgb(31, 120, 193)",
            "show": true
          },
          "tableColumn": "",
          "targets": [
            {
              "expr": "round(sum(rate(istio_revision_request_count{destination_namespace=\"$namespace\", destination_revision=~\"$revision\", destination_configuration=~\"$configuration\"}[1m])), 0.001)",
              "format": "time_series",
              "hide": false,
              "interval": "",
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "thresholds": "",
          "title": "Request Volume",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#d44a3a",
            "rgba(237, 129, 40, 0.89)",
            "#299c46"
          ],
          "datasource": "prometheus",
          "format": "percentunit",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 4,
            "w": 6,
            "x": 6,
            "y": 1
          },
          "id": 4,
          "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": "sum(rate(istio_revision_request_count{response_code!~\"5.*\", destination_namespace=\"$namespace\", destination_revision=~\"$revision\", destination_configuration=~\"$configuration\"}[1m])) / sum(rate(istio_revision_request_count{destination_namespace=\"$namespace\", destination_revision=~\"$revision\", destination_configuration=~\"$configuration\"}[1m]))",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "thresholds": "95, 99, 99.5",
          "title": "Success Rate (non-5xx responses)",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#d44a3a",
            "rgba(237, 129, 40, 0.89)",
            "#299c46"
          ],
          "datasource": "prometheus",
          "format": "ops",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 4,
            "w": 6,
            "x": 12,
            "y": 1
          },
          "id": 5,
          "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": "sum(rate(istio_revision_request_count{response_code=~\"4.*\", destination_namespace=\"$namespace\", destination_revision=~\"$revision\", destination_configuration=~\"$configuration\"}[1m])) ",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "thresholds": "",
          "title": "4xxs",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#d44a3a",
            "rgba(237, 129, 40, 0.89)",
            "#299c46"
          ],
          "datasource": "prometheus",
          "format": "ops",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 4,
            "w": 6,
            "x": 18,
            "y": 1
          },
          "id": 9,
          "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": "sum(rate(istio_revision_request_count{response_code=~\"5.*\", destination_namespace=\"$namespace\", destination_revision=~\"$revision\", destination_configuration=~\"$configuration\"}[1m])) ",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "thresholds": "",
          "title": "5xxs",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 5
          },
          "id": 11,
          "panels": [],
          "title": "Request Volume",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 0,
            "y": 6
          },
          "id": 17,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(round(sum(rate(istio_revision_request_count{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\"}[1m])) by (destination_revision), 0.001), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{destination_revision}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Request Volume by Revision",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 12,
            "y": 6
          },
          "id": 18,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "round(sum(rate(istio_revision_request_count{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\"}[1m])) by (response_code), 0.001)",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{ response_code }}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Request Volume by Response Code",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 16
          },
          "id": 15,
          "panels": [],
          "title": "Response Time",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 17
          },
          "id": 20,
          "legend": {
            "alignAsTable": false,
            "avg": true,
            "current": false,
            "hideEmpty": false,
            "hideZero": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\"}[1m])) by (destination_revision, le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_revision }} (p50)",
              "refId": "A"
            },
            {
              "expr": "label_replace(histogram_quantile(0.90, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\"}[1m])) by (destination_revision, le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_revision }} (p90)",
              "refId": "B"
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\"}[1m])) by (destination_revision, le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_revision }} (p95)",
              "refId": "C"
            },
            {
              "expr": "label_replace(histogram_quantile(0.99, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\"}[1m])) by (destination_revision, le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ destination_revision }} (p99)",
              "refId": "D"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Response Time by Revision",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "s",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 17
          },
          "id": 21,
          "legend": {
            "alignAsTable": false,
            "avg": true,
            "current": false,
            "hideEmpty": false,
            "hideZero": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"2.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "2xx (p50)",
              "refId": "C"
            },
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"3.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "3xx (p50)",
              "refId": "D"
            },
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"4.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "4xx (p50)",
              "refId": "A"
            },
            {
              "expr": "label_replace(histogram_quantile(0.50, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"5.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "5xx (p50)",
              "refId": "B"
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"2.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "2xx (p95)",
              "refId": "E"
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"3.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "3xx (p95)",
              "refId": "F"
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"4.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "4xx (p95)",
              "refId": "G"
            },
            {
              "expr": "label_replace(histogram_quantile(0.95, sum(rate(istio_revision_request_duration_bucket{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\",destination_revision=~\"$revision\",response_code=~\"5.*\"}[1m])) by (le)), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "5xx (p95)",
              "refId": "H"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Response Time by Response Code",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "s",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "collapsed": false,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 26
          },
          "id": 13,
          "panels": [],
          "title": "Request and Response Sizes",
          "type": "row"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 0,
            "y": 27
          },
          "id": 22,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(round(sum(rate(istio_revision_response_size_sum{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\"}[1m])) by (destination_revision) / sum(rate(istio_revision_response_size_count{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\"}[1m])) by (destination_revision), 1), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{destination_revision}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Response Size by Revision",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "decbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "prometheus",
          "fill": 1,
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 12,
            "y": 27
          },
          "id": 23,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(round(sum(rate(istio_revision_request_size_sum{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\"}[1m])) by (destination_revision) / sum(rate(istio_revision_request_size_count{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\"}[1m])) by (destination_revision), 1), \"destination_revision\", \"$2\", \"destination_revision\", \"$configuration(-+)(.*)\")",
              "format": "time_series",
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{destination_revision}}",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Request Size by Revision",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "decbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        }
      ],
      "refresh": "5s",
      "schemaVersion": 16,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Namespace",
            "multi": false,
            "name": "namespace",
            "options": [],
            "query": "label_values(istio_revision_request_count{destination_namespace!=\"unknown\"}, destination_namespace)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": false,
            "label": "Configuration",
            "multi": false,
            "name": "configuration",
            "options": [],
            "query": "label_values(istio_revision_request_count{destination_namespace=\"$namespace\", destination_configuration!=\"unknown\"}, destination_configuration)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "$tag",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {},
            "datasource": "prometheus",
            "hide": 0,
            "includeAll": true,
            "label": "Revision",
            "multi": true,
            "name": "revision",
            "options": [],
            "query": "label_values(istio_revision_request_count{destination_namespace=\"$namespace\", destination_configuration=~\"$configuration\", destination_revision!=\"unknown\"}, destination_revision)",
            "refresh": 1,
            "regex": "",
            "sort": 2,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-15m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "",
      "title": "Knative Serving - Revision HTTP Requests",
      "uid": "im_gFbWik",
      "version": 2
    }
kind: ConfigMap
metadata:
  name: grafana-dashboard-definition-knative
  namespace: knative-monitoring
---
apiVersion: v1
data:
  prometheus.yaml: |
    datasources:
     - name: prometheus
       type: prometheus
       access: proxy
       org_id: 1
       url: http://prometheus-system-np:8080
       version: 1
       editable: false
kind: ConfigMap
metadata:
  name: grafana-datasources
  namespace: knative-monitoring
---
apiVersion: v1
data:
  dashboards.yaml: |
    - name: 'knative'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/knative
    - name: 'knative-efficiency'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/knative-efficiency
    - name: 'istio'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/istio
    - name: 'mixer'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/mixer
    - name: 'pilot'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/pilot
    - name: 'kubernetes-deployment'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-deployment
    - name: 'kubernetes-capacity-planning'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-capacity-planning
    - name: 'kubernetes-cluster-health'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-cluster-health
    - name: 'kubernetes-cluster-status'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-cluster-status
    - name: 'kubernetes-control-plane-status'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-control-plane-status
    - name: 'kubernetes-resource-requests'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-resource-requests
    - name: 'kubernetes-nodes'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-nodes
    - name: 'kubernetes-pods'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-pods
    - name: 'kubernetes-statefulset'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/kubernetes-statefulset
    - name: 'knative-serving-scaling'
      org_id: 1
      folder: ''
      type: file
      options:
        folder: /grafana-dashboard-definition/scaling
kind: ConfigMap
metadata:
  name: grafana-dashboards
  namespace: knative-monitoring
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: grafana
  name: grafana
  namespace: knative-monitoring
spec:
  ports:
  - port: 30802
    protocol: TCP
    targetPort: 3000
  selector:
    app: grafana
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
  namespace: knative-monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
    spec:
      containers:
      - image: quay.io/coreos/monitoring-grafana:5.0.3
        name: grafana
        ports:
        - containerPort: 3000
          name: web
        resources:
          limits:
            cpu: 200m
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 100Mi
        volumeMounts:
        - mountPath: /data
          name: grafana-storage
        - mountPath: /grafana/conf/provisioning/datasources
          name: grafana-datasources
        - mountPath: /grafana/conf/provisioning/dashboards
          name: grafana-dashboards
        - mountPath: /grafana-dashboard-definition/knative
          name: grafana-dashboard-definition-knative
        - mountPath: /grafana-dashboard-definition/knative-efficiency
          name: grafana-dashboard-definition-knative-efficiency
        - mountPath: /grafana-dashboard-definition/istio
          name: grafana-dashboard-definition-istio
        - mountPath: /grafana-dashboard-definition/mixer
          name: grafana-dashboard-definition-mixer
        - mountPath: /grafana-dashboard-definition/pilot
          name: grafana-dashboard-definition-pilot
        - mountPath: /grafana-dashboard-definition/kubernetes-deployment
          name: grafana-dashboard-definition-kubernetes-deployment
        - mountPath: /grafana-dashboard-definition/kubernetes-capacity-planning
          name: grafana-dashboard-definition-kubernetes-capacity-planning
        - mountPath: /grafana-dashboard-definition/kubernetes-cluster-health
          name: grafana-dashboard-definition-kubernetes-cluster-health
        - mountPath: /grafana-dashboard-definition/kubernetes-cluster-status
          name: grafana-dashboard-definition-kubernetes-cluster-status
        - mountPath: /grafana-dashboard-definition/kubernetes-control-plane-status
          name: grafana-dashboard-definition-kubernetes-control-plane-status
        - mountPath: /grafana-dashboard-definition/kubernetes-resource-requests
          name: grafana-dashboard-definition-kubernetes-resource-requests
        - mountPath: /grafana-dashboard-definition/kubernetes-nodes
          name: grafana-dashboard-definition-kubernetes-nodes
        - mountPath: /grafana-dashboard-definition/kubernetes-pods
          name: grafana-dashboard-definition-kubernetes-pods
        - mountPath: /grafana-dashboard-definition/kubernetes-statefulset
          name: grafana-dashboard-definition-kubernetes-statefulset
        - mountPath: /grafana-dashboard-definition/scaling
          name: scaling-config
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      volumes:
      - emptyDir: {}
        name: grafana-storage
      - configMap:
          name: grafana-datasources
        name: grafana-datasources
      - configMap:
          name: grafana-dashboards
        name: grafana-dashboards
      - configMap:
          name: grafana-dashboard-definition-knative
        name: grafana-dashboard-definition-knative
      - configMap:
          name: grafana-dashboard-definition-knative-efficiency
        name: grafana-dashboard-definition-knative-efficiency
      - configMap:
          name: grafana-dashboard-definition-istio
        name: grafana-dashboard-definition-istio
      - configMap:
          name: grafana-dashboard-definition-mixer
        name: grafana-dashboard-definition-mixer
      - configMap:
          name: grafana-dashboard-definition-pilot
        name: grafana-dashboard-definition-pilot
      - configMap:
          name: grafana-dashboard-definition-kubernetes-deployment
        name: grafana-dashboard-definition-kubernetes-deployment
      - configMap:
          name: grafana-dashboard-definition-kubernetes-capacity-planning
        name: grafana-dashboard-definition-kubernetes-capacity-planning
      - configMap:
          name: grafana-dashboard-definition-kubernetes-cluster-health
        name: grafana-dashboard-definition-kubernetes-cluster-health
      - configMap:
          name: grafana-dashboard-definition-kubernetes-cluster-status
        name: grafana-dashboard-definition-kubernetes-cluster-status
      - configMap:
          name: grafana-dashboard-definition-kubernetes-control-plane-status
        name: grafana-dashboard-definition-kubernetes-control-plane-status
      - configMap:
          name: grafana-dashboard-definition-kubernetes-resource-requests
        name: grafana-dashboard-definition-kubernetes-resource-requests
      - configMap:
          name: grafana-dashboard-definition-kubernetes-nodes
        name: grafana-dashboard-definition-kubernetes-nodes
      - configMap:
          name: grafana-dashboard-definition-kubernetes-pods
        name: grafana-dashboard-definition-kubernetes-pods
      - configMap:
          name: grafana-dashboard-definition-kubernetes-statefulset
        name: grafana-dashboard-definition-kubernetes-statefulset
      - configMap:
          name: scaling-config
        name: scaling-config
--- null
---
apiVersion: config.istio.io/v1alpha2
kind: metric
metadata:
  name: revisionrequestcount
  namespace: istio-system
spec:
  dimensions:
    destination_configuration: destination.labels["serving.knative.dev/configuration"]
      | "unknown"
    destination_k8s_service: destination.service | "unknown"
    destination_namespace: destination.namespace | "unknown"
    destination_revision: destination.labels["serving.knative.dev/revision"] | "unknown"
    destination_service: destination.labels["serving.knative.dev/service"] | "unknown"
    response_code: response.code | 200
    source_k8s_service: source.service | "unknown"
  monitored_resource_type: '"UNSPECIFIED"'
  value: "1"
---
apiVersion: config.istio.io/v1alpha2
kind: metric
metadata:
  name: revisionrequestduration
  namespace: istio-system
spec:
  dimensions:
    destination_configuration: destination.labels["serving.knative.dev/configuration"]
      | "unknown"
    destination_k8s_service: destination.service | "unknown"
    destination_namespace: destination.namespace | "unknown"
    destination_revision: destination.labels["serving.knative.dev/revision"] | "unknown"
    destination_service: destination.labels["serving.knative.dev/service"] | "unknown"
    response_code: response.code | 200
    source_k8s_service: source.service | "unknown"
  monitored_resource_type: '"UNSPECIFIED"'
  value: response.duration | "0ms"
---
apiVersion: config.istio.io/v1alpha2
kind: metric
metadata:
  name: revisionrequestsize
  namespace: istio-system
spec:
  dimensions:
    destination_configuration: destination.labels["serving.knative.dev/configuration"]
      | "unknown"
    destination_k8s_service: destination.service | "unknown"
    destination_namespace: destination.namespace | "unknown"
    destination_revision: destination.labels["serving.knative.dev/revision"] | "unknown"
    destination_service: destination.labels["serving.knative.dev/service"] | "unknown"
    response_code: response.code | 200
    source_k8s_service: source.service | "unknown"
  monitored_resource_type: '"UNSPECIFIED"'
  value: request.size | 0
---
apiVersion: config.istio.io/v1alpha2
kind: metric
metadata:
  name: revisionresponsesize
  namespace: istio-system
spec:
  dimensions:
    destination_configuration: destination.labels["serving.knative.dev/configuration"]
      | "unknown"
    destination_k8s_service: destination.service | "unknown"
    destination_namespace: destination.namespace | "unknown"
    destination_revision: destination.labels["serving.knative.dev/revision"] | "unknown"
    destination_service: destination.labels["serving.knative.dev/service"] | "unknown"
    response_code: response.code | 200
    source_k8s_service: source.service | "unknown"
  monitored_resource_type: '"UNSPECIFIED"'
  value: response.size | 0
---
apiVersion: config.istio.io/v1alpha2
kind: prometheus
metadata:
  name: revisionpromhandler
  namespace: istio-system
spec:
  metrics:
  - instance_name: revisionrequestcount.metric.istio-system
    kind: COUNTER
    label_names:
    - source_k8s_service
    - destination_k8s_service
    - destination_namespace
    - destination_revision
    - destination_configuration
    - destination_service
    - response_code
    name: revision_request_count
  - buckets:
      explicit_buckets:
        bounds:
        - 0.005
        - 0.01
        - 0.025
        - 0.05
        - 0.1
        - 0.25
        - 0.5
        - 1
        - 2.5
        - 5
        - 10
    instance_name: revisionrequestduration.metric.istio-system
    kind: DISTRIBUTION
    label_names:
    - source_k8s_service
    - destination_k8s_service
    - destination_namespace
    - destination_revision
    - destination_configuration
    - destination_service
    - response_code
    name: revision_request_duration
  - buckets:
      exponentialBuckets:
        growthFactor: 10
        numFiniteBuckets: 8
        scale: 1
    instance_name: revisionrequestsize.metric.istio-system
    kind: DISTRIBUTION
    label_names:
    - source_k8s_service
    - destination_k8s_service
    - destination_namespace
    - destination_revision
    - destination_configuration
    - destination_service
    - response_code
    name: revision_request_size
  - buckets:
      exponentialBuckets:
        growthFactor: 10
        numFiniteBuckets: 8
        scale: 1
    instance_name: revisionresponsesize.metric.istio-system
    kind: DISTRIBUTION
    label_names:
    - source_k8s_service
    - destination_k8s_service
    - destination_namespace
    - destination_revision
    - destination_configuration
    - destination_service
    - response_code
    name: revision_response_size
---
apiVersion: config.istio.io/v1alpha2
kind: rule
metadata:
  labels:
    istio-protocol: http
  name: revisionpromhttp
  namespace: istio-system
spec:
  actions:
  - handler: revisionpromhandler.prometheus
    instances:
    - revisionrequestcount.metric
    - revisionrequestduration.metric
    - revisionrequestsize.metric
    - revisionresponsesize.metric
--- null
---
apiVersion: v1
data:
  prometheus.yml: "global:\n  scrape_interval: 30s\n  scrape_timeout: 10s\n  evaluation_interval:
    30s\nscrape_configs:\n# Autoscaler endpoint\n- job_name: autoscaler\n  scrape_interval:
    3s\n  scrape_timeout: 3s\n  kubernetes_sd_configs:\n  - role: pod\n  relabel_configs:\n
    \ # Scrape only the the targets matching the following metadata\n  - source_labels:
    [__meta_kubernetes_namespace, __meta_kubernetes_pod_label_app, __meta_kubernetes_pod_container_port_name]\n
    \   action: keep\n    regex: knative-serving;autoscaler;metrics\n  # Rename metadata
    labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Activator pods\n- job_name: activator\n  scrape_interval: 3s\n  scrape_timeout:
    3s\n  kubernetes_sd_configs:\n  - role: pod\n  relabel_configs:\n  # Scrape only
    the the targets matching the following metadata\n  - source_labels: [__meta_kubernetes_namespace,
    __meta_kubernetes_pod_label_app, __meta_kubernetes_pod_container_port_name]\n
    \   action: keep\n    regex: knative-serving;activator;metrics-port\n  # Rename
    metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1        \n# Fluentd daemonset\n- job_name: fluentd-ds\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  relabel_configs:\n  # Scrape only the the targets matching
    the following metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_label_app,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: knative-monitoring;fluentd-ds;prometheus-metrics\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Istio mesh\n- job_name: istio-mesh\n  scrape_interval: 5s\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  relabel_configs:\n  # Scrape only the the targets matching
    the following metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: istio-system;istio-telemetry;prometheus\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Istio Envoy\n# These are very noisy and not enabled by default.\n# - job_name:
    istio-envoy\n#   scrape_interval: 5s\n#   kubernetes_sd_configs:\n#   - role:
    endpoints\n#   relabel_configs:\n#   # Scrape only the the targets matching the
    following metadata\n#   - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,
    __meta_kubernetes_endpoint_port_name]\n#     action: keep\n#     regex: istio-system;istio-statsd-prom-bridge;statsd-prom\n#
    \  # Rename metadata labels to be reader friendly\n#   - source_labels: [__meta_kubernetes_namespace]\n#
    \    action: replace\n#     regex: (.*)\n#     target_label: namespace\n#     replacement:
    $1\n#   - source_labels: [__meta_kubernetes_pod_name]\n#     action: replace\n#
    \    regex: (.*)\n#     target_label: pod\n#     replacement: $1\n#   - source_labels:
    [__meta_kubernetes_service_name]\n#     action: replace\n#     regex: (.*)\n#
    \    target_label: service\n#     replacement: $1\n# Istio policy\n- job_name:
    istio-policy\n  scrape_interval: 5s\n  kubernetes_sd_configs:\n  - role: endpoints\n
    \ relabel_configs:\n  # Scrape only the the targets matching the following metadata\n
    \ - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: istio-system;istio-policy;http-monitoring\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Istio telemetry\n- job_name: istio-telemetry\n  scrape_interval: 5s\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  relabel_configs:\n  # Scrape only the the targets matching
    the following metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: istio-system;istio-telemetry;http-monitoring\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Istio pilot\n- job_name: istio-pilot\n  scrape_interval: 5s\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  relabel_configs:\n  # Scrape only the the targets matching
    the following metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: istio-system;istio-pilot;http-monitoring\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Kube API server\n- job_name: kube-apiserver\n  scheme: https\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n
    \ tls_config:\n    ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n
    \   server_name: kubernetes\n    insecure_skip_verify: false\n  relabel_configs:\n
    \ # Scrape only the the targets matching the following metadata\n  - source_labels:
    [__meta_kubernetes_namespace, __meta_kubernetes_service_label_component, __meta_kubernetes_service_label_provider,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: default;apiserver;kubernetes;https\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Kube controller manager\n- job_name: kube-controller-manager\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  relabel_configs:\n  # Scrape only the the targets matching
    the following metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_label_app,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: knative-monitoring;kube-controller-manager;http-metrics\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Kube scheduler\n- job_name: kube-scheduler\n  kubernetes_sd_configs:\n  -
    role: endpoints\n  relabel_configs:\n  # Scrape only the the targets matching
    the following metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_label_k8s_app,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: kube-system;kube-scheduler;http-metrics\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Kube state metrics on https-main port\n- job_name: kube-state-metrics-https-main\n
    \ honor_labels: true\n  scheme: https\n  kubernetes_sd_configs:\n  - role: endpoints\n
    \ bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n  tls_config:\n
    \   insecure_skip_verify: true\n  relabel_configs:\n  # Scrape only the the targets
    matching the following metadata\n  - source_labels: [__meta_kubernetes_namespace,
    __meta_kubernetes_service_label_app, __meta_kubernetes_endpoint_port_name]\n    action:
    keep\n    regex: knative-monitoring;kube-state-metrics;https-main\n  # Rename
    metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Kube state metrics on https-self port\n- job_name: kube-state-metrics-https-self\n
    \ scheme: https\n  kubernetes_sd_configs:\n  - role: endpoints\n  bearer_token_file:
    /var/run/secrets/kubernetes.io/serviceaccount/token\n  tls_config:\n    insecure_skip_verify:
    true\n  relabel_configs:\n  # Scrape only the the targets matching the following
    metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_label_app,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: knative-monitoring;kube-state-metrics;https-self\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Kubelet - nodes\n# Rather than connecting directly to the node, the scrape
    is proxied though the\n# Kubernetes apiserver.  This means it will work if Prometheus
    is running out of\n# cluster, or can't connect to nodes for some other reason
    (e.g. because of\n# firewalling).\n- job_name: kubernetes-nodes\n  scheme: https\n
    \ tls_config:\n    ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n
    \ bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n  kubernetes_sd_configs:\n
    \ - role: node\n  relabel_configs:\n  - action: labelmap\n    regex: __meta_kubernetes_node_label_(.+)\n
    \ - target_label: __address__\n    replacement: kubernetes.default.svc:443\n  -
    source_labels: [__meta_kubernetes_node_name]\n    regex: (.+)\n    target_label:
    __metrics_path__\n    replacement: /api/v1/nodes/${1}/proxy/metrics\n# Kubelet
    - cAdvisor\n#\n# This is required for Kubernetes 1.7.3 and later, where cAdvisor
    metrics\n# (those whose names begin with 'container_') have been removed from
    the\n# Kubelet metrics endpoint.  This job scrapes the cAdvisor endpoint to\n#
    retrieve those metrics.\n#\n# In Kubernetes 1.7.0-1.7.2, these metrics are only
    exposed on the cAdvisor\n# HTTP endpoint; use \"replacement: /api/v1/nodes/${1}:4194/proxy/metrics\"\n#
    in that case (and ensure cAdvisor's HTTP server hasn't been disabled with\n# the
    --cadvisor-port=0 Kubelet flag).\n- job_name: kubernetes-cadvisor\n  scrape_interval:
    15s\n  scheme: https\n  tls_config:\n    ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n
    \ bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n  kubernetes_sd_configs:\n
    \ - role: node\n  relabel_configs:\n  - action: labelmap\n    regex: __meta_kubernetes_node_label_(.+)\n
    \ - target_label: __address__\n    replacement: kubernetes.default.svc:443\n  -
    source_labels: [__meta_kubernetes_node_name]\n    regex: (.+)\n    target_label:
    __metrics_path__\n    replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor\n#
    Node exporter\n- job_name: node-exporter\n  scheme: https\n  kubernetes_sd_configs:\n
    \ - role: endpoints\n  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n
    \ tls_config:\n    insecure_skip_verify: true\n  relabel_configs:\n  # Scrape
    only the the targets matching the following metadata\n  - source_labels: [__meta_kubernetes_namespace,
    __meta_kubernetes_service_label_app, __meta_kubernetes_endpoint_port_name]\n    action:
    keep\n    regex: knative-monitoring;node-exporter;https\n  # Rename metadata labels
    to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n    action:
    replace\n    regex: (.*)\n    target_label: namespace\n    replacement: $1\n  -
    source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex: (.*)\n
    \   target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1\n# Prometheus\n- job_name: prometheus\n  kubernetes_sd_configs:\n  - role:
    endpoints\n  relabel_configs:\n  # Scrape only the the targets matching the following
    metadata\n  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_label_app,
    __meta_kubernetes_endpoint_port_name]\n    action: keep\n    regex: knative-monitoring;prometheus;web\n
    \ # Rename metadata labels to be reader friendly\n  - source_labels: [__meta_kubernetes_namespace]\n
    \   action: replace\n    regex: (.*)\n    target_label: namespace\n    replacement:
    $1\n  - source_labels: [__meta_kubernetes_pod_name]\n    action: replace\n    regex:
    (.*)\n    target_label: pod\n    replacement: $1\n  - source_labels: [__meta_kubernetes_service_name]\n
    \   action: replace\n    regex: (.*)\n    target_label: service\n    replacement:
    $1"
kind: ConfigMap
metadata:
  labels:
    name: prometheus-scrape-config
  name: prometheus-scrape-config
  namespace: knative-monitoring
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: kube-controller-manager
  name: kube-controller-manager
  namespace: knative-monitoring
spec:
  clusterIP: None
  ports:
  - name: http-metrics
    port: 10252
    protocol: TCP
    targetPort: 10252
  selector:
    k8s-app: kube-controller-manager
  type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: prometheus
  name: prometheus-system-discovery
  namespace: knative-monitoring
spec:
  clusterIP: None
  ports:
  - name: web
    port: 9090
    protocol: TCP
    targetPort: web
  selector:
    app: prometheus
  sessionAffinity: None
  type: ClusterIP
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: prometheus-system
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: prometheus-system
  namespace: default
rules:
- apiGroups:
  - ""
  resources:
  - nodes
  - services
  - endpoints
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: prometheus-system
  namespace: knative-monitoring
rules:
- apiGroups:
  - ""
  resources:
  - nodes
  - services
  - endpoints
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: prometheus-system
  namespace: kube-system
rules:
- apiGroups:
  - ""
  resources:
  - services
  - endpoints
  - pods
  verbs:
  - get
  - list
  - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: prometheus-system
  namespace: istio-system
rules:
- apiGroups:
  - ""
  resources:
  - nodes/metrics
  - nodes
  - services
  - endpoints
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: prometheus-system
  namespace: knative-monitoring
rules:
- apiGroups:
  - ""
  resources:
  - nodes/metrics
  - nodes
  - services
  - endpoints
  - pods
  - nodes/proxy
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
- nonResourceURLs:
  - /metrics
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: prometheus-system
  namespace: default
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: prometheus-system
subjects:
- kind: ServiceAccount
  name: prometheus-system
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: prometheus-system
  namespace: knative-monitoring
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: prometheus-system
subjects:
- kind: ServiceAccount
  name: prometheus-system
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: prometheus-system
  namespace: kube-system
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: prometheus-system
subjects:
- kind: ServiceAccount
  name: prometheus-system
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: prometheus-system
  namespace: istio-system
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: prometheus-system
subjects:
- kind: ServiceAccount
  name: prometheus-system
  namespace: knative-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: prometheus-system
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: prometheus-system
subjects:
- kind: ServiceAccount
  name: prometheus-system
  namespace: knative-monitoring
---
apiVersion: v1
kind: Service
metadata:
  name: prometheus-system-np
  namespace: knative-monitoring
spec:
  ports:
  - port: 8080
    targetPort: 9090
  selector:
    app: prometheus
  type: NodePort
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: prometheus-system
  namespace: knative-monitoring
spec:
  podManagementPolicy: Parallel
  replicas: 2
  selector:
    matchLabels:
      app: prometheus
  serviceName: prometheus-system
  template:
    metadata:
      labels:
        app: prometheus
    spec:
      containers:
      - args:
        - --config.file=/etc/prometheus/prometheus.yml
        - --storage.tsdb.path=/prometheus
        - --storage.tsdb.retention=2d
        - --storage.tsdb.no-lockfile
        - --web.enable-lifecycle
        - --web.route-prefix=/
        image: prom/prometheus:v2.2.1
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 10
          httpGet:
            path: /-/healthy
            port: web
            scheme: HTTP
          initialDelaySeconds: 30
          timeoutSeconds: 3
        name: prometheus
        ports:
        - containerPort: 9090
          name: web
          protocol: TCP
        readinessProbe:
          failureThreshold: 10
          httpGet:
            path: /-/ready
            port: web
            scheme: HTTP
          timeoutSeconds: 3
        resources:
          requests:
            memory: 400Mi
        terminationMessagePath: /dev/termination-log
        volumeMounts:
        - mountPath: /etc/prometheus/
          name: prometheus-config-volume
        - mountPath: /prometheus/
          name: prometheus-storage-volume
      serviceAccountName: prometheus-system
      terminationGracePeriodSeconds: 600
      volumes:
      - configMap:
          defaultMode: 420
          name: prometheus-scrape-config
        name: prometheus-config-volume
      - emptyDir: {}
        name: prometheus-storage-volume
  updateStrategy:
    type: RollingUpdate
---
apiVersion: v1
kind: Service
metadata:
  name: zipkin
  namespace: istio-system
spec:
  ports:
  - name: http
    port: 9411
  selector:
    app: zipkin
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: zipkin
  namespace: istio-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: zipkin
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app: zipkin
    spec:
      containers:
      - env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: STORAGE_TYPE
          value: elasticsearch
        - name: ES_HOSTS
          value: elasticsearch-logging.knative-monitoring.svc.cluster.local:9200
        - name: ES_INDEX
          value: zipkin
        - name: ZIPKIN_UI_LOGS_URL
          value: http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana#/
        image: docker.io/openzipkin/zipkin:latest
        imagePullPolicy: IfNotPresent
        name: zipkin
        ports:
        - containerPort: 9411
--- null
---
