From 873e457d96f1734c118cc53edbaa668aa84c4213 Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Wed, 5 Aug 2020 13:48:35 -0500 Subject: [PATCH 1/9] exporter queries, prometheus config file and dashboards --- exporter/postgres/queries_containers.yml | 156 ++ grafana/containers/crud_details.json | 306 ++++ grafana/containers/goldensignals4.json | 531 ++++++ grafana/containers/pgbackrest.json | 304 ++++ grafana/containers/pod_details.json | 854 +++++++++ grafana/containers/postgresql_details.json | 1706 ++++++++++++++++++ grafana/containers/postgresql_overview.json | 205 +++ grafana/containers/prometheus_alerts.json | 716 ++++++++ prometheus/crunchy-prometheus.yml.containers | 66 + 9 files changed, 4844 insertions(+) create mode 100644 exporter/postgres/queries_containers.yml create mode 100644 grafana/containers/crud_details.json create mode 100644 grafana/containers/goldensignals4.json create mode 100644 grafana/containers/pgbackrest.json create mode 100644 grafana/containers/pod_details.json create mode 100644 grafana/containers/postgresql_details.json create mode 100644 grafana/containers/postgresql_overview.json create mode 100644 grafana/containers/prometheus_alerts.json create mode 100644 prometheus/crunchy-prometheus.yml.containers diff --git a/exporter/postgres/queries_containers.yml b/exporter/postgres/queries_containers.yml new file mode 100644 index 00000000..1dec761c --- /dev/null +++ b/exporter/postgres/queries_containers.yml @@ -0,0 +1,156 @@ +### +# +# Begin File: pod_metrics.yml +# +### +ccp_container_network: + query: "SELECT interface,tx_bytes,tx_packets, rx_bytes,rx_packets from public.proc_network_stats()" + metrics: + - interface: + usage: "LABEL" + - tx_bytes: + usage: "GAUGE" + description: "Number of bytes transmitted" + - tx_packets: + usage: "GAUGE" + description: "Number of packets transmitted" + - rx_bytes: + usage: "GAUGE" + description: "Number of bytes received" + - rx_packets: + usage: "GAUGE" + description: "Number of packets received" + +ccp_container_process: + query: "SELECT public.cgroup_process_count() as count" + metrics: + - count: + usage: "GAUGE" + description: "Total number of processes on database container" + + +ccp_container_mem: + query: "SELECT public.kdapi_scalar_bigint('mem_request') as request, public.kdapi_scalar_bigint('mem_limit') as limit, (select val from cgroup_setof_kv('memory.stat') where key='cache') as cache, (select val from cgroup_setof_kv('memory.stat') where key='rss') as rss, (select val from cgroup_setof_kv('memory.stat') where key='shmem') as shmem, (select val from cgroup_setof_kv('memory.stat') where key='mapped_file') as mapped_file, (select val from cgroup_setof_kv('memory.stat') where key='dirty') as dirty, (select val from cgroup_setof_kv('memory.stat') where key='active_anon') as active_anon, (select val from cgroup_setof_kv('memory.stat') where key='inactive_anon') as inactive_anon, (select val from cgroup_setof_kv('memory.stat') where key='active_file') as active_file, (select val from cgroup_setof_kv('memory.stat') where key='inactive_file') as inactive_file" + metrics: + - request: + usage: "GAUGE" + description: "Memory request value in bytes" + - limit: + usage: "GAUGE" + description: "Memory limit value in bytes" + - cache: + usage: "GAUGE" + description: "Total bytes of page cache memory" + - rss: + usage: "GAUGE" + description: "Total bytes of anonymous and swap cache memory" + - shmem: + usage: "GAUGE" + description: "Total bytes of shared memory" + - mapped_file: + usage: "GAUGE" + description: "Total bytes of mapped file (includes tmpfs/shmem)" + - mapped_file: + usage: "GAUGE" + description: "Total bytes of mapped file (includes tmpfs/shmem)" + - dirty: + usage: "GAUGE" + description: "Total bytes that are waiting to get written back to the disk" + - active_anon: + usage: "GAUGE" + description: "Total bytes of anonymous and swap cache memory on active LRU list" + - inactive_anon: + usage: "GAUGE" + description: "Total bytes of anonymous and swap cache memory on inactive LRU list" + - active_file: + usage: "GAUGE" + description: "Total bytes of file-backed memory on active LRU list" + - inactive_file: + usage: "GAUGE" + description: "Total bytes of file-backed memory on inactive LRU list" + + +ccp_container_cpu: + query: "SELECT public.kdapi_scalar_bigint('cpu_request') as request, public.kdapi_scalar_bigint('cpu_limit') as limit" + metrics: + - request: + usage: "GAUGE" + description: "CPU request value in milli cores" + - limit: + usage: "GAUGE" + description: "CPU limit value in milli cores" + +ccp_container_cpucfs: + query: "SELECT cgroup_scalar_bigint('cpu.cfs_period_us') as period_us, cgroup_scalar_bigint('cpu.cfs_quota_us') as quota_us" + metrics: + - period_us: + usage: "GAUGE" + description: "the total available run-time within a period (in microseconds)" + - quota_us: + usage: "GAUGE" + description: "the length of a period (in microseconds)" + +ccp_container_cpuacct: + query: "SELECT cgroup_scalar_bigint('cpuacct.usage') as usage" + metrics: + - usage: + usage: "GAUGE" + description: "CPU usage in nanoseconds" + +ccp_container_cpustat: + query: "select (SELECT val as nr_periods FROM cgroup_setof_kv('cpu.stat') where key='nr_periods'), (SELECT val as nr_throttled FROM cgroup_setof_kv('cpu.stat') where key='nr_throttled'), (SELECT val as throttled_time FROM cgroup_setof_kv('cpu.stat') where key='throttled_time')" + metrics: + - nr_threads: + usage: "GAUGE" + description: "number of periods that any thread was runnable" + - nr_throttled: + usage: "GAUGE" + description: "number of runnable periods in which the application used its entire quota and was throttled" + - throttled_time: + usage: "GAUGE" + description: "sum total amount of time individual threads within the cgroup were throttled" + + +ccp_container_data_disk: + query: "SELECT mount_point, fs_type,reads_completed_successfully as reads, sectors_read, writes_completed as writes,sectors_written, total_bytes,available_bytes,total_file_nodes,free_file_nodes + FROM proc_mountinfo() m + JOIN proc_diskstats() d USING (major_number, minor_number) + JOIN fsinfo(m.mount_point) f USING (major_number, minor_number) + WHERE m.mount_point like '/pg%' or m.mount_point like '/tablespace%'" + metrics: + - mount_point: + usage: "LABEL" + description: "mount point" + - fs_type: + usage: "GAUGE" + description: "File system type" + - reads: + usage: "GAUGE" + description: "Total reads" + - sectors_read: + usage: "GAUGE" + description: "Total sectors read" + - writes: + usage: "GAUGE" + description: "Total writes" + - sectors_written: + usage: "GAUGE" + description: "Total sectors writen" + - total_bytes: + usage: "GAUGE" + description: "Size in bytes" + - available_bytes: + usage: "GAUGE" + description: "Available size in bytes" + - total_file_nodes: + usage: "GAUGE" + description: "Total file nodes" + - free_file_nodes: + usage: "GAUGE" + description: "Available file nodes" + +### +# +# End File: pod_metrics.yml +# +### diff --git a/grafana/containers/crud_details.json b/grafana/containers/crud_details.json new file mode 100644 index 00000000..f0ee86db --- /dev/null +++ b/grafana/containers/crud_details.json @@ -0,0 +1,306 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "overwrite": true, + "folderId": 0, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "iteration": 1555134244785, + "links": [ + { + "icon": "external link", + "includeVars": true, + "tags": [], + "type": "dashboards" + } + ], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 0 + }, + "height": "480", + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "minSpan": 10, + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "inserts - [[dbname]].[[schemaname]].[[tablename]]", + "refId": "A", + "step": 60 + }, + { + "expr": "sum(rate(ccp_stat_user_tables_n_tup_upd{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Updates - [[dbname]].[[schemaname]].[[tablename]]", + "refId": "B", + "step": 60 + }, + { + "expr": "sum(rate(ccp_stat_user_tables_n_tup_del{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Deletes - [[dbname]].[[schemaname]].[[tablename]]", + "refId": "C", + "step": 60 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CRUD", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "30s", + "schemaVersion": 16, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "metrics-1", + "value": "metrics-1" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": true, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": "label_values({pg_cluster=\"[[cluster]]\"},instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", + "hide": 0, + "includeAll": true, + "label": "dbname", + "multi": true, + "name": "dbname", + "options": [], + "query": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": true, + "label": "schemaname", + "multi": true, + "name": "schemaname", + "options": [], + "query": "label_values(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\",dbname=\"[[dbname]]\"},schemaname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "tablename", + "options": [], + "query": "label_values(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\",instance=\"[[pod]]\",dbname=\"[[dbname]]\",schemaname=\"[[schemaname]]\"},relname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "CRUD_Details", + "uid": "cruddetails", + "Name": "CRUD_Details" + } +} diff --git a/grafana/containers/goldensignals4.json b/grafana/containers/goldensignals4.json new file mode 100644 index 00000000..eef99ffe --- /dev/null +++ b/grafana/containers/goldensignals4.json @@ -0,0 +1,531 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "id": 7, + "iteration": 1594346948355, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 5, + "gridPos": { + "h": 7, + "w": 11, + "x": 0, + "y": 0 + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_connection_stats_total{service=\"[[service_name]]\"}*100/ccp_connection_stats_max_connections{service=\"[[service_name]]\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "connections", + "refId": "C" + }, + { + "expr": "ccp_pvc_used{service=\"[[service_name]]\", mount=\"/pgdata\"}*100/ccp_pvc_size{service=\"[[service_name]]\",mount=\"/pgdata\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "data disk", + "refId": "A" + }, + { + "expr": "ccp_pvc_used{service=\"[[service_name]]\", mount=\"/backrestrepo\"}*100/ccp_pvc_size{service=\"[[service_name]]\",mount=\"/backrestrepo\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "backup disk", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Saturation (pct used)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "percent", + "label": null, + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "fill": 5, + "fillGradient": 5, + "gridPos": { + "h": 7, + "w": 11, + "x": 11, + "y": 0 + }, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(ccp_stat_database_xact_commit{service=\"[[service_name]]\"}[1m])) + sum(irate(ccp_stat_database_xact_rollback{service=\"[[service_name]]\"}[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Transactions per minute", + "refId": "A" + }, + { + "expr": "sum(irate(ccp_query_count{service=\"[[service_name]]\"}[1m])) + sum(irate(ccp_query_count{service=\"[[service_name]]\"}[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Queries per minute", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Traffic", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "description": "Errors", + "fill": 1, + "fillGradient": 5, + "gridPos": { + "h": 7, + "w": 11, + "x": 0, + "y": 7 + }, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(ccp_stat_database_xact_rollback{service=\"[[service_name]]\"}[1m]))", + "format": "time_series", + "hide": true, + "intervalFactor": 1, + "legendFormat": "Rollbacks", + "refId": "A" + }, + { + "expr": "sum(irate(ccp_stat_database_deadlocks{service=\"[[service_name]]\"}[1m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "Deadlock ", + "refId": "D" + }, + { + "expr": "sum(irate(ccp_stat_database_conflicts{service=\"[[service_name]]\"}[1m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "Conflicts", + "refId": "B" + }, + { + "expr": "pg_exporter_last_scrape_error{service=\"[[service_name]]\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "scrape error", + "refId": "C" + }, + { + "expr": "clamp_max(ccp_archive_command_status_seconds_since_last_fail{service=\"[[service_name]]\"},1)", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "archive error", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": "", + "logBase": 1, + "max": "512", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 5, + "gridPos": { + "h": 7, + "w": 11, + "x": 11, + "y": 7 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + {} + ], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_connection_stats_max_query_time{service_name=\"[[service_name]]\"}", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "Max - ({{dbname}})", + "refId": "A" + }, + { + "expr": "ccp_query_avg_latency{service=\"[[service_name]]\"}", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "Avg - ({{dbname}})", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 19, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "text": "pvcmetrics4", + "value": "pvcmetrics4" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(service)", + "hide": 0, + "includeAll": false, + "label": "service_name", + "multi": false, + "name": "service_name", + "options": [], + "query": "label_values(service)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Golden Signals 4", + "uid": "pRyvrRgGz", + "version": 49 +} diff --git a/grafana/containers/pgbackrest.json b/grafana/containers/pgbackrest.json new file mode 100644 index 00000000..94014491 --- /dev/null +++ b/grafana/containers/pgbackrest.json @@ -0,0 +1,304 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "iteration": 1590372766212, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Full", + "refId": "A" + }, + { + "expr": "ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}", + "legendFormat": "Diff", + "refId": "B" + }, + { + "expr": "ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}", + "legendFormat": "Incr", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Time Since Last Completed Backup", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_backrest_last_runtime_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\",backup_type=\"full\"}", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "Full", + "refId": "A" + }, + { + "expr": "ccp_backrest_last_runtime_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\",backup_type=\"diff\"}", + "legendFormat": "Diff", + "refId": "B" + }, + { + "expr": "ccp_backrest_last_runtime_backup_runtime_seconds{pg_cluster=\"[[cluster]]\",role=\"master\", backup_type=\"incr\"}", + "legendFormat": "Incr", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Backup Runtimes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "15m", + "schemaVersion": 19, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "tags": [], + "text": "psql: hac", + "value": "psql: hac" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(pg_cluster)", + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "pgBackRest", + "uid": "pgbackrest", + "version": 10 +} +} diff --git a/grafana/containers/pod_details.json b/grafana/containers/pod_details.json new file mode 100644 index 00000000..08eb8f67 --- /dev/null +++ b/grafana/containers/pod_details.json @@ -0,0 +1,854 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "iteration": 1596222314867, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + { + "title": "Filesystem Details", + "url": "/d/g8iVvnHmz/filesystem-details?$__all_variables" + } + ], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(ccp_container_data_disk_total_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_container_data_disk_available_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_container_data_disk_total_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{mount_point}} ", + "refId": "A" + }, + { + "expr": "(ccp_container_data_disk_total_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_container_data_disk_free_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_container_data_disk_total_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{mount_point}} - Inodes", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 0 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + { + "title": "Filesystem Details", + "url": "/d/g8iVvnHmz/filesystem-details?$__all_variables" + } + ], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(ccp_container_data_disk_sectors_read{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}[1m])*512", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{mount_point}} - Reads", + "refId": "A" + }, + { + "expr": "rate(ccp_container_data_disk_sectors_written{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}[1m])*512", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{mount_point}} - Writes ", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk Activity", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "Inactive anon": "super-light-purple", + "Limit": "red", + "Request": "green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_container_mem_limit{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Limit", + "refId": "A" + }, + { + "expr": "ccp_container_mem_request{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Request", + "refId": "B" + }, + { + "expr": "ccp_container_mem_cache{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Cached", + "refId": "C" + }, + { + "expr": "ccp_container_mem_dirty{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Dirty", + "refId": "D" + }, + { + "expr": "ccp_container_mem_shmem{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "shared mem", + "refId": "E" + }, + { + "expr": "ccp_container_mem_rss{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "RSS", + "refId": "F" + }, + { + "expr": "ccp_container_mem_mapped_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Mapped file", + "refId": "G" + }, + { + "expr": "ccp_container_mem_active_anon{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Active anon", + "refId": "H" + }, + { + "expr": "ccp_container_mem_inactive_anon{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Inactive anon", + "refId": "I" + }, + { + "expr": "ccp_container_mem_active_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Active file", + "refId": "J" + }, + { + "expr": "ccp_container_mem_inactive_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Inactive file", + "refId": "K" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "% Throttled": "dark-orange", + "% Used": "blue" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 6 + }, + "hiddenSeries": false, + "id": 11, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Process count", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(((rate(ccp_container_cpuacct_usage{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m]))/1000)*100)/((ccp_container_cpucfs_quota_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}/ccp_container_cpucfs_period_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"})*1000*1000)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "% Used", + "refId": "A" + }, + { + "expr": "rate(ccp_container_cpustat_nr_throttled{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*100/rate(ccp_container_cpustat_nr_periods{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "% Throttled", + "refId": "B" + }, + { + "expr": "ccp_container_process_count{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Process count", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Stats", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": "110", + "min": "0", + "show": true + }, + { + "format": "short", + "label": "Process count", + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 12 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(ccp_container_network_rx_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\", interface!=\"tunl0\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{interface}} - rx bytes", + "refId": "A" + }, + { + "expr": "rate(ccp_container_network_tx_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\", interface!=\"tunl0\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{interface}} - tx bytes", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "CPU limit": "red", + "CPU request": "blue", + "Memory limit": "dark-red", + "Memory request": "dark-green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 12 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "CPU request", + "yaxis": 2 + }, + { + "alias": "CPU limit", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_container_cpu_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "CPU limit", + "refId": "A" + }, + { + "expr": "ccp_container_cpu_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "CPU request", + "refId": "B" + }, + { + "expr": "ccp_container_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Memory limit", + "refId": "C" + }, + { + "expr": "ccp_container_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Memory request", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Container resources", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "Memory", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": "CPU (millicores)", + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "text": "postgres-operations:democluster5", + "value": "postgres-operations:democluster5" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(pg_cluster)", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "tags": [], + "text": "democluster5-796c668c4d-56bm2", + "value": "democluster5-796c668c4d-56bm2" + }, + "datasource": "PROMETHEUS", + "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "pod", + "multi": false, + "name": "pod", + "options": [ + { + "selected": true, + "text": "democluster5-796c668c4d-56bm2", + "value": "democluster5-796c668c4d-56bm2" + } + ], + "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", + "refresh": 0, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "2020-07-31T17:10:44.108Z", + "to": "2020-07-31T17:29:07.975Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + " 30s", + " 1m", + "5m", + "15m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "POD Details", + "uid": "4t6SO2Fik", + "variables": { + "list": [] + }, + "version": 13 +} +} diff --git a/grafana/containers/postgresql_details.json b/grafana/containers/postgresql_details.json new file mode 100644 index 00000000..1fe4b8ed --- /dev/null +++ b/grafana/containers/postgresql_details.json @@ -0,0 +1,1706 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "iteration": 1589083303594, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": true, + "colorPrefix": false, + "colorValue": false, + "colors": [ + "#56A64B", + "#FF9830", + "#E02F44" + ], + "format": "dtdurations", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 27, + "interval": null, + "links": [ + { + "title": "pgBackRest", + "url": "/dashboard/db/pgBackRest" + } + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "Time Since Last Backup:", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "ccp_backrest_last_incr_backup_time_since_completion_seconds{service=\"[[cluster]]\"} < ccp_backrest_last_diff_backup_time_since_completion_seconds{service=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{service=\"[[cluster]]\"} < ccp_backrest_last_full_backup_time_since_completion_seconds{service=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{service=\"[[cluster]]\"} ", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "86400,172800", + "timeFrom": null, + "timeShift": null, + "title": "[[cluster]] : Backup Status", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "PROMETHEUS", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 2 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(pg_stat_activity_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"active\"})*100/sum(pg_settings_max_connections{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "", + "metric": "pg_stat_activity_count", + "refId": "A", + "step": 10 + } + ], + "thresholds": "70,90", + "title": "Active Connections", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "PROMETHEUS", + "format": "percentunit", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 2 + }, + "id": 2, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(pg_stat_activity_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})/sum(pg_settings_max_connections{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "refId": "B" + } + ], + "thresholds": "10,30", + "title": "Idle In Transaction", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "PROMETHEUS", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 8, + "y": 2 + }, + "id": 3, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(pg_stat_activity_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})*100/sum(pg_settings_max_connections{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "metric": "pg_stat_activity_count", + "refId": "A", + "step": 10 + } + ], + "thresholds": "60,80", + "title": "Idle", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 2 + }, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + { + "targetBlank": true, + "title": "CRUD_Details", + "url": "/dashboard/db/crud_details?$__all_variables" + } + ], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(pg_stat_database_xact_commit{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m])) + sum(irate(pg_stat_database_xact_rollback{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "TPS", + "metric": "pg_stat_database_tup_fetched", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TPS - [[pod]]-[[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 2 + }, + "id": 26, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + { + "targetBlank": true, + "title": "CRUD_Details", + "url": "/dashboard/db/crud_details?$__all_variables" + } + ], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "idle", + "metric": "pg_stat_database_tup_fetched", + "refId": "A", + "step": 2 + }, + { + "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Idle in txn", + "refId": "B" + }, + { + "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"active\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "active", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Connections - [[pod]]-[[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})/(1024*1024)", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Total : [[cluster]]-[[pod]]", + "refId": "B" + }, + { + "expr": "ccp_database_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}/(1024*1024)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{dbname}} ({{pod}})", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "database size - [[pod]]-[[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decmbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 30, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_wal_activity_total_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}/(1024*1024)", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "WAL size MB - [[cluster]]-[[pod]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decmbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + { + "targetBlank": true, + "title": "CRUD_Details", + "url": "/dashboard/db/crud_details?$__all_variables" + } + ], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(pg_stat_database_tup_fetched{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Fetched", + "metric": "pg_stat_database_tup_fetched", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(irate(pg_stat_database_tup_inserted{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Inserted", + "metric": "pg_stat_database_tup_inserted", + "refId": "B", + "step": 2 + }, + { + "expr": "sum(irate(pg_stat_database_tup_updated{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Updated", + "metric": "pg_stat_database_tup_updated", + "refId": "C", + "step": 2 + }, + { + "expr": "sum(irate(pg_stat_database_tup_deleted{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Deleted", + "metric": "pg_stat_database_tup_deleted", + "refId": "D", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Row activity - [[pod]]- [[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 29, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "ccp_replication_lag_size_bytes{pg_cluster=\"[[cluster]]\", service!~\".*replica\"}", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "Replica ({{replica}}) lag bytes", + "refId": "B" + }, + { + "expr": "ccp_replication_lag_replay_time{pg_cluster=\"[[cluster]]\", service=~\".*replica\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Replica ({{ip}}) lag time", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Replication Status - [[cluster]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "Lag in bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "dthms", + "label": "Lag time (hh:mm:ss)", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ], + "yaxis": { + "align": true, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 15, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(pg_stat_database_deadlocks{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "Conflicts", + "metric": "pg_stat_database_conflicts", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(rate(pg_stat_database_conflicts{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "DeadLocks", + "metric": "pg_stat_database_deadlocks", + "refId": "B", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Conflicts/DeadLocks - [[pod]] - [[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 28, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "pg_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", datid!=\"0\", datname!~\"template0\", datname!~\"template1\"}*100/(pg_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", datname!~\"template0\", datname!~\"template1\"} + pg_stat_database_blks_read{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname!~\"template0\", datname!~\"template1\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{datname}} - ({{pod}})", + "refId": "A" + }, + { + "expr": "sum(pg_stat_database_blks_hit{pg_cluster=\"[[cluster]]\"}*100/sum(pg_stat_database_blks_hit{pg_cluster=\"[[cluster]]\"} + pg_stat_database_blks_read{pg_cluster=\"[[cluster]]\"})", + "format": "time_series", + "hide": true, + "intervalFactor": 2, + "legendFormat": "Overall", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cache Hit Ratio - [[pod]]-[[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(ccp_stat_bgwriter_buffers_alloc{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Allocated", + "metric": "pg_stat_bgwriter_buffers_alloc", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(ccp_stat_bgwriter_buffers_backend{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Backend", + "metric": "pg_stat_bgwriter_buffers_backend", + "refId": "B", + "step": 2 + }, + { + "expr": "sum(ccp_stat_bgwriter_buffers_backend_fsync{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "FSync", + "metric": "pg_stat_bgwriter_buffers_backend_fsync", + "refId": "C", + "step": 2 + }, + { + "expr": "sum(ccp_stat_bgwriter_buffers_checkpoint{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "CheckPoint", + "metric": "pg_stat_bgwriter_buffers_checkpoint", + "refId": "D", + "step": 2 + }, + { + "expr": "sum(ccp_stat_bgwriter_buffers_clean{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Clean", + "metric": "pg_stat_bgwriter_buffers_clean", + "refId": "E", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Buffers - [[pod]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(pg_stat_database_xact_commit{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Commit", + "metric": "pg_stat_database_xact_commit", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(irate(pg_stat_database_xact_rollback{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Rollback", + "refId": "B", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Commit & Rollback", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 17, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (mode) (pg_locks_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"accessexclusivelock\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mode}}", + "refId": "A", + "step": 2 + }, + { + "expr": "sum by (mode) (pg_locks_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"exclusivelock\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mode}}", + "refId": "C", + "step": 2 + }, + { + "expr": "sum by (mode) (pg_locks_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"rowexclusivelock\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mode}}", + "refId": "D", + "step": 2 + }, + { + "expr": "sum by (mode) (pg_locks_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"sharerowexclusivelock\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mode}}", + "refId": "G", + "step": 2 + }, + { + "expr": "sum by (mode) (pg_locks_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"shareupdateexclusivelock\"})", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{mode}}", + "refId": "H", + "step": 2 + }, + { + "expr": "sum by (mode) (pg_locks_count{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"accesssharelock\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{mode}}", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Locks - [[pod]] - [[datname]]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 19, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allFormat": "glob", + "allValue": null, + "current": { + "text": "lala", + "value": [ + "lala" + ] + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": true, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allFormat": "glob", + "allValue": ".*", + "current": { + "text": "lala-6cdc4b6f9c-8ggln", + "value": [ + "lala-6cdc4b6f9c-8ggln" + ] + }, + "datasource": "PROMETHEUS", + "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", + "hide": 0, + "includeAll": true, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allFormat": "glob", + "allValue": ".*", + "current": { + "text": "userdb", + "value": [ + "userdb" + ] + }, + "datasource": "PROMETHEUS", + "definition": "label_values({pg_cluster=\"[[cluster]]\" ,pod=\"[[pod]]\"},dbname)", + "hide": 0, + "includeAll": true, + "label": "Database", + "multi": true, + "name": "datname", + "options": [], + "query": "label_values({pg_cluster=\"[[cluster]]\" ,pod=\"[[pod]]\"},dbname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "PostgreSQLDetails", + "uid": "3NfGQ_6Wk", + "version": 12 + } +} diff --git a/grafana/containers/postgresql_overview.json b/grafana/containers/postgresql_overview.json new file mode 100644 index 00000000..82c454fa --- /dev/null +++ b/grafana/containers/postgresql_overview.json @@ -0,0 +1,205 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "overwrite": true, + "folderId": 0, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "iteration": 1559061209956, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": true, + "colorPostfix": false, + "colorPrefix": false, + "colorValue": false, + "colors": [ + "#bf1b00", + "#eab839", + "#56A64B" + ], + "datasource": "PROMETHEUS", + "format": "short", + "gauge": { + "maxValue": 2, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false + }, + "id": 1, + "interval": null, + "links": [ + { + "dashboard": "PostgreSQLDetails", + "includeVars": true, + "keepTime": true, + "targetBlank": true, + "title": "PostgreSQLDetails", + "type": "dashboard" + } + ], + "mappingType": 2, + "mappingTypes": [ + { + "$hashKey": "object:295", + "name": "value to text", + "value": 1 + }, + { + "$hashKey": "object:296", + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 3, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "0", + "text": "DOWN", + "to": "99" + }, + { + "from": "100", + "text": "Standalone Cluster", + "to": "199" + }, + { + "from": "200", + "text": "HA CLUSTER", + "to": "1000" + } + ], + "repeat": "cluster", + "repeatDirection": "h", + "scopedVars": { + "cluster": { + "selected": false, + "text": "resizetest", + "value": "resizetest" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "$hashKey": "object:243", + "expr": "sum(pg_up{pg_cluster=\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=\"$cluster\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{cluster}}", + "metric": "up", + "refId": "A", + "step": 2 + } + ], + "thresholds": "10,100", + "title": "$cluster - Overview", + "transparent": false, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [], + "valueName": "current", + "gridPos": { + "x": 0, + "y": 0, + "h": 4, + "w": 7 + } + } + ], + "refresh": "30s", + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(pg_cluster)", + "hide": 2, + "includeAll": true, + "label": "cluster", + "multi": true, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "PostgreSQL Overview", + "Name": "PostgreSQL Overview", + "uid": "pgoverview" + } +} diff --git a/grafana/containers/prometheus_alerts.json b/grafana/containers/prometheus_alerts.json new file mode 100644 index 00000000..5910872b --- /dev/null +++ b/grafana/containers/prometheus_alerts.json @@ -0,0 +1,716 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "panels": [ + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "links": [], + "options": {}, + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": "row", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "mappingType": 1, + "pattern": "severity_num", + "thresholds": [ + "200", + "300" + ], + "type": "string", + "unit": "none" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "__name__", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "alertstate", + "thresholds": [], + "type": "hidden", + "unit": "short", + "valueMaps": [] + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "alert_value", + "thresholds": [], + "type": "string", + "unit": "none" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "crunchy_collect", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "crunchy_pgha_scope", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "job", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pg_cluster_id", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pgouser", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pod_template_hash", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "severity_num", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "vendor", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "kubernetes_pod_name", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "workflowid", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "name", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "service", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pgo_pg_database", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "targets": [ + { + "expr": "ALERTS{alertstate=\"firing\"}", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 4, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "title": "Active Alerts", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 3, + "links": [], + "options": {}, + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": "row", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "mappingType": 1, + "pattern": "severity_num", + "thresholds": [ + "200", + "300" + ], + "type": "string", + "unit": "none" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "__name__", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "alertstate", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "alert_value", + "thresholds": [], + "type": "string", + "unit": "none" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "crunchy_collect", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "crunchy_pgha_scope", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "job", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "kubernetes_pod_name", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "name", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pg_cluster_id", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pgo_pg_database", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pod_template_hash", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "vendor", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "workflowid", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "pgouser", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "targets": [ + { + "expr": "ALERTS{alertstate=\"firing\"}", + "format": "table", + "instant": false, + "interval": "", + "intervalFactor": 4, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": "1w", + "title": "Alert History (1 week)", + "transform": "table", + "type": "table" + } + ], + "refresh": "5m", + "schemaVersion": 21, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Prometheus Alerts", + "uid": "", + "version": 2 +} +} diff --git a/prometheus/crunchy-prometheus.yml.containers b/prometheus/crunchy-prometheus.yml.containers new file mode 100644 index 00000000..b6538943 --- /dev/null +++ b/prometheus/crunchy-prometheus.yml.containers @@ -0,0 +1,66 @@ +--- +global: + scrape_interval: 15s + scrape_timeout: 15s + evaluation_interval: 5s + +scrape_configs: +- job_name: 'crunchy-collect' + kubernetes_sd_configs: + - role: pod + + relabel_configs: + - source_labels: [__meta_kubernetes_pod_label_crunchy_collect] + action: keep + regex: true + - source_labels: [__meta_kubernetes_pod_container_port_number] + action: drop + regex: 5432 + - source_labels: [__meta_kubernetes_pod_container_port_number] + action: drop + regex: 10000 + - source_labels: [__meta_kubernetes_pod_container_port_number] + action: drop + regex: 8009 + - source_labels: [__meta_kubernetes_pod_container_port_number] + action: drop + regex: 2022 + - source_labels: [__meta_kubernetes_namespace] + action: replace + target_label: kubernetes_namespace + - source_labels: [__meta_kubernetes_pod_name] + target_label: pod + - source_labels: [__meta_kubernetes_pod_name] + regex: (^[^-]*).* + target_label: instance + replacement: '$1' + - source_labels: [__meta_kubernetes_namespace,instance] + target_label: pg_cluster + separator: ':' + replacement: '$1$2' + - source_labels: [__meta_kubernetes_pod_ip] + target_label: ip + replacement: '$1' + - source_labels: [__meta_kubernetes_pod_label_deployment_name] + target_label: deployment + replacement: '$1' + - source_labels: [__meta_kubernetes_pod_label_service_name] + target_label: service + replacement: '$1' + - source_labels: [__meta_kubernetes_pod_label_role] + target_label: role + replacement: '$1' + - source_labels: [dbname] + target_label: dbname + replacement: '$1' + - source_labels: [relname] + target_label: relname + replacement: '$1' + - source_labels: [schemaname] + target_label: schemaname + replacement: '$1' + - target_label: exp_type + replacement: 'pg' + +rule_files: + - /conf/crunchy-alert-rules.yml From cc1957a449a07dccac6cfbe9225000d45a8fd1cd Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Thu, 6 Aug 2020 09:26:13 -0500 Subject: [PATCH 2/9] same dashboards. But exported from Grafana GUI --- grafana/containers/crud_details.json | 615 ++++++++++---------- grafana/containers/goldensignals4.json | 48 +- grafana/containers/pgbackrest.json | 29 +- grafana/containers/pod_details.json | 18 +- grafana/containers/postgresql_details.json | 59 +- grafana/containers/postgresql_overview.json | 405 ++++++------- grafana/containers/prometheus_alerts.json | 56 +- 7 files changed, 660 insertions(+), 570 deletions(-) mode change 100644 => 100755 grafana/containers/crud_details.json mode change 100644 => 100755 grafana/containers/goldensignals4.json mode change 100644 => 100755 grafana/containers/pgbackrest.json mode change 100644 => 100755 grafana/containers/pod_details.json mode change 100644 => 100755 grafana/containers/postgresql_details.json mode change 100644 => 100755 grafana/containers/postgresql_overview.json mode change 100644 => 100755 grafana/containers/prometheus_alerts.json diff --git a/grafana/containers/crud_details.json b/grafana/containers/crud_details.json old mode 100644 new mode 100755 index f0ee86db..13d75380 --- a/grafana/containers/crud_details.json +++ b/grafana/containers/crud_details.json @@ -1,306 +1,321 @@ { - "dashboard": { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "overwrite": true, - "folderId": 0, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1555134244785, - "links": [ + "annotations": { + "list": [ { - "icon": "external link", - "includeVars": true, - "tags": [], - "type": "dashboards" + "$$hashKey": "object:111", + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" } - ], - "panels": [ + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 3, + "iteration": 1596723524049, + "links": [ + { + "icon": "external link", + "includeVars": true, + "tags": [], + "type": "dashboards" + } + ], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PROMETHEUS", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 0 + }, + "height": "480", + "hiddenSeries": false, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "inserts - [[dbname]].[[schemaname]].[[tablename]]", + "refId": "A", + "step": 60 + }, + { + "expr": "sum(rate(ccp_stat_user_tables_n_tup_upd{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Updates - [[dbname]].[[schemaname]].[[tablename]]", + "refId": "B", + "step": 60 + }, + { + "expr": "sum(rate(ccp_stat_user_tables_n_tup_del{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Deletes - [[dbname]].[[schemaname]].[[tablename]]", + "refId": "C", + "step": 60 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CRUD", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "30s", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "dcsi:dcsi", + "value": "dcsi:dcsi" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": false, + "index": -1, + "label": null, + "multi": false, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "fill": 1, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 0 - }, - "height": "480", - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "minSpan": 10, - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "inserts - [[dbname]].[[schemaname]].[[tablename]]", - "refId": "A", - "step": 60 - }, - { - "expr": "sum(rate(ccp_stat_user_tables_n_tup_upd{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Updates - [[dbname]].[[schemaname]].[[tablename]]", - "refId": "B", - "step": 60 - }, - { - "expr": "sum(rate(ccp_stat_user_tables_n_tup_del{pg_cluster=\"[[cluster]]\", instance=~\"[[pod]]\", dbname =~ \"[[dbname]]\", schemaname =~ \"[[schemaname]]\", relname=~\"[[tablename]]\"}[60s]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Deletes - [[dbname]].[[schemaname]].[[tablename]]", - "refId": "C", - "step": 60 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CRUD", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "allValue": ".*", + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": true, + "index": -1, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": "label_values({pg_cluster=\"[[cluster]]\"},instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", + "hide": 0, + "includeAll": true, + "index": -1, + "label": "dbname", + "multi": true, + "name": "dbname", + "options": [], + "query": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": true, + "index": -1, + "label": "schemaname", + "multi": true, + "name": "schemaname", + "options": [], + "query": "label_values(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\",dbname=\"[[dbname]]\"},schemaname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "", + "hide": 0, + "includeAll": true, + "index": -1, + "label": null, + "multi": true, + "name": "tablename", + "options": [], + "query": "label_values(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\",instance=\"[[pod]]\",dbname=\"[[dbname]]\",schemaname=\"[[schemaname]]\"},relname)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" ], - "refresh": "30s", - "schemaVersion": 16, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": true, - "text": "metrics-1", - "value": "metrics-1" - }, - "datasource": "PROMETHEUS", - "definition": "", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "cluster", - "options": [], - "query": "label_values(pg_cluster)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "selected": true, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", - "definition": "", - "hide": 0, - "includeAll": true, - "label": "pod", - "multi": true, - "name": "pod", - "options": [], - "query": "label_values({pg_cluster=\"[[cluster]]\"},instance)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", - "hide": 0, - "includeAll": true, - "label": "dbname", - "multi": true, - "name": "dbname", - "options": [], - "query": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", - "definition": "", - "hide": 0, - "includeAll": true, - "label": "schemaname", - "multi": true, - "name": "schemaname", - "options": [], - "query": "label_values(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\",dbname=\"[[dbname]]\"},schemaname)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", - "definition": "", - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "tablename", - "options": [], - "query": "label_values(ccp_stat_user_tables_n_tup_ins{pg_cluster=\"[[cluster]]\",instance=\"[[pod]]\",dbname=\"[[dbname]]\",schemaname=\"[[schemaname]]\"},relname)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "CRUD_Details", - "uid": "cruddetails", - "Name": "CRUD_Details" - } -} + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "CRUD_Details", + "uid": "cruddetails", + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file diff --git a/grafana/containers/goldensignals4.json b/grafana/containers/goldensignals4.json old mode 100644 new mode 100755 index eef99ffe..dc486987 --- a/grafana/containers/goldensignals4.json +++ b/grafana/containers/goldensignals4.json @@ -2,6 +2,7 @@ "annotations": { "list": [ { + "$$hashKey": "object:143", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -12,11 +13,11 @@ } ] }, - "editable": false, + "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 7, - "iteration": 1594346948355, + "id": 6, + "iteration": 1596723533096, "links": [ { "asDropdown": false, @@ -35,6 +36,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": null, "fill": 1, "fillGradient": 5, "gridPos": { @@ -43,6 +45,7 @@ "x": 0, "y": 0 }, + "hiddenSeries": false, "id": 6, "legend": { "alignAsTable": false, @@ -141,6 +144,7 @@ "cacheTimeout": null, "dashLength": 10, "dashes": false, + "datasource": null, "fill": 5, "fillGradient": 5, "gridPos": { @@ -149,6 +153,7 @@ "x": 11, "y": 0 }, + "hiddenSeries": false, "id": 18, "legend": { "avg": false, @@ -188,6 +193,14 @@ "intervalFactor": 1, "legendFormat": "Queries per minute", "refId": "B" + }, + { + "expr": "ccp_connection_stats_active{service=\"[[service_name]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "Active connections", + "refId": "C" } ], "thresholds": [], @@ -236,6 +249,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": null, "description": "Errors", "fill": 1, "fillGradient": 5, @@ -245,6 +259,7 @@ "x": 0, "y": 7 }, + "hiddenSeries": false, "id": 4, "legend": { "alignAsTable": false, @@ -361,6 +376,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": null, "fill": 1, "fillGradient": 5, "gridPos": { @@ -369,6 +385,7 @@ "x": 11, "y": 7 }, + "hiddenSeries": false, "id": 10, "legend": { "alignAsTable": false, @@ -400,19 +417,21 @@ "steppedLine": false, "targets": [ { - "expr": "ccp_connection_stats_max_query_time{service_name=\"[[service_name]]\"}", + "expr": "ccp_connection_stats_max_query_time{service=\"[[service_name]]\"}", "format": "time_series", "hide": false, "instant": false, + "interval": "", "intervalFactor": 1, - "legendFormat": "Max - ({{dbname}})", + "legendFormat": "Max", "refId": "A" }, { "expr": "ccp_query_avg_latency{service=\"[[service_name]]\"}", "format": "time_series", - "hide": false, + "hide": true, "instant": false, + "interval": "", "intervalFactor": 1, "legendFormat": "Avg - ({{dbname}})", "refId": "B" @@ -443,7 +462,7 @@ "label": null, "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true }, { @@ -462,7 +481,7 @@ } ], "refresh": "5s", - "schemaVersion": 19, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { @@ -470,14 +489,14 @@ { "allValue": null, "current": { - "selected": false, - "text": "pvcmetrics4", - "value": "pvcmetrics4" + "text": "dcsi", + "value": "dcsi" }, "datasource": "PROMETHEUS", "definition": "label_values(service)", "hide": 0, "includeAll": false, + "index": -1, "label": "service_name", "multi": false, "name": "service_name", @@ -527,5 +546,8 @@ "timezone": "browser", "title": "Golden Signals 4", "uid": "pRyvrRgGz", - "version": 49 -} + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file diff --git a/grafana/containers/pgbackrest.json b/grafana/containers/pgbackrest.json old mode 100644 new mode 100755 index 94014491..e974a17a --- a/grafana/containers/pgbackrest.json +++ b/grafana/containers/pgbackrest.json @@ -1,8 +1,8 @@ { - "dashboard": { "annotations": { "list": [ { + "$$hashKey": "object:183", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -13,11 +13,11 @@ } ] }, - "editable": false, + "editable": true, "gnetId": null, "graphTooltip": 0, - "id": null, - "iteration": 1590372766212, + "id": 4, + "iteration": 1596723551280, "links": [ { "asDropdown": false, @@ -36,6 +36,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": null, "fill": 1, "fillGradient": 0, "gridPos": { @@ -137,6 +138,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": null, "fill": 1, "fillGradient": 0, "gridPos": { @@ -238,7 +240,7 @@ } ], "refresh": "15m", - "schemaVersion": 19, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { @@ -246,15 +248,14 @@ { "allValue": null, "current": { - "selected": false, - "tags": [], - "text": "psql: hac", - "value": "psql: hac" + "text": "dcsi:dcsi", + "value": "dcsi:dcsi" }, "datasource": "PROMETHEUS", "definition": "label_values(pg_cluster)", "hide": 0, "includeAll": false, + "index": -1, "label": "cluster", "multi": false, "name": "cluster", @@ -273,7 +274,7 @@ ] }, "time": { - "from": "now-2d", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -299,6 +300,8 @@ "timezone": "", "title": "pgBackRest", "uid": "pgbackrest", - "version": 10 -} -} + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file diff --git a/grafana/containers/pod_details.json b/grafana/containers/pod_details.json old mode 100644 new mode 100755 index 08eb8f67..10cb06ef --- a/grafana/containers/pod_details.json +++ b/grafana/containers/pod_details.json @@ -1,8 +1,8 @@ { - "dashboard": { "annotations": { "list": [ { + "$$hashKey": "object:43", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -13,11 +13,11 @@ } ] }, - "editable": false, + "editable": true, "gnetId": null, "graphTooltip": 0, - "id": null, - "iteration": 1596222314867, + "id": 22, + "iteration": 1596723620872, "links": [], "panels": [ { @@ -759,7 +759,6 @@ { "allValue": null, "current": { - "selected": false, "text": "postgres-operations:democluster5", "value": "postgres-operations:democluster5" }, @@ -819,8 +818,8 @@ ] }, "time": { - "from": "2020-07-31T17:10:44.108Z", - "to": "2020-07-31T17:29:07.975Z" + "from": "now-30m", + "to": "now" }, "timepicker": { "refresh_intervals": [ @@ -849,6 +848,5 @@ "variables": { "list": [] }, - "version": 13 -} -} + "version": 1 +} \ No newline at end of file diff --git a/grafana/containers/postgresql_details.json b/grafana/containers/postgresql_details.json old mode 100644 new mode 100755 index 1fe4b8ed..1e477b8e --- a/grafana/containers/postgresql_details.json +++ b/grafana/containers/postgresql_details.json @@ -1,8 +1,8 @@ { - "dashboard": { "annotations": { "list": [ { + "$$hashKey": "object:48", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -13,11 +13,11 @@ } ] }, - "editable": false, + "editable": true, "gnetId": null, "graphTooltip": 0, - "id": null, - "iteration": 1589083303594, + "id": 2, + "iteration": 1596723467858, "links": [ { "asDropdown": false, @@ -41,6 +41,7 @@ "#FF9830", "#E02F44" ], + "datasource": null, "format": "dtdurations", "gauge": { "maxValue": 100, @@ -77,7 +78,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "Time Since Last Backup:", @@ -98,8 +98,9 @@ "tableColumn": "", "targets": [ { - "expr": "ccp_backrest_last_incr_backup_time_since_completion_seconds{service=\"[[cluster]]\"} < ccp_backrest_last_diff_backup_time_since_completion_seconds{service=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{service=\"[[cluster]]\"} < ccp_backrest_last_full_backup_time_since_completion_seconds{service=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{service=\"[[cluster]]\"} ", + "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} < ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} < ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}) ", "format": "time_series", + "interval": "", "intervalFactor": 1, "legendFormat": "", "refId": "A" @@ -161,7 +162,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -246,7 +246,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -327,7 +326,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -383,6 +381,7 @@ "x": 12, "y": 2 }, + "hiddenSeries": false, "id": 24, "legend": { "alignAsTable": true, @@ -483,6 +482,7 @@ "x": 18, "y": 2 }, + "hiddenSeries": false, "id": 26, "legend": { "alignAsTable": true, @@ -599,6 +599,7 @@ "x": 0, "y": 9 }, + "hiddenSeries": false, "id": 12, "legend": { "alignAsTable": true, @@ -698,6 +699,7 @@ "x": 12, "y": 9 }, + "hiddenSeries": false, "id": 30, "legend": { "alignAsTable": true, @@ -790,6 +792,7 @@ "x": 0, "y": 14 }, + "hiddenSeries": false, "id": 11, "legend": { "alignAsTable": true, @@ -919,6 +922,7 @@ "x": 12, "y": 14 }, + "hiddenSeries": false, "id": 29, "legend": { "alignAsTable": true, @@ -1022,6 +1026,7 @@ "x": 0, "y": 20 }, + "hiddenSeries": false, "id": 15, "legend": { "alignAsTable": true, @@ -1125,6 +1130,7 @@ "x": 12, "y": 20 }, + "hiddenSeries": false, "id": 28, "legend": { "alignAsTable": true, @@ -1224,6 +1230,7 @@ "x": 0, "y": 26 }, + "hiddenSeries": false, "id": 14, "legend": { "alignAsTable": true, @@ -1353,6 +1360,7 @@ "x": 12, "y": 26 }, + "hiddenSeries": false, "id": 13, "legend": { "alignAsTable": true, @@ -1578,7 +1586,7 @@ } ], "refresh": false, - "schemaVersion": 19, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { @@ -1587,15 +1595,16 @@ "allFormat": "glob", "allValue": null, "current": { - "text": "lala", + "text": "dcsi:dcsi", "value": [ - "lala" + "dcsi:dcsi" ] }, "datasource": "PROMETHEUS", "definition": "", "hide": 0, "includeAll": false, + "index": -1, "label": "cluster", "multi": true, "name": "cluster", @@ -1615,15 +1624,15 @@ "allFormat": "glob", "allValue": ".*", "current": { - "text": "lala-6cdc4b6f9c-8ggln", - "value": [ - "lala-6cdc4b6f9c-8ggln" - ] + "selected": false, + "text": "All", + "value": "$__all" }, "datasource": "PROMETHEUS", "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", "hide": 0, "includeAll": true, + "index": -1, "label": "pod", "multi": true, "name": "pod", @@ -1643,15 +1652,15 @@ "allFormat": "glob", "allValue": ".*", "current": { - "text": "userdb", - "value": [ - "userdb" - ] + "selected": false, + "text": "All", + "value": "$__all" }, "datasource": "PROMETHEUS", "definition": "label_values({pg_cluster=\"[[cluster]]\" ,pod=\"[[pod]]\"},dbname)", "hide": 0, "includeAll": true, + "index": -1, "label": "Database", "multi": true, "name": "datname", @@ -1670,7 +1679,7 @@ ] }, "time": { - "from": "now-15m", + "from": "now-5m", "to": "now" }, "timepicker": { @@ -1701,6 +1710,8 @@ "timezone": "browser", "title": "PostgreSQLDetails", "uid": "3NfGQ_6Wk", - "version": 12 - } -} + "variables": { + "list": [] + }, + "version": 2 +} \ No newline at end of file diff --git a/grafana/containers/postgresql_overview.json b/grafana/containers/postgresql_overview.json old mode 100644 new mode 100755 index 82c454fa..81b0ca6b --- a/grafana/containers/postgresql_overview.json +++ b/grafana/containers/postgresql_overview.json @@ -1,205 +1,210 @@ { - "dashboard": { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "overwrite": true, - "folderId": 0, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1559061209956, - "links": [], - "panels": [ + "annotations": { + "list": [ { - "cacheTimeout": null, - "colorBackground": true, - "colorPostfix": false, - "colorPrefix": false, - "colorValue": false, - "colors": [ - "#bf1b00", - "#eab839", - "#56A64B" - ], - "datasource": "PROMETHEUS", - "format": "short", - "gauge": { - "maxValue": 2, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "id": 1, - "interval": null, - "links": [ - { - "dashboard": "PostgreSQLDetails", - "includeVars": true, - "keepTime": true, - "targetBlank": true, - "title": "PostgreSQLDetails", - "type": "dashboard" - } - ], - "mappingType": 2, - "mappingTypes": [ - { - "$hashKey": "object:295", - "name": "value to text", - "value": 1 - }, - { - "$hashKey": "object:296", - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "maxPerRow": 3, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "0", - "text": "DOWN", - "to": "99" - }, - { - "from": "100", - "text": "Standalone Cluster", - "to": "199" - }, - { - "from": "200", - "text": "HA CLUSTER", - "to": "1000" - } - ], - "repeat": "cluster", - "repeatDirection": "h", - "scopedVars": { - "cluster": { - "selected": false, - "text": "resizetest", - "value": "resizetest" - } - }, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "$hashKey": "object:243", - "expr": "sum(pg_up{pg_cluster=\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=\"$cluster\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{cluster}}", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "thresholds": "10,100", - "title": "$cluster - Overview", - "transparent": false, - "type": "singlestat", - "valueFontSize": "70%", - "valueMaps": [], - "valueName": "current", - "gridPos": { - "x": 0, - "y": 0, - "h": 4, - "w": 7 + "$$hashKey": "object:40", + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 1, + "iteration": 1596723388434, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": true, + "colorPostfix": false, + "colorPrefix": false, + "colorValue": false, + "colors": [ + "#bf1b00", + "#eab839", + "#56A64B" + ], + "datasource": "PROMETHEUS", + "format": "short", + "gauge": { + "maxValue": 2, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "interval": null, + "links": [ + { + "targetBlank": true, + "title": "PostgreSQLDetails", + "url": "dashboard/db/postgresqldetails?$__url_time_range&$__all_variables" + } + ], + "mappingType": 2, + "mappingTypes": [ + { + "$$hashKey": "object:78", + "$hashKey": "object:295", + "name": "value to text", + "value": 1 + }, + { + "$$hashKey": "object:79", + "$hashKey": "object:296", + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 2, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "$$hashKey": "object:81", + "from": "0", + "text": "DOWN", + "to": "99" + }, + { + "$$hashKey": "object:82", + "from": "100", + "text": "Standalone Cluster", + "to": "199" + }, + { + "$$hashKey": "object:83", + "from": "200", + "text": "HA CLUSTER", + "to": "1000" } + ], + "repeat": "cluster", + "repeatDirection": "h", + "scopedVars": { + "cluster": { + "selected": false, + "text": "dcsi:dcsi", + "value": "dcsi:dcsi" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "$hashKey": "object:243", + "expr": "sum(pg_up{pg_cluster=\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=\"$cluster\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{cluster}}", + "metric": "up", + "refId": "A", + "step": 2 + } + ], + "thresholds": "10,100", + "title": "$cluster - Overview", + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [], + "valueName": "current" + } + ], + "refresh": "30s", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allFormat": "glob", + "allValue": null, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "PROMETHEUS", + "definition": "label_values(pg_cluster)", + "hide": 2, + "includeAll": true, + "index": -1, + "label": "cluster", + "multi": true, + "name": "cluster", + "options": [], + "query": "label_values(pg_cluster)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" ], - "refresh": "30s", - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", - "definition": "label_values(pg_cluster)", - "hide": 2, - "includeAll": true, - "label": "cluster", - "multi": true, - "name": "cluster", - "options": [], - "query": "label_values(pg_cluster)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "PostgreSQL Overview", - "Name": "PostgreSQL Overview", - "uid": "pgoverview" - } -} + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "PostgreSQL Overview", + "uid": "pgoverview", + "variables": { + "list": [] + }, + "version": 2 +} \ No newline at end of file diff --git a/grafana/containers/prometheus_alerts.json b/grafana/containers/prometheus_alerts.json old mode 100644 new mode 100755 index 5910872b..143dea46 --- a/grafana/containers/prometheus_alerts.json +++ b/grafana/containers/prometheus_alerts.json @@ -1,8 +1,8 @@ { - "dashboard": { "annotations": { "list": [ { + "$$hashKey": "object:212", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -16,7 +16,7 @@ "editable": false, "gnetId": null, "graphTooltip": 0, - "id": null, + "id": 5, "links": [ { "asDropdown": false, @@ -42,7 +42,6 @@ }, "id": 2, "links": [], - "options": {}, "pageSize": null, "scroll": true, "showHeader": true, @@ -53,6 +52,7 @@ "styles": [ { "alias": "Time", + "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "link": false, "pattern": "Time", @@ -60,6 +60,7 @@ }, { "alias": "", + "align": "auto", "colorMode": "row", "colors": [ "rgba(50, 172, 45, 0.97)", @@ -80,6 +81,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -96,6 +98,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -113,6 +116,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -129,6 +133,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -145,6 +150,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -161,6 +167,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -177,6 +184,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -193,6 +201,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -209,6 +218,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -225,6 +235,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -241,6 +252,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -257,6 +269,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -273,6 +286,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -289,6 +303,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -305,6 +320,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -321,6 +337,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -337,6 +354,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -380,7 +398,6 @@ }, "id": 3, "links": [], - "options": {}, "pageSize": null, "scroll": true, "showHeader": true, @@ -391,6 +408,7 @@ "styles": [ { "alias": "Time", + "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "link": false, "pattern": "Time", @@ -398,6 +416,7 @@ }, { "alias": "", + "align": "auto", "colorMode": "row", "colors": [ "rgba(50, 172, 45, 0.97)", @@ -418,6 +437,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -434,6 +454,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -450,6 +471,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -466,6 +488,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -482,6 +505,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -498,6 +522,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -514,6 +539,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -530,6 +556,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -546,6 +573,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -562,6 +590,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -578,6 +607,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -594,6 +624,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -610,6 +641,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -626,6 +658,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -642,6 +675,7 @@ }, { "alias": "", + "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", @@ -675,14 +709,14 @@ } ], "refresh": "5m", - "schemaVersion": 21, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-2d", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -710,7 +744,9 @@ }, "timezone": "", "title": "Prometheus Alerts", - "uid": "", - "version": 2 -} -} + "uid": "NzvdSiSMz", + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file From ac7b8f03029c21bd3f9da00e7d155e6baa5970a4 Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Thu, 6 Aug 2020 09:26:40 -0500 Subject: [PATCH 3/9] fix file permissions --- grafana/containers/crud_details.json | 0 grafana/containers/goldensignals4.json | 0 grafana/containers/pgbackrest.json | 0 grafana/containers/pod_details.json | 0 grafana/containers/postgresql_details.json | 0 grafana/containers/postgresql_overview.json | 0 grafana/containers/prometheus_alerts.json | 0 7 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 grafana/containers/crud_details.json mode change 100755 => 100644 grafana/containers/goldensignals4.json mode change 100755 => 100644 grafana/containers/pgbackrest.json mode change 100755 => 100644 grafana/containers/pod_details.json mode change 100755 => 100644 grafana/containers/postgresql_details.json mode change 100755 => 100644 grafana/containers/postgresql_overview.json mode change 100755 => 100644 grafana/containers/prometheus_alerts.json diff --git a/grafana/containers/crud_details.json b/grafana/containers/crud_details.json old mode 100755 new mode 100644 diff --git a/grafana/containers/goldensignals4.json b/grafana/containers/goldensignals4.json old mode 100755 new mode 100644 diff --git a/grafana/containers/pgbackrest.json b/grafana/containers/pgbackrest.json old mode 100755 new mode 100644 diff --git a/grafana/containers/pod_details.json b/grafana/containers/pod_details.json old mode 100755 new mode 100644 diff --git a/grafana/containers/postgresql_details.json b/grafana/containers/postgresql_details.json old mode 100755 new mode 100644 diff --git a/grafana/containers/postgresql_overview.json b/grafana/containers/postgresql_overview.json old mode 100755 new mode 100644 diff --git a/grafana/containers/prometheus_alerts.json b/grafana/containers/prometheus_alerts.json old mode 100755 new mode 100644 From 621ec7f3b9c66679b38c0ad1e334a3f66eb91015 Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Thu, 6 Aug 2020 10:33:32 -0500 Subject: [PATCH 4/9] add links and fix units on network panel --- grafana/containers/pod_details.json | 35 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/grafana/containers/pod_details.json b/grafana/containers/pod_details.json index 10cb06ef..2392a52c 100644 --- a/grafana/containers/pod_details.json +++ b/grafana/containers/pod_details.json @@ -17,8 +17,15 @@ "gnetId": null, "graphTooltip": 0, "id": 22, - "iteration": 1596723620872, - "links": [], + "iteration": 1596723620874, + "links": [ + { + "$$hashKey": "object:200", + "icon": "external link", + "tags": [], + "type": "dashboards" + } + ], "panels": [ { "aliasColors": {}, @@ -599,7 +606,8 @@ }, "yaxes": [ { - "format": "bytes", + "$$hashKey": "object:121", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -607,6 +615,7 @@ "show": true }, { + "$$hashKey": "object:122", "format": "short", "label": null, "logBase": 1, @@ -759,8 +768,9 @@ { "allValue": null, "current": { - "text": "postgres-operations:democluster5", - "value": "postgres-operations:democluster5" + "tags": [], + "text": "postgres-operations:democluster4", + "value": "postgres-operations:democluster4" }, "datasource": "PROMETHEUS", "definition": "label_values(pg_cluster)", @@ -785,9 +795,8 @@ { "allValue": null, "current": { - "tags": [], - "text": "democluster5-796c668c4d-56bm2", - "value": "democluster5-796c668c4d-56bm2" + "text": "democluster4-7875894786-kjm46", + "value": "democluster4-7875894786-kjm46" }, "datasource": "PROMETHEUS", "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", @@ -800,8 +809,8 @@ "options": [ { "selected": true, - "text": "democluster5-796c668c4d-56bm2", - "value": "democluster5-796c668c4d-56bm2" + "text": "democluster4-7875894786-kjm46", + "value": "democluster4-7875894786-kjm46" } ], "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", @@ -818,7 +827,7 @@ ] }, "time": { - "from": "now-30m", + "from": "now-15m", "to": "now" }, "timepicker": { @@ -848,5 +857,5 @@ "variables": { "list": [] }, - "version": 1 -} \ No newline at end of file + "version": 2 +} From ab8c2c363c38154b5e76aa2dd5ecceb0f7ba5af7 Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Thu, 6 Aug 2020 11:19:07 -0500 Subject: [PATCH 5/9] rename the 4 golden signals dashboard and add disk info to the saturation panel --- ...> postgresql_service_health_overview.json} | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) rename grafana/containers/{goldensignals4.json => postgresql_service_health_overview.json} (94%) diff --git a/grafana/containers/goldensignals4.json b/grafana/containers/postgresql_service_health_overview.json similarity index 94% rename from grafana/containers/goldensignals4.json rename to grafana/containers/postgresql_service_health_overview.json index dc486987..d56052ab 100644 --- a/grafana/containers/goldensignals4.json +++ b/grafana/containers/postgresql_service_health_overview.json @@ -2,7 +2,7 @@ "annotations": { "list": [ { - "$$hashKey": "object:143", + "$$hashKey": "object:270", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -16,8 +16,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 6, - "iteration": 1596723533096, + "id": 23, + "iteration": 1596730628312, "links": [ { "asDropdown": false, @@ -77,23 +77,19 @@ { "expr": "ccp_connection_stats_total{service=\"[[service_name]]\"}*100/ccp_connection_stats_max_connections{service=\"[[service_name]]\"}", "format": "time_series", + "instant": false, + "interval": "", "intervalFactor": 1, "legendFormat": "connections", "refId": "C" }, { - "expr": "ccp_pvc_used{service=\"[[service_name]]\", mount=\"/pgdata\"}*100/ccp_pvc_size{service=\"[[service_name]]\",mount=\"/pgdata\"}", + "expr": "(ccp_container_data_disk_total_bytes{service=\"[[service_name]]\"}-ccp_container_data_disk_available_bytes{service=\"[[service_name]]\"})*100/ccp_container_data_disk_total_bytes{service=\"[[service_name]]\"}", "format": "time_series", + "interval": "", "intervalFactor": 1, - "legendFormat": "data disk", + "legendFormat": "Mount:{{mount_point}}", "refId": "A" - }, - { - "expr": "ccp_pvc_used{service=\"[[service_name]]\", mount=\"/backrestrepo\"}*100/ccp_pvc_size{service=\"[[service_name]]\",mount=\"/backrestrepo\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "backup disk", - "refId": "B" } ], "thresholds": [], @@ -489,8 +485,8 @@ { "allValue": null, "current": { - "text": "dcsi", - "value": "dcsi" + "text": "democluster4", + "value": "democluster4" }, "datasource": "PROMETHEUS", "definition": "label_values(service)", @@ -544,10 +540,10 @@ ] }, "timezone": "browser", - "title": "Golden Signals 4", + "title": "PostgreSQL Service Health Overview", "uid": "pRyvrRgGz", "variables": { "list": [] }, - "version": 1 -} \ No newline at end of file + "version": 5 +} From 4c13eb5534f575d51e54391c1b0f7940cf1a9bdf Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Fri, 7 Aug 2020 10:32:00 -0500 Subject: [PATCH 6/9] change metric names from ccp_container to ccp_nodemx, update dashboards with new names, remove invalid panel links --- exporter/postgres/queries_containers.yml | 38 +++--- grafana/containers/crud_details.json | 16 +-- grafana/containers/pgbackrest.json | 11 +- grafana/containers/pod_details.json | 86 ++++++------ grafana/containers/postgresql_details.json | 11 +- grafana/containers/postgresql_overview.json | 129 ++++++++++++++++-- .../postgresql_service_health_overview.json | 15 +- grafana/containers/prometheus_alerts.json | 5 +- 8 files changed, 200 insertions(+), 111 deletions(-) diff --git a/exporter/postgres/queries_containers.yml b/exporter/postgres/queries_containers.yml index 1dec761c..417b9a35 100644 --- a/exporter/postgres/queries_containers.yml +++ b/exporter/postgres/queries_containers.yml @@ -3,8 +3,8 @@ # Begin File: pod_metrics.yml # ### -ccp_container_network: - query: "SELECT interface,tx_bytes,tx_packets, rx_bytes,rx_packets from public.proc_network_stats()" +ccp_nodemx_network: + query: "SELECT interface,tx_bytes,tx_packets, rx_bytes,rx_packets from monitor.proc_network_stats()" metrics: - interface: usage: "LABEL" @@ -21,16 +21,16 @@ ccp_container_network: usage: "GAUGE" description: "Number of packets received" -ccp_container_process: - query: "SELECT public.cgroup_process_count() as count" +ccp_nodemx_process: + query: "SELECT monitor.cgroup_process_count() as count" metrics: - count: usage: "GAUGE" description: "Total number of processes on database container" -ccp_container_mem: - query: "SELECT public.kdapi_scalar_bigint('mem_request') as request, public.kdapi_scalar_bigint('mem_limit') as limit, (select val from cgroup_setof_kv('memory.stat') where key='cache') as cache, (select val from cgroup_setof_kv('memory.stat') where key='rss') as rss, (select val from cgroup_setof_kv('memory.stat') where key='shmem') as shmem, (select val from cgroup_setof_kv('memory.stat') where key='mapped_file') as mapped_file, (select val from cgroup_setof_kv('memory.stat') where key='dirty') as dirty, (select val from cgroup_setof_kv('memory.stat') where key='active_anon') as active_anon, (select val from cgroup_setof_kv('memory.stat') where key='inactive_anon') as inactive_anon, (select val from cgroup_setof_kv('memory.stat') where key='active_file') as active_file, (select val from cgroup_setof_kv('memory.stat') where key='inactive_file') as inactive_file" +ccp_nodemx_mem: + query: "SELECT monitor.kdapi_scalar_bigint('mem_request') as request, monitor.kdapi_scalar_bigint('mem_limit') as limit, (select val from monitor.cgroup_setof_kv('memory.stat') where key='cache') as cache, (select val from monitor.cgroup_setof_kv('memory.stat') where key='rss') as rss, (select val from monitor.cgroup_setof_kv('memory.stat') where key='shmem') as shmem, (select val from monitor.cgroup_setof_kv('memory.stat') where key='mapped_file') as mapped_file, (select val from monitor.cgroup_setof_kv('memory.stat') where key='dirty') as dirty, (select val from monitor.cgroup_setof_kv('memory.stat') where key='active_anon') as active_anon, (select val from monitor.cgroup_setof_kv('memory.stat') where key='inactive_anon') as inactive_anon, (select val from monitor.cgroup_setof_kv('memory.stat') where key='active_file') as active_file, (select val from monitor.cgroup_setof_kv('memory.stat') where key='inactive_file') as inactive_file" metrics: - request: usage: "GAUGE" @@ -70,8 +70,8 @@ ccp_container_mem: description: "Total bytes of file-backed memory on inactive LRU list" -ccp_container_cpu: - query: "SELECT public.kdapi_scalar_bigint('cpu_request') as request, public.kdapi_scalar_bigint('cpu_limit') as limit" +ccp_nodemx_cpu: + query: "SELECT monitor.kdapi_scalar_bigint('cpu_request') as request, monitor.kdapi_scalar_bigint('cpu_limit') as limit" metrics: - request: usage: "GAUGE" @@ -80,8 +80,8 @@ ccp_container_cpu: usage: "GAUGE" description: "CPU limit value in milli cores" -ccp_container_cpucfs: - query: "SELECT cgroup_scalar_bigint('cpu.cfs_period_us') as period_us, cgroup_scalar_bigint('cpu.cfs_quota_us') as quota_us" +ccp_nodemx_cpucfs: + query: "SELECT monitor.cgroup_scalar_bigint('cpu.cfs_period_us') as period_us, monitor.cgroup_scalar_bigint('cpu.cfs_quota_us') as quota_us" metrics: - period_us: usage: "GAUGE" @@ -90,15 +90,15 @@ ccp_container_cpucfs: usage: "GAUGE" description: "the length of a period (in microseconds)" -ccp_container_cpuacct: - query: "SELECT cgroup_scalar_bigint('cpuacct.usage') as usage" +ccp_nodemx_cpuacct: + query: "SELECT monitor.cgroup_scalar_bigint('cpuacct.usage') as usage" metrics: - usage: usage: "GAUGE" description: "CPU usage in nanoseconds" -ccp_container_cpustat: - query: "select (SELECT val as nr_periods FROM cgroup_setof_kv('cpu.stat') where key='nr_periods'), (SELECT val as nr_throttled FROM cgroup_setof_kv('cpu.stat') where key='nr_throttled'), (SELECT val as throttled_time FROM cgroup_setof_kv('cpu.stat') where key='throttled_time')" +ccp_nodemx_cpustat: + query: "select (SELECT val as nr_periods FROM monitor.cgroup_setof_kv('cpu.stat') where key='nr_periods'), (SELECT val as nr_throttled FROM monitor.cgroup_setof_kv('cpu.stat') where key='nr_throttled'), (SELECT val as throttled_time FROM monitor.cgroup_setof_kv('cpu.stat') where key='throttled_time')" metrics: - nr_threads: usage: "GAUGE" @@ -108,14 +108,14 @@ ccp_container_cpustat: description: "number of runnable periods in which the application used its entire quota and was throttled" - throttled_time: usage: "GAUGE" - description: "sum total amount of time individual threads within the cgroup were throttled" + description: "sum total amount of time individual threads within the monitor.cgroup were throttled" -ccp_container_data_disk: +ccp_nodemx_data_disk: query: "SELECT mount_point, fs_type,reads_completed_successfully as reads, sectors_read, writes_completed as writes,sectors_written, total_bytes,available_bytes,total_file_nodes,free_file_nodes - FROM proc_mountinfo() m - JOIN proc_diskstats() d USING (major_number, minor_number) - JOIN fsinfo(m.mount_point) f USING (major_number, minor_number) + FROM monitor.proc_mountinfo() m + JOIN monitor.proc_diskstats() d USING (major_number, minor_number) + JOIN monitor.fsinfo(m.mount_point) f USING (major_number, minor_number) WHERE m.mount_point like '/pg%' or m.mount_point like '/tablespace%'" metrics: - mount_point: diff --git a/grafana/containers/crud_details.json b/grafana/containers/crud_details.json index 13d75380..23d79f4d 100644 --- a/grafana/containers/crud_details.json +++ b/grafana/containers/crud_details.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:111", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -17,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 3, - "iteration": 1596723524049, + "iteration": 1596814000168, "links": [ { "icon": "external link", @@ -147,9 +146,8 @@ { "allValue": null, "current": { - "selected": true, - "text": "dcsi:dcsi", - "value": "dcsi:dcsi" + "text": "postgres-operations:democluster1", + "value": "postgres-operations:democluster1" }, "datasource": "PROMETHEUS", "definition": "", @@ -180,7 +178,7 @@ ] }, "datasource": "PROMETHEUS", - "definition": "", + "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", "hide": 0, "includeAll": true, "index": -1, @@ -188,7 +186,7 @@ "multi": true, "name": "pod", "options": [], - "query": "label_values({pg_cluster=\"[[cluster]]\"},instance)", + "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -317,5 +315,5 @@ "variables": { "list": [] }, - "version": 1 -} \ No newline at end of file + "version": 2 +} diff --git a/grafana/containers/pgbackrest.json b/grafana/containers/pgbackrest.json index e974a17a..9312fad5 100644 --- a/grafana/containers/pgbackrest.json +++ b/grafana/containers/pgbackrest.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:183", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -17,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 4, - "iteration": 1596723551280, + "iteration": 1596814171540, "links": [ { "asDropdown": false, @@ -248,8 +247,8 @@ { "allValue": null, "current": { - "text": "dcsi:dcsi", - "value": "dcsi:dcsi" + "text": "postgres-operations:democluster1", + "value": "postgres-operations:democluster1" }, "datasource": "PROMETHEUS", "definition": "label_values(pg_cluster)", @@ -274,7 +273,7 @@ ] }, "time": { - "from": "now-3h", + "from": "now-5m", "to": "now" }, "timepicker": { @@ -304,4 +303,4 @@ "list": [] }, "version": 1 -} \ No newline at end of file +} diff --git a/grafana/containers/pod_details.json b/grafana/containers/pod_details.json index 2392a52c..75ec2ea7 100644 --- a/grafana/containers/pod_details.json +++ b/grafana/containers/pod_details.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:43", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -16,11 +15,10 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 22, - "iteration": 1596723620874, + "id": 7, + "iteration": 1596814236680, "links": [ { - "$$hashKey": "object:200", "icon": "external link", "tags": [], "type": "dashboards" @@ -54,12 +52,7 @@ }, "lines": true, "linewidth": 1, - "links": [ - { - "title": "Filesystem Details", - "url": "/d/g8iVvnHmz/filesystem-details?$__all_variables" - } - ], + "links": [], "nullPointMode": "null", "options": { "dataLinks": [] @@ -74,7 +67,7 @@ "steppedLine": false, "targets": [ { - "expr": "(ccp_container_data_disk_total_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_container_data_disk_available_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_container_data_disk_total_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "(ccp_nodemx_data_disk_total_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_nodemx_data_disk_available_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_nodemx_data_disk_total_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -82,7 +75,7 @@ "refId": "A" }, { - "expr": "(ccp_container_data_disk_total_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_container_data_disk_free_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_container_data_disk_total_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "(ccp_nodemx_data_disk_total_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_nodemx_data_disk_free_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_nodemx_data_disk_total_file_nodes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -158,12 +151,7 @@ }, "lines": true, "linewidth": 1, - "links": [ - { - "title": "Filesystem Details", - "url": "/d/g8iVvnHmz/filesystem-details?$__all_variables" - } - ], + "links": [], "nullPointMode": "null", "options": { "dataLinks": [] @@ -178,7 +166,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(ccp_container_data_disk_sectors_read{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}[1m])*512", + "expr": "rate(ccp_nodemx_data_disk_sectors_read{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}[1m])*512", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -186,7 +174,7 @@ "refId": "A" }, { - "expr": "rate(ccp_container_data_disk_sectors_written{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}[1m])*512", + "expr": "rate(ccp_nodemx_data_disk_sectors_written{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}[1m])*512", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -281,7 +269,7 @@ "steppedLine": false, "targets": [ { - "expr": "ccp_container_mem_limit{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_limit{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -289,7 +277,7 @@ "refId": "A" }, { - "expr": "ccp_container_mem_request{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_request{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -297,7 +285,7 @@ "refId": "B" }, { - "expr": "ccp_container_mem_cache{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_cache{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -305,7 +293,7 @@ "refId": "C" }, { - "expr": "ccp_container_mem_dirty{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_dirty{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -313,7 +301,7 @@ "refId": "D" }, { - "expr": "ccp_container_mem_shmem{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_shmem{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -321,7 +309,7 @@ "refId": "E" }, { - "expr": "ccp_container_mem_rss{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_rss{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -329,7 +317,7 @@ "refId": "F" }, { - "expr": "ccp_container_mem_mapped_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_mapped_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -337,7 +325,7 @@ "refId": "G" }, { - "expr": "ccp_container_mem_active_anon{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_active_anon{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -345,7 +333,7 @@ "refId": "H" }, { - "expr": "ccp_container_mem_inactive_anon{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_inactive_anon{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -353,7 +341,7 @@ "refId": "I" }, { - "expr": "ccp_container_mem_active_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_active_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -361,7 +349,7 @@ "refId": "J" }, { - "expr": "ccp_container_mem_inactive_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_inactive_file{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -460,7 +448,7 @@ "steppedLine": false, "targets": [ { - "expr": "(((rate(ccp_container_cpuacct_usage{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m]))/1000)*100)/((ccp_container_cpucfs_quota_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}/ccp_container_cpucfs_period_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"})*1000*1000)", + "expr": "(((rate(ccp_nodemx_cpuacct_usage{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m]))/1000)*100)/((ccp_nodemx_cpucfs_quota_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}/ccp_nodemx_cpucfs_period_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"})*1000*1000)", "format": "time_series", "hide": false, "interval": "", @@ -469,7 +457,7 @@ "refId": "A" }, { - "expr": "rate(ccp_container_cpustat_nr_throttled{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*100/rate(ccp_container_cpustat_nr_periods{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])", + "expr": "rate(ccp_nodemx_cpustat_nr_throttled{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*100/rate(ccp_nodemx_cpustat_nr_periods{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])", "format": "time_series", "hide": false, "interval": "", @@ -478,7 +466,7 @@ "refId": "B" }, { - "expr": "ccp_container_process_count{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "expr": "ccp_nodemx_process_count{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", "format": "time_series", "hide": false, "interval": "", @@ -570,7 +558,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(ccp_container_network_rx_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\", interface!=\"tunl0\"}[1m])", + "expr": "rate(ccp_nodemx_network_rx_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\", interface!=\"tunl0\"}[1m])", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -578,7 +566,7 @@ "refId": "A" }, { - "expr": "rate(ccp_container_network_tx_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\", interface!=\"tunl0\"}[1m])", + "expr": "rate(ccp_nodemx_network_tx_bytes{pg_cluster=~\"[[cluster]]\",pod=~\"[[pod]]\", interface!=\"tunl0\"}[1m])", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -606,7 +594,6 @@ }, "yaxes": [ { - "$$hashKey": "object:121", "format": "Bps", "label": null, "logBase": 1, @@ -615,7 +602,6 @@ "show": true }, { - "$$hashKey": "object:122", "format": "short", "label": null, "logBase": 1, @@ -685,7 +671,7 @@ "steppedLine": false, "targets": [ { - "expr": "ccp_container_cpu_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "expr": "ccp_nodemx_cpu_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -693,7 +679,7 @@ "refId": "A" }, { - "expr": "ccp_container_cpu_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "expr": "ccp_nodemx_cpu_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -701,7 +687,7 @@ "refId": "B" }, { - "expr": "ccp_container_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -709,7 +695,7 @@ "refId": "C" }, { - "expr": "ccp_container_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", + "expr": "ccp_nodemx_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -768,9 +754,8 @@ { "allValue": null, "current": { - "tags": [], - "text": "postgres-operations:democluster4", - "value": "postgres-operations:democluster4" + "text": "postgres-operations:democluster1", + "value": "postgres-operations:democluster1" }, "datasource": "PROMETHEUS", "definition": "label_values(pg_cluster)", @@ -807,10 +792,15 @@ "multi": false, "name": "pod", "options": [ + { + "selected": false, + "text": "democluster2-99979f49f-zfgl8", + "value": "democluster2-99979f49f-zfgl8" + }, { "selected": true, - "text": "democluster4-7875894786-kjm46", - "value": "democluster4-7875894786-kjm46" + "text": "democluster2-99979f49f-4lfjl", + "value": "democluster2-99979f49f-4lfjl" } ], "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", @@ -827,7 +817,7 @@ ] }, "time": { - "from": "now-15m", + "from": "now-5m", "to": "now" }, "timepicker": { diff --git a/grafana/containers/postgresql_details.json b/grafana/containers/postgresql_details.json index 1e477b8e..ba1ef6bb 100644 --- a/grafana/containers/postgresql_details.json +++ b/grafana/containers/postgresql_details.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:48", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -17,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 2, - "iteration": 1596723467858, + "iteration": 1596814092364, "links": [ { "asDropdown": false, @@ -1595,9 +1594,9 @@ "allFormat": "glob", "allValue": null, "current": { - "text": "dcsi:dcsi", + "text": "postgres-operations:democluster1", "value": [ - "dcsi:dcsi" + "postgres-operations:democluster1" ] }, "datasource": "PROMETHEUS", @@ -1713,5 +1712,5 @@ "variables": { "list": [] }, - "version": 2 -} \ No newline at end of file + "version": 1 +} diff --git a/grafana/containers/postgresql_overview.json b/grafana/containers/postgresql_overview.json index 81b0ca6b..f64cd573 100644 --- a/grafana/containers/postgresql_overview.json +++ b/grafana/containers/postgresql_overview.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:40", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -17,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 1, - "iteration": 1596723388434, + "iteration": 1596814059232, "links": [], "panels": [ { @@ -42,7 +41,7 @@ }, "gridPos": { "h": 3, - "w": 24, + "w": 12, "x": 0, "y": 0 }, @@ -58,13 +57,11 @@ "mappingType": 2, "mappingTypes": [ { - "$$hashKey": "object:78", "$hashKey": "object:295", "name": "value to text", "value": 1 }, { - "$$hashKey": "object:79", "$hashKey": "object:296", "name": "range to text", "value": 2 @@ -80,19 +77,16 @@ "prefixFontSize": "50%", "rangeMaps": [ { - "$$hashKey": "object:81", "from": "0", "text": "DOWN", "to": "99" }, { - "$$hashKey": "object:82", "from": "100", "text": "Standalone Cluster", "to": "199" }, { - "$$hashKey": "object:83", "from": "200", "text": "HA CLUSTER", "to": "1000" @@ -103,8 +97,119 @@ "scopedVars": { "cluster": { "selected": false, - "text": "dcsi:dcsi", - "value": "dcsi:dcsi" + "text": "postgres-operations:democluster1", + "value": "postgres-operations:democluster1" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "$hashKey": "object:243", + "expr": "sum(pg_up{pg_cluster=\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=\"$cluster\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{cluster}}", + "metric": "up", + "refId": "A", + "step": 2 + } + ], + "thresholds": "10,100", + "title": "$cluster - Overview", + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorPostfix": false, + "colorPrefix": false, + "colorValue": false, + "colors": [ + "#bf1b00", + "#eab839", + "#56A64B" + ], + "datasource": "PROMETHEUS", + "format": "short", + "gauge": { + "maxValue": 2, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "interval": null, + "links": [ + { + "targetBlank": true, + "title": "PostgreSQLDetails", + "url": "dashboard/db/postgresqldetails?$__url_time_range&$__all_variables" + } + ], + "mappingType": 2, + "mappingTypes": [ + { + "$hashKey": "object:295", + "name": "value to text", + "value": 1 + }, + { + "$hashKey": "object:296", + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "maxPerRow": 2, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "0", + "text": "DOWN", + "to": "99" + }, + { + "from": "100", + "text": "Standalone Cluster", + "to": "199" + }, + { + "from": "200", + "text": "HA CLUSTER", + "to": "1000" + } + ], + "repeat": null, + "repeatDirection": "h", + "repeatIteration": 1596814059232, + "repeatPanelId": 1, + "scopedVars": { + "cluster": { + "selected": false, + "text": "postgres-operations:democluster2", + "value": "postgres-operations:democluster2" } }, "sparkline": { @@ -206,5 +311,5 @@ "variables": { "list": [] }, - "version": 2 -} \ No newline at end of file + "version": 1 +} diff --git a/grafana/containers/postgresql_service_health_overview.json b/grafana/containers/postgresql_service_health_overview.json index d56052ab..b639b850 100644 --- a/grafana/containers/postgresql_service_health_overview.json +++ b/grafana/containers/postgresql_service_health_overview.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:270", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -16,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 23, - "iteration": 1596730628312, + "id": 6, + "iteration": 1596814193803, "links": [ { "asDropdown": false, @@ -84,7 +83,7 @@ "refId": "C" }, { - "expr": "(ccp_container_data_disk_total_bytes{service=\"[[service_name]]\"}-ccp_container_data_disk_available_bytes{service=\"[[service_name]]\"})*100/ccp_container_data_disk_total_bytes{service=\"[[service_name]]\"}", + "expr": "(ccp_nodemx_data_disk_total_bytes{service=\"[[service_name]]\"}-ccp_nodemx_data_disk_available_bytes{service=\"[[service_name]]\"})*100/ccp_nodemx_data_disk_total_bytes{service=\"[[service_name]]\"}", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -485,8 +484,8 @@ { "allValue": null, "current": { - "text": "democluster4", - "value": "democluster4" + "text": "democluster1", + "value": "democluster1" }, "datasource": "PROMETHEUS", "definition": "label_values(service)", @@ -511,7 +510,7 @@ ] }, "time": { - "from": "now-3h", + "from": "now-5m", "to": "now" }, "timepicker": { @@ -545,5 +544,5 @@ "variables": { "list": [] }, - "version": 5 + "version": 1 } diff --git a/grafana/containers/prometheus_alerts.json b/grafana/containers/prometheus_alerts.json index 143dea46..57dea7d2 100644 --- a/grafana/containers/prometheus_alerts.json +++ b/grafana/containers/prometheus_alerts.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:212", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -716,7 +715,7 @@ "list": [] }, "time": { - "from": "now-3h", + "from": "now-5m", "to": "now" }, "timepicker": { @@ -749,4 +748,4 @@ "list": [] }, "version": 1 -} \ No newline at end of file +} From 1daf32352eb1b73e5ca52ff5fb08c7f7d535218a Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Fri, 7 Aug 2020 10:32:58 -0500 Subject: [PATCH 7/9] rename queries_containers.yml to queries_nodemx.yml --- exporter/postgres/{queries_containers.yml => queries_nodemx.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename exporter/postgres/{queries_containers.yml => queries_nodemx.yml} (100%) diff --git a/exporter/postgres/queries_containers.yml b/exporter/postgres/queries_nodemx.yml similarity index 100% rename from exporter/postgres/queries_containers.yml rename to exporter/postgres/queries_nodemx.yml From 296b4f51e812e3b16faa5e79a9560abba40e31eb Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Fri, 7 Aug 2020 11:18:00 -0500 Subject: [PATCH 8/9] fix the description of process count metric --- exporter/postgres/queries_nodemx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter/postgres/queries_nodemx.yml b/exporter/postgres/queries_nodemx.yml index 417b9a35..548dcec4 100644 --- a/exporter/postgres/queries_nodemx.yml +++ b/exporter/postgres/queries_nodemx.yml @@ -26,7 +26,7 @@ ccp_nodemx_process: metrics: - count: usage: "GAUGE" - description: "Total number of processes on database container" + description: "Total number of database processes" ccp_nodemx_mem: From 976c0b8dfbca1eaa429c907da0b71e2db948529b Mon Sep 17 00:00:00 2001 From: Pramodh Mereddy Date: Fri, 7 Aug 2020 12:12:14 -0500 Subject: [PATCH 9/9] exported dashboards to use externally --- grafana/containers/crud_details.json | 79 ++++---- grafana/containers/pgbackrest.json | 50 ++++-- grafana/containers/pod_details.json | 85 +++++---- grafana/containers/postgresql_details.json | 98 ++++++---- grafana/containers/postgresql_overview.json | 170 +++++------------- .../postgresql_service_health_overview.json | 54 ++++-- grafana/containers/prometheus_alerts.json | 41 ++++- 7 files changed, 316 insertions(+), 261 deletions(-) diff --git a/grafana/containers/crud_details.json b/grafana/containers/crud_details.json index 23d79f4d..a6818690 100644 --- a/grafana/containers/crud_details.json +++ b/grafana/containers/crud_details.json @@ -1,7 +1,38 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:111", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,8 +46,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 3, - "iteration": 1596814000168, + "id": null, + "iteration": 1596817489973, "links": [ { "icon": "external link", @@ -31,7 +62,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -145,11 +176,8 @@ "list": [ { "allValue": null, - "current": { - "text": "postgres-operations:democluster1", - "value": "postgres-operations:democluster1" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "", "hide": 0, "includeAll": false, @@ -171,13 +199,8 @@ }, { "allValue": ".*", - "current": { - "text": "All", - "value": [ - "$__all" - ] - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", "hide": 0, "includeAll": true, @@ -199,12 +222,8 @@ }, { "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\", instance=\"[[pod]]\"},dbname)", "hide": 0, "includeAll": true, @@ -226,12 +245,8 @@ }, { "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "", "hide": 0, "includeAll": true, @@ -253,12 +268,8 @@ }, { "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "", "hide": 0, "includeAll": true, @@ -316,4 +327,4 @@ "list": [] }, "version": 2 -} +} \ No newline at end of file diff --git a/grafana/containers/pgbackrest.json b/grafana/containers/pgbackrest.json index 9312fad5..802d6750 100644 --- a/grafana/containers/pgbackrest.json +++ b/grafana/containers/pgbackrest.json @@ -1,7 +1,38 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:183", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,8 +46,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 4, - "iteration": 1596814171540, + "id": null, + "iteration": 1596817505521, "links": [ { "asDropdown": false, @@ -35,7 +66,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -137,7 +168,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -246,11 +277,8 @@ "list": [ { "allValue": null, - "current": { - "text": "postgres-operations:democluster1", - "value": "postgres-operations:democluster1" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(pg_cluster)", "hide": 0, "includeAll": false, @@ -273,7 +301,7 @@ ] }, "time": { - "from": "now-5m", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -303,4 +331,4 @@ "list": [] }, "version": 1 -} +} \ No newline at end of file diff --git a/grafana/containers/pod_details.json b/grafana/containers/pod_details.json index 75ec2ea7..48f068b6 100644 --- a/grafana/containers/pod_details.json +++ b/grafana/containers/pod_details.json @@ -1,7 +1,38 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:43", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,10 +46,11 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 7, - "iteration": 1596814236680, + "id": null, + "iteration": 1596817522512, "links": [ { + "$$hashKey": "object:200", "icon": "external link", "tags": [], "type": "dashboards" @@ -30,7 +62,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -103,6 +135,7 @@ }, "yaxes": [ { + "$$hashKey": "object:193", "format": "percent", "label": null, "logBase": 1, @@ -111,6 +144,7 @@ "show": true }, { + "$$hashKey": "object:194", "format": "short", "label": null, "logBase": 1, @@ -129,7 +163,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -232,7 +266,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -406,7 +440,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 0, "fillGradient": 0, "gridPos": { @@ -521,7 +555,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -594,6 +628,7 @@ }, "yaxes": [ { + "$$hashKey": "object:121", "format": "Bps", "label": null, "logBase": 1, @@ -602,6 +637,7 @@ "show": true }, { + "$$hashKey": "object:122", "format": "short", "label": null, "logBase": 1, @@ -625,7 +661,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 0, "fillGradient": 0, "gridPos": { @@ -753,11 +789,8 @@ "list": [ { "allValue": null, - "current": { - "text": "postgres-operations:democluster1", - "value": "postgres-operations:democluster1" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(pg_cluster)", "hide": 0, "includeAll": false, @@ -779,11 +812,8 @@ }, { "allValue": null, - "current": { - "text": "democluster4-7875894786-kjm46", - "value": "democluster4-7875894786-kjm46" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", "hide": 0, "includeAll": false, @@ -791,20 +821,9 @@ "label": "pod", "multi": false, "name": "pod", - "options": [ - { - "selected": false, - "text": "democluster2-99979f49f-zfgl8", - "value": "democluster2-99979f49f-zfgl8" - }, - { - "selected": true, - "text": "democluster2-99979f49f-4lfjl", - "value": "democluster2-99979f49f-4lfjl" - } - ], + "options": [], "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", - "refresh": 0, + "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, @@ -817,7 +836,7 @@ ] }, "time": { - "from": "now-5m", + "from": "now-15m", "to": "now" }, "timepicker": { @@ -848,4 +867,4 @@ "list": [] }, "version": 2 -} +} \ No newline at end of file diff --git a/grafana/containers/postgresql_details.json b/grafana/containers/postgresql_details.json index ba1ef6bb..8ca616fb 100644 --- a/grafana/containers/postgresql_details.json +++ b/grafana/containers/postgresql_details.json @@ -1,7 +1,44 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:48", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,8 +52,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 2, - "iteration": 1596814092364, + "id": null, + "iteration": 1596817584625, "links": [ { "asDropdown": false, @@ -40,7 +77,7 @@ "#FF9830", "#E02F44" ], - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "format": "dtdurations", "gauge": { "maxValue": 100, @@ -129,7 +166,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "format": "percent", "gauge": { "maxValue": 100, @@ -213,7 +250,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "format": "percentunit", "gauge": { "maxValue": 100, @@ -293,7 +330,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "format": "percent", "gauge": { "maxValue": 100, @@ -371,7 +408,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -472,7 +509,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -589,7 +626,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -689,7 +726,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -782,7 +819,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -912,7 +949,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -1016,7 +1053,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -1120,7 +1157,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -1220,7 +1257,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -1350,7 +1387,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -1452,7 +1489,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 0, "gridPos": { @@ -1593,13 +1630,8 @@ { "allFormat": "glob", "allValue": null, - "current": { - "text": "postgres-operations:democluster1", - "value": [ - "postgres-operations:democluster1" - ] - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "", "hide": 0, "includeAll": false, @@ -1622,12 +1654,8 @@ { "allFormat": "glob", "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", "hide": 0, "includeAll": true, @@ -1650,12 +1678,8 @@ { "allFormat": "glob", "allValue": ".*", - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values({pg_cluster=\"[[cluster]]\" ,pod=\"[[pod]]\"},dbname)", "hide": 0, "includeAll": true, @@ -1713,4 +1737,4 @@ "list": [] }, "version": 1 -} +} \ No newline at end of file diff --git a/grafana/containers/postgresql_overview.json b/grafana/containers/postgresql_overview.json index f64cd573..528fa5a6 100644 --- a/grafana/containers/postgresql_overview.json +++ b/grafana/containers/postgresql_overview.json @@ -1,7 +1,38 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:40", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,8 +46,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 1, - "iteration": 1596814059232, + "id": null, + "iteration": 1596817539605, "links": [], "panels": [ { @@ -30,7 +61,7 @@ "#eab839", "#56A64B" ], - "datasource": "PROMETHEUS", + "datasource": "${DS_PROMETHEUS}", "format": "short", "gauge": { "maxValue": 2, @@ -57,11 +88,13 @@ "mappingType": 2, "mappingTypes": [ { + "$$hashKey": "object:78", "$hashKey": "object:295", "name": "value to text", "value": 1 }, { + "$$hashKey": "object:79", "$hashKey": "object:296", "name": "range to text", "value": 2 @@ -77,16 +110,19 @@ "prefixFontSize": "50%", "rangeMaps": [ { + "$$hashKey": "object:81", "from": "0", "text": "DOWN", "to": "99" }, { + "$$hashKey": "object:82", "from": "100", "text": "Standalone Cluster", "to": "199" }, { + "$$hashKey": "object:83", "from": "200", "text": "HA CLUSTER", "to": "1000" @@ -94,124 +130,6 @@ ], "repeat": "cluster", "repeatDirection": "h", - "scopedVars": { - "cluster": { - "selected": false, - "text": "postgres-operations:democluster1", - "value": "postgres-operations:democluster1" - } - }, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "$hashKey": "object:243", - "expr": "sum(pg_up{pg_cluster=\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=\"$cluster\"})", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{cluster}}", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "thresholds": "10,100", - "title": "$cluster - Overview", - "type": "singlestat", - "valueFontSize": "70%", - "valueMaps": [], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": true, - "colorPostfix": false, - "colorPrefix": false, - "colorValue": false, - "colors": [ - "#bf1b00", - "#eab839", - "#56A64B" - ], - "datasource": "PROMETHEUS", - "format": "short", - "gauge": { - "maxValue": 2, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "interval": null, - "links": [ - { - "targetBlank": true, - "title": "PostgreSQLDetails", - "url": "dashboard/db/postgresqldetails?$__url_time_range&$__all_variables" - } - ], - "mappingType": 2, - "mappingTypes": [ - { - "$hashKey": "object:295", - "name": "value to text", - "value": 1 - }, - { - "$hashKey": "object:296", - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "maxPerRow": 2, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "0", - "text": "DOWN", - "to": "99" - }, - { - "from": "100", - "text": "Standalone Cluster", - "to": "199" - }, - { - "from": "200", - "text": "HA CLUSTER", - "to": "1000" - } - ], - "repeat": null, - "repeatDirection": "h", - "repeatIteration": 1596814059232, - "repeatPanelId": 1, - "scopedVars": { - "cluster": { - "selected": false, - "text": "postgres-operations:democluster2", - "value": "postgres-operations:democluster2" - } - }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, @@ -249,12 +167,8 @@ { "allFormat": "glob", "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(pg_cluster)", "hide": 2, "includeAll": true, @@ -312,4 +226,4 @@ "list": [] }, "version": 1 -} +} \ No newline at end of file diff --git a/grafana/containers/postgresql_service_health_overview.json b/grafana/containers/postgresql_service_health_overview.json index b639b850..17172799 100644 --- a/grafana/containers/postgresql_service_health_overview.json +++ b/grafana/containers/postgresql_service_health_overview.json @@ -1,7 +1,38 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:270", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,8 +46,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 6, - "iteration": 1596814193803, + "id": null, + "iteration": 1596817557729, "links": [ { "asDropdown": false, @@ -35,7 +66,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 5, "gridPos": { @@ -139,7 +170,7 @@ "cacheTimeout": null, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 5, "fillGradient": 5, "gridPos": { @@ -244,7 +275,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "description": "Errors", "fill": 1, "fillGradient": 5, @@ -371,7 +402,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fill": 1, "fillGradient": 5, "gridPos": { @@ -483,11 +514,8 @@ "list": [ { "allValue": null, - "current": { - "text": "democluster1", - "value": "democluster1" - }, - "datasource": "PROMETHEUS", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(service)", "hide": 0, "includeAll": false, @@ -510,7 +538,7 @@ ] }, "time": { - "from": "now-5m", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -545,4 +573,4 @@ "list": [] }, "version": 1 -} +} \ No newline at end of file diff --git a/grafana/containers/prometheus_alerts.json b/grafana/containers/prometheus_alerts.json index 57dea7d2..b20cab01 100644 --- a/grafana/containers/prometheus_alerts.json +++ b/grafana/containers/prometheus_alerts.json @@ -1,7 +1,38 @@ { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "PROMETHEUS", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.7.4" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], "annotations": { "list": [ { + "$$hashKey": "object:212", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -15,7 +46,7 @@ "editable": false, "gnetId": null, "graphTooltip": 0, - "id": 5, + "id": null, "links": [ { "asDropdown": false, @@ -31,7 +62,7 @@ "panels": [ { "columns": [], - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fontSize": "100%", "gridPos": { "h": 7, @@ -387,7 +418,7 @@ }, { "columns": [], - "datasource": null, + "datasource": "${DS_PROMETHEUS}", "fontSize": "100%", "gridPos": { "h": 7, @@ -715,7 +746,7 @@ "list": [] }, "time": { - "from": "now-5m", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -748,4 +779,4 @@ "list": [] }, "version": 1 -} +} \ No newline at end of file