From a41d24387ea3194b6cf201fc2addfb8ebe30a5f7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 23 Nov 2024 15:58:51 +0100 Subject: [PATCH] Update: monitoring mixins set to v1.12.0 for pyroscope-mixin (#934) Signed-off-by: Nicolas Lamirault Co-authored-by: Nicolas Lamirault --- charts/pyroscope-mixin/Chart.yaml | 8 +-- .../dashboards/pyroscope-reads.json | 34 ++++------- .../dashboards/pyroscope-writes.json | 60 +++++-------------- .../templates/configmap-dashboards.yaml | 21 ++----- charts/pyroscope-mixin/templates/rules.yaml | 25 +++----- 5 files changed, 41 insertions(+), 107 deletions(-) diff --git a/charts/pyroscope-mixin/Chart.yaml b/charts/pyroscope-mixin/Chart.yaml index 4e117cf9..1d82221b 100644 --- a/charts/pyroscope-mixin/Chart.yaml +++ b/charts/pyroscope-mixin/Chart.yaml @@ -28,8 +28,8 @@ keywords: - kubernetes - monitoring-mixin - portefaix -version: 1.4.1 -appVersion: 1.2.0 +version: 1.5.0 +appVersion: 1.10.0 maintainers: - name: nlamirault email: nicolas.lamirault@gmail.com @@ -51,5 +51,5 @@ annotations: fingerprint: C39918B3EBDE35C23B8D0B8E5F99269A6FCA437C url: https://keybase.io/nlamirault/pgp_keys.asc artifacthub.io/changes: | - - kind: fixed - description: ConfigMap dashboards naming + - kind: changed + description: pyroscope-mixin v1.10.0 diff --git a/charts/pyroscope-mixin/dashboards/pyroscope-reads.json b/charts/pyroscope-mixin/dashboards/pyroscope-reads.json index 42f016ba..108710f3 100644 --- a/charts/pyroscope-mixin/dashboards/pyroscope-reads.json +++ b/charts/pyroscope-mixin/dashboards/pyroscope-reads.json @@ -14,7 +14,7 @@ "keepTime": true, "tags": [ "pyroscope-mixin", - "monitoring-mixins-v1.5.0" + "monitoring-mixins-v1.12.0" ], "targetBlank": false, "title": "Pyroscope Dashboards", @@ -71,7 +71,6 @@ { "expr": "sum by (status) (\n label_replace(label_replace(rate(pyroscope_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(pyroscope|querier)\", route=~\".*merge.*|.*series.*|.*type.*\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{status}}", "refId": "A" } @@ -146,26 +145,20 @@ { "expr": "histogram_quantile(0.99, sum by (le,route) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|querier)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ route }} 99th percentile", - "refId": "A", - "step": 10 + "refId": "A" }, { "expr": "histogram_quantile(0.50, sum by (le,route) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|querier)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ route }} 50th percentile", - "refId": "B", - "step": 10 + "refId": "B" }, { "expr": "1e3 * sum(job_route_cluster:pyroscope_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(pyroscope|querier)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"}) by (route) / sum(job_route_cluster:pyroscope_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(pyroscope|querier)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"}) by (route) ", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ route }} Average", - "refId": "C", - "step": 10 + "refId": "C" } ], "thresholds": [ ], @@ -260,7 +253,6 @@ { "expr": "sum by (status) (\n label_replace(label_replace(rate(pyroscope_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*merge.*|.*series.*|.*type.*\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{status}}", "refId": "A" } @@ -335,26 +327,20 @@ { "expr": "histogram_quantile(0.99, sum by (le,route) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ route }} 99th percentile", - "refId": "A", - "step": 10 + "refId": "A" }, { "expr": "histogram_quantile(0.50, sum by (le,route) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ route }} 50th percentile", - "refId": "B", - "step": 10 + "refId": "B" }, { "expr": "1e3 * sum(job_route_cluster:pyroscope_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"}) by (route) / sum(job_route_cluster:pyroscope_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*merge.*|.*series.*|.*type.*\", cluster=~\"$cluster\"}) by (route) ", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ route }} Average", - "refId": "C", - "step": 10 + "refId": "C" } ], "thresholds": [ ], @@ -406,7 +392,7 @@ "style": "dark", "tags": [ "pyroscope-mixin", - "monitoring-mixins-v1.5.0" + "monitoring-mixins-v1.12.0" ], "templating": { "list": [ @@ -416,7 +402,7 @@ "value": "default" }, "hide": 0, - "label": "Data Source", + "label": "Data source", "name": "datasource", "options": [ ], "query": "prometheus", @@ -505,4 +491,4 @@ "title": "Pyroscope / Reads", "uid": "pyroscope-reads", "version": 0 - } + } \ No newline at end of file diff --git a/charts/pyroscope-mixin/dashboards/pyroscope-writes.json b/charts/pyroscope-mixin/dashboards/pyroscope-writes.json index 061494ff..dc13f405 100644 --- a/charts/pyroscope-mixin/dashboards/pyroscope-writes.json +++ b/charts/pyroscope-mixin/dashboards/pyroscope-writes.json @@ -14,7 +14,7 @@ "keepTime": true, "tags": [ "pyroscope-mixin", - "monitoring-mixins-v1.5.0" + "monitoring-mixins-v1.12.0" ], "targetBlank": false, "title": "Pyroscope Dashboards", @@ -61,26 +61,20 @@ { "expr": "histogram_quantile(0.99, sum by (le,type) (job_type_cluster:pyroscope_distributor_received_compressed_bytes_bucket:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"})) * 1", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ type }} 99th percentile", - "refId": "A", - "step": 10 + "refId": "A" }, { "expr": "histogram_quantile(0.50, sum by (le,type) (job_type_cluster:pyroscope_distributor_received_compressed_bytes_bucket:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"})) * 1", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ type }} 50th percentile", - "refId": "B", - "step": 10 + "refId": "B" }, { "expr": "1 * sum(job_type_cluster:pyroscope_distributor_received_compressed_bytes_sum:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"}) by (type) / sum(job_type_cluster:pyroscope_distributor_received_compressed_bytes_count:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"}) by (type) ", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ type }} Average", - "refId": "C", - "step": 10 + "refId": "C" } ], "thresholds": [ ], @@ -153,26 +147,20 @@ { "expr": "histogram_quantile(0.99, sum by (le,type) (job_type_cluster:pyroscope_distributor_received_samples_bucket:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"})) * 1", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ type }} 99th percentile", - "refId": "A", - "step": 10 + "refId": "A" }, { "expr": "histogram_quantile(0.50, sum by (le,type) (job_type_cluster:pyroscope_distributor_received_samples_bucket:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"})) * 1", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ type }} 50th percentile", - "refId": "B", - "step": 10 + "refId": "B" }, { "expr": "1 * sum(job_type_cluster:pyroscope_distributor_received_samples_sum:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"}) by (type) / sum(job_type_cluster:pyroscope_distributor_received_samples_count:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", type=~\".*\", cluster=~\"$cluster\"}) by (type) ", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{ type }} Average", - "refId": "C", - "step": 10 + "refId": "C" } ], "thresholds": [ ], @@ -267,7 +255,6 @@ { "expr": "sum by (status) (\n label_replace(label_replace(rate(pyroscope_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(pyroscope|distributor)\", route=~\".*push.*|.*ingest.*\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{status}}", "refId": "A" } @@ -342,26 +329,20 @@ { "expr": "histogram_quantile(0.99, sum by (le) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", route=~\".*push.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "99th percentile", - "refId": "A", - "step": 10 + "refId": "A" }, { "expr": "histogram_quantile(0.50, sum by (le) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", route=~\".*push.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "50th percentile", - "refId": "B", - "step": 10 + "refId": "B" }, { "expr": "1e3 * sum(job_route_cluster:pyroscope_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", route=~\".*push.*\", cluster=~\"$cluster\"}) / sum(job_route_cluster:pyroscope_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(pyroscope|distributor)\", route=~\".*push.*\", cluster=~\"$cluster\"})", "format": "time_series", - "intervalFactor": 2, "legendFormat": "Average", - "refId": "C", - "step": 10 + "refId": "C" } ], "thresholds": [ ], @@ -456,7 +437,6 @@ { "expr": "sum by (status) (\n label_replace(label_replace(rate(pyroscope_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*push.*|.*ingest.*\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-zA-Z]+)\"))\n", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{status}}", "refId": "A" } @@ -531,26 +511,20 @@ { "expr": "histogram_quantile(0.99, sum by (le) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*push.*|.*ingest.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "99th percentile", - "refId": "A", - "step": 10 + "refId": "A" }, { "expr": "histogram_quantile(0.50, sum by (le) (job_route_cluster:pyroscope_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*push.*|.*ingest.*\", cluster=~\"$cluster\"})) * 1e3", "format": "time_series", - "intervalFactor": 2, "legendFormat": "50th percentile", - "refId": "B", - "step": 10 + "refId": "B" }, { "expr": "1e3 * sum(job_route_cluster:pyroscope_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*push.*|.*ingest.*\", cluster=~\"$cluster\"}) / sum(job_route_cluster:pyroscope_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(pyroscope|ingester)\", route=~\".*push.*|.*ingest.*\", cluster=~\"$cluster\"})", "format": "time_series", - "intervalFactor": 2, "legendFormat": "Average", - "refId": "C", - "step": 10 + "refId": "C" } ], "thresholds": [ ], @@ -636,7 +610,6 @@ { "expr": "sum(pyroscope_head_size_bytes{cluster=~\"$cluster\",job=~\"($namespace)/(pyroscope|ingester)\",}) by (type)", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{type}}", "legendLink": null } @@ -712,7 +685,6 @@ { "expr": "sum(pyroscope_head_size_bytes{cluster=~\"$cluster\",job=~\"($namespace)/(pyroscope|ingester)\",}) by (instance)", "format": "time_series", - "intervalFactor": 2, "legendFormat": "{{instance}}", "legendLink": null } @@ -766,7 +738,7 @@ "style": "dark", "tags": [ "pyroscope-mixin", - "monitoring-mixins-v1.5.0" + "monitoring-mixins-v1.12.0" ], "templating": { "list": [ @@ -776,7 +748,7 @@ "value": "default" }, "hide": 0, - "label": "Data Source", + "label": "Data source", "name": "datasource", "options": [ ], "query": "prometheus", @@ -865,4 +837,4 @@ "title": "Pyroscope / Writes", "uid": "pyroscope-writes", "version": 0 - } + } \ No newline at end of file diff --git a/charts/pyroscope-mixin/templates/configmap-dashboards.yaml b/charts/pyroscope-mixin/templates/configmap-dashboards.yaml index 91ba228b..5c7a683f 100644 --- a/charts/pyroscope-mixin/templates/configmap-dashboards.yaml +++ b/charts/pyroscope-mixin/templates/configmap-dashboards.yaml @@ -1,19 +1,3 @@ -# Copyright (C) Nicolas Lamirault -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - {{ if .Values.grafanaDashboard.enabled -}} {{- $files := .Files.Glob "dashboards/*.json" }} {{- if $files }} @@ -22,15 +6,17 @@ apiVersion: v1 kind: ConfigMapList items: {{- range $path, $fileContents := $files }} -{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" | lower }} - apiVersion: v1 kind: ConfigMap metadata: annotations: grafana-folder: {{ $.Values.grafanaDashboard.folder }} + {{- include "pyroscope-mixin.annotations" $ | indent 6 }} labels: grafana-dashboard: {{ $dashboardName }} {{- include "pyroscope-mixin.labels" $ | indent 6 }} + app.kubernetes.io/component: dashboard name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }} namespace: {{ include "pyroscope-mixin.namespace" $ }} data: @@ -46,6 +32,7 @@ kind: GrafanaDashboard metadata: labels: {{- include "pyroscope-mixin.labels" $ | indent 4 }} + app.kubernetes.io/component: dashboard name: {{ printf "%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }} namespace: {{ $.Release.Namespace }} spec: diff --git a/charts/pyroscope-mixin/templates/rules.yaml b/charts/pyroscope-mixin/templates/rules.yaml index 9e915d4c..c409d3fd 100644 --- a/charts/pyroscope-mixin/templates/rules.yaml +++ b/charts/pyroscope-mixin/templates/rules.yaml @@ -1,30 +1,18 @@ -# Copyright (C) Nicolas Lamirault -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - +{{ if .Values.monitor.enabled -}} --- apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: + name: {{ printf "%s-%s" (include "pyroscope-mixin.fullname" .) "rules" | trunc 63 | trimSuffix "-" }} + namespace: {{ include "pyroscope-mixin.namespace" . }} + annotations: + {{- include "pyroscope-mixin.annotations" . | indent 4 }} labels: {{- include "pyroscope-mixin.labels" . | indent 4 }} + app.kubernetes.io/component: metrics {{- if .Values.monitor.additionalLabels }} {{- toYaml .Values.monitor.additionalLabels | nindent 4 }} {{- end }} - name: {{ printf "%s-%s" (include "pyroscope-mixin.fullname" .) "rules" | trunc 63 | trimSuffix "-" }} - namespace: {{ include "pyroscope-mixin.namespace" . }} spec: groups: - name: pyroscope_rules @@ -89,3 +77,4 @@ spec: record: job_type_cluster:pyroscope_distributor_received_samples_sum:sum_rate - expr: sum(rate(pyroscope_distributor_received_samples_count[1m])) by (job, type, cluster) record: job_type_cluster:pyroscope_distributor_received_samples_count:sum_rate +{{- end }}