Adding two values in Prometheus
问题 We need to add results of two queries in Prometheus. Snippet is below: (probe_ssl_earliest_cert_expiry{job="SSL-expiry"} - time() < 86400 * 738 )*1000 + (node_time_seconds*1000) but the result says no data as shown below: 回答1: You will get an empty result if the metrics do not match. The reason is that for binary operator vector1 <op> vector2 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.