title: Dynamic Thresholds in a PromQL query
body: <p>I have the following defined</p>
  <pre><code>    - record: node_load5:node_cpu_seconds_total:critical
        expr: 3
  
      - record: node_load5:node_cpu_seconds_total:critical
        expr: 5
        labels:
          app: loki
  
      - record: Node_High_LoadAverage:Query
        expr: ((node_load5 / count without (cpu, mode) (node_cpu_seconds_total{mode=&quot;system&quot;})))
  </code></pre>
  <p>and want to use a query in an Prometheus alert that evaulates the threshold by the value specified by the label or a default value.</p>
  <p>I can evaluate the <code>node_load5:node_cpu_seconds_total:critical</code> to two different values and use <code>Node_High_LoadAverage:Query</code> to abbreviate a query.</p>
  <p>I'm trying to use <code>group_left</code> and <code>on</code> to perform a join.  This is my query that isn't working.</p>
  <pre><code>Node_High_LoadAverage:Query &gt; on (app) group_left node_load5:node_cpu_seconds_total:critical
  </code></pre>
  <p>Has anybody done something similar and is willing to share their working example?</p>
  <p>Thanks!</p>