Skip to content

Commit

Permalink
Accept suffixes to pod name in instance labels (#2080)
Browse files Browse the repository at this point in the history
Currently, the instance label is just the pod name, but that's
insufficient,
cf. grafana/deployment_tools#3441 .

In the near future, we'll suffix the pod name in the instance label
with container name and/or port name. To make this mixin still work,
adjust the `instance` label matcher.

Signed-off-by: beorn7 <[email protected]>
  • Loading branch information
beorn7 authored May 18, 2020
1 parent e0dacd2 commit d343c09
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions production/loki-mixin/dashboard-loki-logs.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(go_goroutines{cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod\"})",
"expr": "sum(go_goroutines{cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod.*\"})",
"refId": "A"
}
],
Expand Down Expand Up @@ -146,7 +146,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(go_gc_duration_seconds{cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod\"}) by (quantile)",
"expr": "sum(go_gc_duration_seconds{cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod.*\"}) by (quantile)",
"legendFormat": "{{quantile}}",
"refId": "A"
}
Expand Down Expand Up @@ -664,7 +664,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(promtail_custom_bad_words_total{cluster=\"$cluster\", exported_namespace=\"$namespace\", exported_instance=~\"$deployment.*\", exported_instance=~\"$pod\", container_name=~\"$container\"}[5m])) by (level)",
"expr": "sum(rate(promtail_custom_bad_words_total{cluster=\"$cluster\", exported_namespace=\"$namespace\", exported_instance=~\"$deployment.*\", exported_instance=~\"$pod.*\", container_name=~\"$container\"}[5m])) by (level)",
"legendFormat": "{{level}}",
"refId": "A"
}
Expand Down Expand Up @@ -768,7 +768,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(rate({cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod\", container_name=~\"$container\", level=~\"$level\"}$filter[5m])) by (level)",
"expr": "sum(rate({cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod.*\", container_name=~\"$container\", level=~\"$level\"}$filter[5m])) by (level)",
"intervalFactor": 3,
"legendFormat": "{{level}}",
"refId": "A"
Expand Down Expand Up @@ -833,7 +833,7 @@
},
"targets": [
{
"expr": "{cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod\", container_name=~\"$container\", level=~\"$level\"} $filter",
"expr": "{cluster=\"$cluster\", namespace=\"$namespace\", instance=~\"$deployment.*\", instance=~\"$pod.*\", container_name=~\"$container\", level=~\"$level\"} $filter",
"refId": "A"
}
],
Expand Down Expand Up @@ -1070,4 +1070,4 @@
"title": "Logs",
"uid": "a7e130cb82be229d6f3edbfd0a438001",
"version": 1
}
}

0 comments on commit d343c09

Please sign in to comment.