Skip to content

Commit

Permalink
refined metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wiseblatt committed Jan 29, 2019
1 parent 5a67486 commit c4f3c2e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,6 @@ monitoring:
unit: requests
per_account: True
tags:
- kinds
- kind
- namespace
- reason
- action
Expand All @@ -622,6 +620,10 @@ monitoring:
- from: success
to: success
type: BOOL
- from: method
to: resource
type: STRING
extract_regex: '([^.]+)\..+|^$'

okhttp.requests:
rename: okhttp/completions
Expand Down Expand Up @@ -988,15 +990,15 @@ monitoring:
- objectType

storageServiceSupport.numAdded:
rename: front50/cache/added
rename: front50/cache/add
kind: Counter
docs: Number of items added into the cache.
unit: items
tags:
- objectType

storageServiceSupport.numRemoved:
rename: front50/cache/removed
rename: front50/cache/remove
kind: Counter
docs: Number of items removed from the cache.
unit: items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,15 +779,15 @@
"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": "",
"refId": "A",
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down Expand Up @@ -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": [],
Expand Down Expand Up @@ -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": [],
Expand Down Expand Up @@ -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": [],
Expand Down Expand Up @@ -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": [],
Expand Down Expand Up @@ -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": [],
Expand Down Expand Up @@ -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": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit c4f3c2e

Please sign in to comment.