From 8e311d4b9fbfbd17d8947e4bf5116cefe4540f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nat=C3=A1lia=20Granato?= Date: Tue, 10 Sep 2024 20:26:09 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20Adicionar=20documenta=C3=A7=C3=A3o=20so?= =?UTF-8?q?bre=20monitoramento=20com=20Zabbix=20e=20Grafana?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/{EXTRAS.md => Locust.md} | 0 docs/Redis.md | 23 + docs/Zabbix.md | 1 + monitoring/Chart.yaml | 62 -- monitoring/persistence_gr.yaml | 26 + monitoring/redis-dashboard.json | 1444 +++++++++++++++++++++++++++++++ 6 files changed, 1494 insertions(+), 62 deletions(-) rename docs/{EXTRAS.md => Locust.md} (100%) create mode 100644 docs/Redis.md create mode 100644 docs/Zabbix.md delete mode 100644 monitoring/Chart.yaml create mode 100644 monitoring/persistence_gr.yaml create mode 100644 monitoring/redis-dashboard.json diff --git a/docs/EXTRAS.md b/docs/Locust.md similarity index 100% rename from docs/EXTRAS.md rename to docs/Locust.md diff --git a/docs/Redis.md b/docs/Redis.md new file mode 100644 index 0000000..532e702 --- /dev/null +++ b/docs/Redis.md @@ -0,0 +1,23 @@ +# Configurando o Redis como fonte de dados no Grafana + +1. Acesse o Grafana através do serviço exposto no Kubernetes. +2. Faça login como administrador. +3. Navegue até "Configuration" > "Data Sources". +4. Clique em "Add data source". +5. Procure e selecione "Redis". +6. Preencha os campos conforme abaixo: + - **Name**: Redis + - **Type**: Standalone + - **URL**: `redis-service.giropops-senhas.svc.cluster.local:6379` # DNS interno do Redis no Kubernetes +7. Clique em "Save & Test". + +Agora o Grafana está configurado para acessar o Redis como fonte de dados. É esperado que apareça a seguinte mensagem: "Data Source is working as expected." Possibilitando a criação de dashboards com dados do Redis. + +## Criando uma dasboard com dados do Redis + +1. Navegue até "Dashboards" > "New". +2. Clique em "New dashboard". +3. Importe a dashboard do Redis através do arquivo `redis-dashboard.json` disponível no repositório. +4. Os dados começarão a ser exibidos na dashboard. +5. Clique em "Save dashboard" para salvar a dashboard. +6. Acesse a minha dashboard do Redis através do link: [Redis Dashboard](https://grafana.nataliagranato.xyz/public-dashboards/853f8db7e3984dd58011fc4cdd12d439). diff --git a/docs/Zabbix.md b/docs/Zabbix.md new file mode 100644 index 0000000..6a994c1 --- /dev/null +++ b/docs/Zabbix.md @@ -0,0 +1 @@ +# Monitorando nossa aplicação com Zabbix diff --git a/monitoring/Chart.yaml b/monitoring/Chart.yaml deleted file mode 100644 index bbf453b..0000000 --- a/monitoring/Chart.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: v2 -description: kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator. -icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png -type: application -maintainers: - - name: andrewgkew - email: andrew@quadcorps.co.uk - - name: gianrubio - email: gianrubio@gmail.com - - name: gkarthiks - email: github.gkarthiks@gmail.com - - name: GMartinez-Sisti - email: kube-prometheus-stack@sisti.pt - - name: jkroepke - email: github@jkroepke.de - - name: scottrigby - email: scott@r6by.com - - name: Xtigyro - email: miroslav.hadzhiev@gmail.com - - name: QuentinBisson - email: quentin.bisson@gmail.com -name: kube-prometheus-stack -sources: - - https://github.com/prometheus-community/helm-charts - - https://github.com/prometheus-operator/kube-prometheus -version: 62.6.0 -appVersion: v0.76.1 -kubeVersion: ">=1.19.0-0" -home: https://github.com/prometheus-operator/kube-prometheus -keywords: - - operator - - prometheus - - kube-prometheus -annotations: - "artifacthub.io/license": Apache-2.0 - "artifacthub.io/operator": "true" - "artifacthub.io/links": | - - name: Chart Source - url: https://github.com/prometheus-community/helm-charts - - name: Upstream Project - url: https://github.com/prometheus-operator/kube-prometheus - -dependencies: - - name: crds - version: "0.0.0" - condition: crds.enabled - - name: kube-state-metrics - version: "5.25.*" - repository: https://prometheus-community.github.io/helm-charts - condition: kubeStateMetrics.enabled - - name: prometheus-node-exporter - version: "4.39.*" - repository: https://prometheus-community.github.io/helm-charts - condition: nodeExporter.enabled - - name: grafana - version: "8.5.*" - repository: https://grafana.github.io/helm-charts - condition: grafana.enabled - - name: prometheus-windows-exporter - repository: https://prometheus-community.github.io/helm-charts - version: "0.6.*" - condition: windowsMonitoring.enabled diff --git a/monitoring/persistence_gr.yaml b/monitoring/persistence_gr.yaml new file mode 100644 index 0000000..b3be715 --- /dev/null +++ b/monitoring/persistence_gr.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: grafana-pv + namespace: monitoring +spec: + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + storageClassName: oci + hostPath: + path: /data/grafana +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: grafana-storage + namespace: monitoring +spec: + accessModes: + - ReadWriteOnce + storageClassName: oci + resources: + requests: + storage: 5Gi diff --git a/monitoring/redis-dashboard.json b/monitoring/redis-dashboard.json new file mode 100644 index 0000000..2a1b6c4 --- /dev/null +++ b/monitoring/redis-dashboard.json @@ -0,0 +1,1444 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Predefined dashboards to observe any Redis database using Redis Data Source. Requires Grafana 7.1+.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 12776, + "graphTooltip": 0, + "id": 31, + "links": [ + { + "icon": "external link", + "tags": [], + "targetBlank": true, + "title": "Redis.io", + "type": "link", + "url": "https://redis.io/" + } + ], + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 56, + "panels": [], + "repeat": "redis", + "targets": [ + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "refId": "A" + } + ], + "title": "Main", + "type": "row" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "dark-yellow", + "value": 22000 + }, + { + "color": "dark-red", + "value": 25000 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 24, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "stats", + "type": "command" + } + ], + "title": "Ops/sec", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "instantaneous_ops_per_sec" + ] + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "decimals": 1, + "mappings": [], + "max": 11000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "dark-yellow", + "value": 8000 + }, + { + "color": "dark-red", + "value": 10000 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 3, + "y": 1 + }, + "id": 25, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "stats", + "type": "command" + } + ], + "title": "Network", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "instantaneous_input_kbps", + "instantaneous_output_kbps" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "instantaneous_input_kbps": "Input", + "instantaneous_output_kbps": "Output" + } + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Used Memory" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used Memory, Peak" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used Memory, LUA" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory Limit" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total System Memory" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 11, + "y": 1 + }, + "id": 8, + "options": { + "displayMode": "lcd", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "memory", + "type": "command" + } + ], + "title": "Memory", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "used_memory", + "used_memory_peak", + "total_system_memory", + "maxmemory", + "used_memory_lua" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "maxmemory": 3, + "total_system_memory": 4, + "used_memory": 0, + "used_memory_lua": 2, + "used_memory_peak": 1 + }, + "renameByName": { + "maxmemory": "Memory Limit", + "total_system_memory": "Total System Memory", + "used_memory": "Used Memory", + "used_memory_lua": "Used Memory, LUA", + "used_memory_peak": "Used Memory, Peak" + } + } + } + ], + "type": "bargauge" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 19, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "server", + "type": "command" + } + ], + "title": "Uptime", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "uptime_in_seconds" + ] + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 4 + }, + "id": 22, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "clients", + "type": "command" + } + ], + "title": "Connected Clients", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "connected_clients" + ] + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 4 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "server", + "type": "command" + } + ], + "title": "Version", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "redis_version" + ] + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 7 + }, + "id": 2, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "dbsize", + "refId": "A", + "type": "cli" + } + ], + "title": "Number of Keys", + "type": "stat" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 3, + "y": 7 + }, + "id": 36, + "options": { + "displayMode": "lcd", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "stats", + "type": "command" + } + ], + "title": "Keys", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "expired_keys", + "evicted_keys" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "evicted_keys": "Evicted", + "expired_keys": "Expired" + } + } + } + ], + "type": "bargauge" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 10, + "x": 11, + "y": 7 + }, + "id": 38, + "options": { + "displayMode": "lcd", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "stats", + "type": "command" + } + ], + "title": "Keyspace", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "keyspace_hits", + "keyspace_misses" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "keyspace_hits": "Hits", + "keyspace_misses": "Misses" + } + } + } + ], + "type": "bargauge" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 7 + }, + "id": 34, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "memory", + "type": "command" + } + ], + "title": "Eviction Policy", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "maxmemory_policy" + ] + } + } + } + ], + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 32, + "panels": [], + "repeat": "redis", + "targets": [ + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "refId": "A" + } + ], + "title": "Other", + "type": "row" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total duration" + }, + "properties": [ + { + "id": "custom.width", + "value": 99 + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Client" + }, + "properties": [ + { + "id": "custom.width", + "value": 127 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Idle time" + }, + "properties": [ + { + "id": "custom.width", + "value": 95 + }, + { + "id": "unit", + "value": "s" + }, + { + "id": "decimals", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 6, + "x": 0, + "y": 11 + }, + "id": 4, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Idle time" + } + ] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "clientList", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "type": "command" + } + ], + "title": "Client connections", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "addr", + "age", + "idle", + "cmd" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "addr": "Client", + "age": "Total duration", + "cmd": "Last command", + "id": "Id", + "idle": "Idle time" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Calls" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Number of calls" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.width", + "value": 127 + }, + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total Duration" + }, + "properties": [ + { + "id": "custom.width", + "value": 127 + }, + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Duration per call" + }, + "properties": [ + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Command" + }, + "properties": [ + { + "id": "custom.width", + "value": 115 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 7, + "x": 6, + "y": 11 + }, + "id": 41, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Total Duration" + } + ] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "info", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "section": "commandstats", + "type": "command" + } + ], + "title": "Command statistics", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Calls": "Number of calls", + "Command": "", + "Usec": "Total Duration", + "Usec_per_call": "Duration per call" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Unique progressive identifier" + }, + "properties": [ + { + "id": "custom.width", + "value": 205 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Timestamp" + }, + "properties": [ + { + "id": "custom.width", + "value": 145 + }, + { + "id": "unit", + "value": "dateTimeFromNow" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Duration" + }, + "properties": [ + { + "id": "custom.width", + "value": 92 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Command" + }, + "properties": [ + { + "id": "custom.width", + "value": 1185 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 11, + "x": 13, + "y": 11 + }, + "id": 11, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "command": "slowlogGet", + "datasource": { + "type": "redis-datasource", + "uid": "edxhjfzsd39j4c" + }, + "query": "", + "refId": "A", + "type": "command" + } + ], + "title": "Slow queries log", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Id": true, + "Timestamp": false + }, + "indexByName": { + "Command": 4, + "Duration": 3, + "Id": 0, + "Timestamp": 1, + "Timestamp * 1000": 2 + }, + "renameByName": { + "Duration": "", + "Id": "Id", + "Timestamp * 1000": "Timestamp" + } + } + } + ], + "type": "table" + } + ], + "refresh": "5s", + "schemaVersion": 39, + "tags": [ + "redis" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Redis", + "uid": "RpSjVqWMz", + "version": 4, + "weekStart": "" +} \ No newline at end of file