diff --git a/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json b/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json index ba088252afe222032d25ed7d87d5dea40b65eb66..b5b857e7573264f26289ba9a72ec5444e4ac71a4 100644 --- a/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json +++ b/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 27, - "iteration": 1669995219512, + "id": 25, + "iteration": 1671297223428, "links": [], "panels": [ { @@ -174,10 +174,10 @@ "targets": [ { "exemplar": true, - "expr": "sum(increase(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~\"[[pod]]\"}[$__rate_interval])) by (le)", + "expr": "sum(\r\n max_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~\"[[pod]]\"}[1m]) -\r\n min_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~\"[[pod]]\"}[1m])\r\n) by (le)", "format": "heatmap", "instant": false, - "interval": "10s", + "interval": "1m", "intervalFactor": 1, "legendFormat": "{{le}}", "queryType": "randomWalk", diff --git a/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json b/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json index a8663239b947e22472bbd98a5933d48ff6430a99..2926a409b3b77b16c4e7b5d86ecd7d56f6acdebc 100644 --- a/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json +++ b/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 25, - "iteration": 1669993886467, + "id": 26, + "iteration": 1671318718779, "links": [], "panels": [ { @@ -174,10 +174,10 @@ "targets": [ { "exemplar": true, - "expr": "sum(increase(tfs_device_driver_[[method]]_histogram_duration_bucket{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"}[$__rate_interval])) by (le)", + "expr": "sum(\r\n max_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"}[1m]) -\r\n min_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"}[1m])\r\n) by (le)", "format": "heatmap", "instant": false, - "interval": "10s", + "interval": "60s", "intervalFactor": 1, "legendFormat": "{{le}}", "queryType": "randomWalk", diff --git a/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json b/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json index 6f65a78b22e3afd537cbc28078e980a7534d640e..48e770afe4bba9c2eb5df76d3532bf35d6cfe192 100644 --- a/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json +++ b/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 26, - "iteration": 1669992491077, + "id": 27, + "iteration": 1671319012315, "links": [], "panels": [ { @@ -175,10 +175,10 @@ "targets": [ { "exemplar": true, - "expr": "sum(increase(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"}[$__rate_interval])) by (le)", + "expr": "sum(\r\n max_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"}[1m]) -\r\n min_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"}[1m])\r\n) by (le)", "format": "heatmap", "instant": false, - "interval": "10s", + "interval": "1m", "intervalFactor": 1, "legendFormat": "{{le}}", "queryType": "randomWalk", diff --git a/src/common/method_wrappers/tests/prometheus_queries.txt b/src/common/method_wrappers/tests/prometheus_queries.txt index be44ad1058ac30735fdae1178c96ae439365ec63..9eb69e970aa1daffc0a491734dad5b381051e994 100644 --- a/src/common/method_wrappers/tests/prometheus_queries.txt +++ b/src/common/method_wrappers/tests/prometheus_queries.txt @@ -14,7 +14,11 @@ tfs_[[component]]_rpc_[[method]]_counter_requests_started_total tfs_[[component]]_rpc_[[method]]_counter_requests_completed_total tfs_[[component]]_rpc_[[method]]_counter_requests_failed_total tfs_[[component]]_rpc_[[method]]_histogram_duration_sum -sum(increase(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket[$__rate_interval])) by (le) +#sum(increase(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket[$__rate_interval])) by (le) +sum( + max_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~"[[pod]]"}[1m]) - + min_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~"[[pod]]"}[1m]) +) by (le) TFS/Device/Driver: @@ -33,8 +37,11 @@ tfs_device_driver_[[method]]_counter_requests_started_total{driver="[[driver]]"} tfs_device_driver_[[method]]_counter_requests_completed_total{driver="[[driver]]"} tfs_device_driver_[[method]]_counter_requests_failed_total{driver="[[driver]]"} tfs_device_driver_[[method]]_histogram_duration_sum{driver="[[driver]]"} -sum(increase(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]"}[$__rate_interval])) by (le) - +#sum(increase(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]"}[$__rate_interval])) by (le) +sum( + max_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]", pod=~"deviceservice-[[pod]]"}[1m]) - + min_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]", pod=~"deviceservice-[[pod]]"}[1m]) +) by (le) variables: name=method @@ -49,4 +56,8 @@ tfs_service_handler_[[method]]_counter_requests_started_total{handler="[[handler tfs_service_handler_[[method]]_counter_requests_completed_total{handler="[[handler]]"} tfs_service_handler_[[method]]_counter_requests_failed_total{handler="[[handler]]"} tfs_service_handler_[[method]]_histogram_duration_sum{handler="[[handler]]"} -sum(increase(tfs_service_handler_[[method]]_histogram_duration_bucket{handler="[[handler]]"}[$__rate_interval])) by (le) +#sum(increase(tfs_service_handler_[[method]]_histogram_duration_bucket{handler="[[handler]]"}[$__rate_interval])) by (le) +sum( + max_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~"[[handler]]", pod=~"serviceservice-[[pod]]"}[1m]) - + min_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~"[[handler]]", pod=~"serviceservice-[[pod]]"}[1m]) +) by (le)