From c4f3c2e5048efb732f97bbb4e42e4566f25ab954 Mon Sep 17 00:00:00 2001 From: Eric Wiseblatt Date: Tue, 29 Jan 2019 20:16:48 +0000 Subject: [PATCH] refined metrics --- .../experimental/metric_filters/default.yml | 10 ++- .../front50-microservice-dashboard.json | 4 +- .../kubernetes-platform-dashboard.json | 87 +++---------------- .../front50-service-dashboard.json | 6 +- 4 files changed, 25 insertions(+), 82 deletions(-) diff --git a/spinnaker-monitoring-daemon/experimental/metric_filters/default.yml b/spinnaker-monitoring-daemon/experimental/metric_filters/default.yml index 176cda8..14fb027 100644 --- a/spinnaker-monitoring-daemon/experimental/metric_filters/default.yml +++ b/spinnaker-monitoring-daemon/experimental/metric_filters/default.yml @@ -612,8 +612,6 @@ monitoring: unit: requests per_account: True tags: - - kinds - - kind - namespace - reason - action @@ -622,6 +620,10 @@ monitoring: - from: success to: success type: BOOL + - from: method + to: resource + type: STRING + extract_regex: '([^.]+)\..+|^$' okhttp.requests: rename: okhttp/completions @@ -988,7 +990,7 @@ monitoring: - objectType storageServiceSupport.numAdded: - rename: front50/cache/added + rename: front50/cache/add kind: Counter docs: Number of items added into the cache. unit: items @@ -996,7 +998,7 @@ monitoring: - objectType storageServiceSupport.numRemoved: - rename: front50/cache/removed + rename: front50/cache/remove kind: Counter docs: Number of items removed from the cache. unit: items diff --git a/spinnaker-monitoring-third-party/third_party/prometheus/experimental/front50-microservice-dashboard.json b/spinnaker-monitoring-third-party/third_party/prometheus/experimental/front50-microservice-dashboard.json index f6204dc..342a75d 100644 --- a/spinnaker-monitoring-third-party/third_party/prometheus/experimental/front50-microservice-dashboard.json +++ b/spinnaker-monitoring-third-party/third_party/prometheus/experimental/front50-microservice-dashboard.json @@ -779,7 +779,7 @@ "steppedLine": false, "targets": [ { - "expr": "avg($Function(front50_cache_added_total{instance=~\"$Instance\"}[$SamplePeriod])) by (objectType)", + "expr": "avg($Function(front50_cache_add_total{instance=~\"$Instance\"}[$SamplePeriod])) by (objectType)", "intervalFactor": 2, "legendFormat": "add {{objectType}}", "metric": "", @@ -787,7 +787,7 @@ "step": 40 }, { - "expr": "-1 * avg($Function(front50_cache_removed_total{instance=~\"$Instance\"}[$SamplePeriod])) by (objectType)", + "expr": "-1 * avg($Function(front50_cache_remove_total{instance=~\"$Instance\"}[$SamplePeriod])) by (objectType)", "intervalFactor": 2, "legendFormat": "del {{objectType}}", "refId": "B", diff --git a/spinnaker-monitoring-third-party/third_party/prometheus/experimental/kubernetes-platform-dashboard.json b/spinnaker-monitoring-third-party/third_party/prometheus/experimental/kubernetes-platform-dashboard.json index 3ef4096..85f88c8 100644 --- a/spinnaker-monitoring-third-party/third_party/prometheus/experimental/kubernetes-platform-dashboard.json +++ b/spinnaker-monitoring-third-party/third_party/prometheus/experimental/kubernetes-platform-dashboard.json @@ -100,24 +100,14 @@ "step": 4 }, { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success!=\"true\"}[$SamplePeriod])) by (kind,action)", + "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success!=\"true\"}[$SamplePeriod])) by (action)", "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{kind}}.{{action}}", + "legendFormat": "{{action}}", "metric": "", "refId": "B", "step": 4 - }, - { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success!=\"true\"}[$SamplePeriod])) by (kinds,action)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{kinds}}.{{action}}", - "metric": "", - "refId": "C", - "step": 4 } ], "thresholds": [], @@ -208,20 +198,12 @@ "step": 4 }, { - "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",namespace=~\"$KubernetesNamespace\",success!=\"true\",account=~\"$KubernetesAccount\"}[$SamplePeriod])) by (kind,action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success!=\"true\"}[$SamplePeriod])) by (kind,action)", + "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",namespace=~\"$KubernetesNamespace\",success!=\"true\",account=~\"$KubernetesAccount\"}[$SamplePeriod])) by (action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success!=\"true\"}[$SamplePeriod])) by (action)", "intervalFactor": 2, - "legendFormat": "{{kind}}.{{action}}", + "legendFormat": "{{action}}", "metric": "", "refId": "B", "step": 4 - }, - { - "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",namespace=~\"$KubernetesNamespace\",success!=\"true\",account=~\"$KubernetesAccount\"}[$SamplePeriod])) by (kinds,action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success!=\"true\"}[$SamplePeriod])) by (kinds,action)", - "intervalFactor": 2, - "legendFormat": "{{kinds,action}}", - "metric": "", - "refId": "C", - "step": 4 } ], "thresholds": [], @@ -315,22 +297,15 @@ "step": 10 }, { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",success!=\"true\"}[$SamplePeriod])) by (kind)", + "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",success!=\"true\"}[$SamplePeriod])) by (action)", "format": "time_series", "hide": false, "interval": "", "intervalFactor": 2, - "legendFormat": "{{kind}} ", + "legendFormat": "{{action}} ", "metric": "", "refId": "B", "step": 10 - }, - { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",success!=\"true\"}[$SamplePeriod])) by (kinds)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{kinds}} ", - "refId": "C" } ], "thresholds": [], @@ -613,22 +588,13 @@ "step": 4 }, { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success=\"true\"}[$SamplePeriod])) by (kind, action)", + "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success=\"true\"}[$SamplePeriod])) by (action)", "interval": "", "intervalFactor": 2, - "legendFormat": "{{kind}}.{{action}}", + "legendFormat": "{{action}}", "metric": "", "refId": "B", "step": 4 - }, - { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success=\"true\"}[$SamplePeriod])) by (kinds, action)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{kinds}}.{{action}}", - "metric": "", - "refId": "C", - "step": 4 } ], "thresholds": [], @@ -719,20 +685,12 @@ "step": 4 }, { - "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",namespace=~\"$KubernetesNamespace\",success=\"true\",account=~\"$KubernetesAccount\"}[$SamplePeriod])) by (kind,action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method!=\"\",kind!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success=\"true\"}[$SamplePeriod])) by (kind,action)", + "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",namespace=~\"$KubernetesNamespace\",success=\"true\",account=~\"$KubernetesAccount\"}[$SamplePeriod])) by (action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method!=\"\",action!=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success=\"true\"}[$SamplePeriod])) by (action)", "intervalFactor": 2, - "legendFormat": "{{kind}}.{{action}}", + "legendFormat": "{{action}}", "metric": "", "refId": "B", "step": 4 - }, - { - "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",namespace=~\"$KubernetesNamespace\",success=\"true\",account=~\"$KubernetesAccount\"}[$SamplePeriod])) by (kinds,action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method!=\"\",kind=\"\",namespace=~\"$KubernetesNamespace\",account=~\"$KubernetesAccount\",success=\"true\"}[$SamplePeriod])) by (kinds,action)", - "intervalFactor": 2, - "legendFormat": "{{kinds}}.{{action}}", - "metric": "", - "refId": "C", - "step": 4 } ], "thresholds": [], @@ -824,22 +782,13 @@ "step": 10 }, { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",method=\"\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",success=\"true\"}[$SamplePeriod])) by (kind)", + "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",method=\"\",spin_service=\"clouddriver\",method=\"\",action!=\"\",success=\"true\"}[$SamplePeriod])) by (action)", "interval": "", "intervalFactor": 2, - "legendFormat": "{{kind}} ", + "legendFormat": "{{action}} ", "metric": "", "refId": "B", "step": 10 - }, - { - "expr": "sum($Function(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",method=\"\",spin_service=\"clouddriver\",method=\"\",kind=\"\",success=\"true\"}[$SamplePeriod])) by (kinds)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{kinds}} ", - "metric": "", - "refId": "C", - "step": 10 } ], "thresholds": [], @@ -1121,20 +1070,12 @@ "step": 10 }, { - "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",success=\"true\"}[$SamplePeriod])) by (kind) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind!=\"\",success=\"true\"}[$SamplePeriod])) by (kind)", + "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",success=\"true\"}[$SamplePeriod])) by (action) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",action!=\"\",success=\"true\"}[$SamplePeriod])) by (action)", "intervalFactor": 2, - "legendFormat": "{{kind}}", + "legendFormat": "{{action}}", "metric": "", "refId": "B", "step": 10 - }, - { - "expr": "sum(rate(platform_kubernetes_api_completions__totalTime_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",success=\"true\"}[$SamplePeriod])) by (kinds) / sum(rate(platform_kubernetes_api_completions__count_total{instance=~\"$Instance\",spin_service=\"clouddriver\",method=\"\",kind=\"\",success=\"true\"}[$SamplePeriod])) by (kinds)", - "intervalFactor": 2, - "legendFormat": "{{kinds}}", - "metric": "", - "refId": "C", - "step": 10 } ], "thresholds": [], diff --git a/spinnaker-monitoring-third-party/third_party/stackdriver/experimental/front50-service-dashboard.json b/spinnaker-monitoring-third-party/third_party/stackdriver/experimental/front50-service-dashboard.json index d34de2f..2c82c28 100644 --- a/spinnaker-monitoring-third-party/third_party/stackdriver/experimental/front50-service-dashboard.json +++ b/spinnaker-monitoring-third-party/third_party/stackdriver/experimental/front50-service-dashboard.json @@ -239,7 +239,7 @@ "dataSets": [ { "timeSeriesFilter": { - "filter": "metric.type=\"custom.googleapis.com/spinnaker/front50/cache/added\" AND metric.label.spin_service=\"front50\"", + "filter": "metric.type=\"custom.googleapis.com/spinnaker/front50/cache/add\" AND metric.label.spin_service=\"front50\"", "perSeriesAligner": "ALIGN_RATE", "crossSeriesReducer": "REDUCE_SUM", "secondaryCrossSeriesReducer": "REDUCE_NONE", @@ -265,7 +265,7 @@ "dataSets": [ { "timeSeriesFilter": { - "filter": "metric.type=\"custom.googleapis.com/spinnaker/front50/cache/removed\" AND metric.label.spin_service=\"front50\"", + "filter": "metric.type=\"custom.googleapis.com/spinnaker/front50/cache/remove\" AND metric.label.spin_service=\"front50\"", "perSeriesAligner": "ALIGN_RATE", "crossSeriesReducer": "REDUCE_SUM", "secondaryCrossSeriesReducer": "REDUCE_NONE", @@ -291,7 +291,7 @@ "dataSets": [ { "timeSeriesFilter": { - "filter": "metric.type=\"custom.googleapis.com/spinnaker/front50/cache/updated\" AND metric.label.spin_service=\"front50\"", + "filter": "metric.type=\"custom.googleapis.com/spinnaker/front50/cache/update\" AND metric.label.spin_service=\"front50\"", "perSeriesAligner": "ALIGN_RATE", "crossSeriesReducer": "REDUCE_SUM", "secondaryCrossSeriesReducer": "REDUCE_NONE",