Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3413

Support ACM recording rule in SWATCH

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • swatch-metrics
    • False
    • Hide

      None

      Show
      None
    • False

      NoteĀ once ACM validates recording rule we can utilize it in SWATCH like below. Me and lburnett0 are still debating whether to set this query in swatch-metrics application.yaml in rosa, default or acm.

      For org 5691294

      We have provided few options to ACM team on changing the recording rule. Since SWATCH isn't the appropriate place to maintain each product's custom business logic to compute the values of usage to be metered.

      We may not need to do the following but, we are still ironing out with ACM:

      topk(1, max(acm_capacity_effective_cpu_cores) by (_id)
          * on(_id) group_right
          min_over_time(ocm_subscription{product=~"moa-hostedcontrolplane", external_organization="5691294", support=~"Premium|Standard|Self-Support|None", metered_by_rh!="false"}[1h]))
      

      Result

      {_id="17277f6d-f760-4949-af1a-1d93983639d5", account="1xwWrms9ndnGhveUGg5iitacj3D", billing_marketplace="aws", billing_marketplace_account="515966534054", billing_model="marketplace", class="Unknown", cloud_account_id="515966534054", disconnected="false", display_name="hcp-poc", ebs_account="1082951", email_domain="rbs.co.uk", external_organization="5691294", has_csm="false", has_tam="true", instance="uhc-acct-mngr-green-metrics.uhc-production.svc:8080", job="uhc-acct-mngr-green-metrics", managed="true", metered_by_rh="true", namespace="uhc-production", organization="1Np3zXRXH2QrF3jaIJ7dIzc8khP", product="moa-hostedcontrolplane", prometheus="openshift-customer-monitoring/ams", receive="true", rhit_web_user_id="51367488", risk="5", service="uhc-acct-mngr-green-metrics", support="Premium", tenant_id="FB870BF3-9F3A-44FF-9BF7-D7A047A52F43"}
      
      Value: 56
      

              Unassigned Unassigned
              karshah@redhat.com Kartik Shah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: