Edit definition of namespace variable to use grafana custom promql function `label_values`.
Rename variable namespace to operator_namespace.
Rename variable exported_namespace to namespace
Signed-off-by: Daniel AguadoAraujo <daniel.aguadoaraujo@gfk.com>
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)",
"exemplar":true,
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)",
"interval":"",
"interval":"",
"legendFormat":"{{kind}}",
"legendFormat":"{{kind}}",
"refId":"A"
"refId":"A"
@ -316,7 +321,6 @@
"description":"",
"description":"",
"fieldConfig":{
"fieldConfig":{
"defaults":{
"defaults":{
"custom":{},
"mappings":[],
"mappings":[],
"thresholds":{
"thresholds":{
"mode":"absolute",
"mode":"absolute",
@ -356,12 +360,14 @@
"fields":"",
"fields":"",
"values":false
"values":false
},
},
"showUnfilled":true
"showUnfilled":true,
"text":{}
},
},
"pluginVersion":"7.2.1",
"pluginVersion":"7.5.5",
"targets":[
"targets":[
{
{
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)",
"exemplar":true,
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)",
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)",
"exemplar":true,
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)",
"hide":false,
"hide":false,
"interval":"",
"interval":"",
"legendFormat":"{{kind}}/{{name}}",
"legendFormat":"{{kind}}/{{name}}",
@ -741,9 +748,7 @@
"datasource":"${DS_PROMETHEUS}",
"datasource":"${DS_PROMETHEUS}",
"description":"",
"description":"",
"fieldConfig":{
"fieldConfig":{
"defaults":{
"defaults":{},
"custom":{}
},
"overrides":[]
"overrides":[]
},
},
"fill":1,
"fill":1,
@ -776,7 +781,7 @@
"alertThreshold":true
"alertThreshold":true
},
},
"percentage":false,
"percentage":false,
"pluginVersion":"7.2.1",
"pluginVersion":"7.5.5",
"pointradius":2,
"pointradius":2,
"points":false,
"points":false,
"renderer":"flot",
"renderer":"flot",
@ -786,7 +791,8 @@
"steppedLine":false,
"steppedLine":false,
"targets":[
"targets":[
{
{
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)",
"exemplar":true,
"expr":" sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)",