<p>We need to add results of two queries in Prometheus. Snippet is below:</p>

<pre><code>(probe_ssl_earliest_cert_expiry{job="SSL-expiry"} - time() &lt; 86400 * 738 )*1000 + (node_time_seconds*1000)
</code></pre>

<p>but the result says no data as shown below:</p>

<p><a href="https://i.stack.imgur.com/GX89O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GX89O.png" alt="enter image description here"></a></p>

Navneet Nandan Jha
<p>You will get an empty result if the metrics do not match. The reason is that for <a href="https://prometheus.io/docs/prometheus/latest/querying/operators/#logical-set-binary-operators" rel="nofollow noreferrer">binary operator</a> <code>vector1 &lt;op&gt; vector2</code> </p>

<blockquote>
  <p>vector1 and vector2 results in a vector consisting of the elements of
  vector1 for which there are elements in vector2 with exactly matching
  label sets. Other elements are dropped.</p>
</blockquote>

<p>You must at least add a <code>on()</code> or <code>ignoring()</code> <a href="https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching" rel="nofollow noreferrer">vector matching</a> keyword specifying the labels (names) on which the (name and) value match. You may have to add grouping instruction if you have one to many matching.</p>

<p>Fill the <code>???</code> in the following expression such that label match:</p>

<pre><code>(probe_ssl_earliest_cert_expiry{job="SSL-expiry"} - time() &lt; 86400 * 738 )*1000 + ON(???) (node_time_seconds*1000)
</code></pre>
