# argocd_source_runningAnalysisRun.yaml
apiVersion: argoproj.io/v1alpha1
kind: AnalysisRun
metadata:
  name: canary-demo-analysis-template-6c6bb7cf6f-5bpxj
  namespace: default
spec:
  analysisSpec:
    metrics:
      - failureCondition: len(result) == 0
        interval: 10
        name: memory-usage
        provider:
          prometheus:
            address: 'http://prometheus-operator-prometheus.prometheus-operator:9090'
            query: >
              sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview",status!~"[4-5].*"}[2m]))
              /
              sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview"}[2m]))
        successCondition: len(result) > 0
status:
  metricResults:
    - count: 2
      measurements:
        - finishedAt: '2019-10-28T18:22:05Z'
          startedAt: '2019-10-28T18:22:05Z'
          phase: Successful
          value: '[0.9721293199554069]'
        - finishedAt: '2019-10-28T18:22:15Z'
          startedAt: '2019-10-28T18:22:15Z'
          phase: Successful
          value: '[0.9721293199554069]'
      name: memory-usage
      phase: Running
      successful: 2
  phase: Running