prometheus-blackbox-exporter

Adding two values in Prometheus

柔情痞子 提交于 2020-12-27 07:12:58
问题 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.

Adding two values in Prometheus

戏子无情 提交于 2020-12-27 07:11:58
问题 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.

Adding two values in Prometheus

断了今生、忘了曾经 提交于 2020-12-27 07:10:48
问题 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.

sum of rate function in prometheus

三世轮回 提交于 2020-12-27 07:09:37
问题 Given the following prometheus time series called requests : the vector query requests[3 seconds] is : and the rate of the vector query requests[3 seconds], rate(requests[3 sec]) (computed by the shown formula) is : My question is : what is sum(rate(requests[3 sec])) evaluated at seconds 5, 4 and 3 respectively is it 16.5, 6.5 and 1. Any idea? 回答1: You are misunderstanding the purpose of sum. It is not performing a sum over time but over the dimensions for your metric. In your example,

sum of rate function in prometheus

余生颓废 提交于 2020-12-27 07:03:30
问题 Given the following prometheus time series called requests : the vector query requests[3 seconds] is : and the rate of the vector query requests[3 seconds], rate(requests[3 sec]) (computed by the shown formula) is : My question is : what is sum(rate(requests[3 sec])) evaluated at seconds 5, 4 and 3 respectively is it 16.5, 6.5 and 1. Any idea? 回答1: You are misunderstanding the purpose of sum. It is not performing a sum over time but over the dimensions for your metric. In your example,

sum of rate function in prometheus

最后都变了- 提交于 2020-12-27 07:02:06
问题 Given the following prometheus time series called requests : the vector query requests[3 seconds] is : and the rate of the vector query requests[3 seconds], rate(requests[3 sec]) (computed by the shown formula) is : My question is : what is sum(rate(requests[3 sec])) evaluated at seconds 5, 4 and 3 respectively is it 16.5, 6.5 and 1. Any idea? 回答1: You are misunderstanding the purpose of sum. It is not performing a sum over time but over the dimensions for your metric. In your example,

Prometheus json metrics

时光总嘲笑我的痴心妄想 提交于 2019-12-13 04:26:21
问题 The application I want to monitor provides an api endpoint for health checks that responds with metrics in json. As an example: $ curl https://example.com/api/stats {"status":"success","code":0,"data":{"UserCount":140,"UserCountActive":23}} I have setup the Prometheus blackbox_exporter to monitor that this endpoint returns 200 Ok however I'd ideally like to get those metrics too. I understand instrumentation exports this data directly from the application. But since the application is already