Fix top-line Grafana counts (#815)

The top-line single stat numbers were not calculated properly, resulting
in inflated counts.

Modify the underlying Prometheus queries to ensure accurate counts of
Deployments, Pods, and Namespaces.

Fixes #801.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
This commit is contained in:
Andrew Seigner 2018-04-19 18:01:06 -07:00 committed by GitHub
parent 1f32f130de
commit 326d9f493c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -264,7 +264,7 @@
"tableColumn": "",
"targets": [
{
"expr": "count(request_total{dst_namespace=\"$namespace\", dst_deployment=\"$deployment\", direction=\"outbound\"})",
"expr": "count(count(request_total{dst_namespace=\"$namespace\", dst_deployment=\"$deployment\", direction=\"outbound\"}) by (namespace, deployment))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "",
@ -346,7 +346,7 @@
"tableColumn": "",
"targets": [
{
"expr": "count(request_total{namespace=\"$namespace\", deployment=\"$deployment\", dst_deployment=~\"$outbound\", direction=\"outbound\"})",
"expr": "count(count(request_total{namespace=\"$namespace\", deployment=\"$deployment\", direction=\"outbound\"}) by (namespace, dst_deployment))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "",

View File

@ -264,7 +264,7 @@
"tableColumn": "",
"targets": [
{
"expr": "count(request_total{dst_namespace=\"$namespace\", dst_pod=\"$pod\", direction=\"outbound\"})",
"expr": "count(count(request_total{dst_namespace=\"$namespace\", dst_pod=\"$pod\", direction=\"outbound\"}) by (namespace, pod))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "",
@ -346,7 +346,7 @@
"tableColumn": "",
"targets": [
{
"expr": "count(request_total{namespace=\"$namespace\", pod=\"$pod\", direction=\"outbound\"})",
"expr": "count(count(request_total{namespace=\"$namespace\", pod=\"$pod\", direction=\"outbound\"}) by (namespace, dst_pod))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "",

View File

@ -269,7 +269,7 @@
}
],
"thresholds": "",
"title": "Namespaces Monitored",
"title": "NAMESPACES MONITORED",
"type": "singlestat",
"valueFontSize": "200%",
"valueMaps": [
@ -351,7 +351,7 @@
}
],
"thresholds": "",
"title": "Deployments Monitored",
"title": "DEPLOYMENTS MONITORED",
"type": "singlestat",
"valueFontSize": "200%",
"valueMaps": [