From e11f5e3d39f0829924d4f463cf5e03510561106f Mon Sep 17 00:00:00 2001 From: Keith Fiske Date: Wed, 24 Apr 2024 11:02:33 -0400 Subject: [PATCH] Support for sql_exporter with pgMonitor extension (#361) * initial commit of sql_exporter using pgmonitor extension * Fix table size metric name in grafana dashboard * fix: change sql_exporter service file to template * fix: add missing key in bgw struct. fix pg_stat_statements column * feat: add further support of backrest and bouncer in sql_exporter. better define new extras package * doc: update README files for sql_exporter and pgmonitor extension * fix: fix name of pgbouncer collector * chore: update sql_exporter service file * chore: update sql_exporter service file * chore: move pgmonitor extension to its own repository * feat: add pgmonitor-extension metrics. add pgbouncer direct collection. * docs: update build file. clarify access to rpms via portal * update documentation * fix: fix the source for alertmanager sysconfig file to be our provided file * chore: explicitly list grafana dashboards in build manifest * chore: remove old sql_exporter readme file * chore: add changelog fragment * chore: add changelog fragment * Apply suggestions from code review Co-authored-by: Douglas J Hunley * fix: remove top level overview dashboard * fix: remove top level overview dashboard * fix: update grafana dashboards for angular deprecation * Apply suggestions from code review Co-authored-by: Douglas J Hunley * docs: update docs based on recommendations * Apply suggestions from code review Co-authored-by: Douglas J Hunley * fix: update version requirements for grafana --------- Co-authored-by: Douglas J Hunley --- build/packages.yml | 206 +- changelogs/fragments/361.yml | 10 + grafana/common/PGBackrest.json | 604 ----- grafana/common/PG_Overview.json | 445 ---- grafana/common/Prometheus_Alerts.json | 308 --- .../crunchy_grafana_dashboards.yml | 0 grafana/{common => etcd}/ETCD_Details.json | 534 ++++- grafana/linux/Filesystem_Details.json | 823 ++++--- grafana/linux/Network_Details.json | 1435 ++++++------ grafana/linux/OS_Details.json | 874 ++++---- grafana/linux/OS_Overview.json | 1124 +--------- grafana/linux/Overview.json | 167 -- .../pgbouncer/direct/PGBouncer_direct.json | 693 ++++++ .../fdw/PGBouncer_fdw.json} | 634 +++--- .../{common => postgres}/Bloat_Details.json | 532 +++-- .../{common => postgres}/CRUD_Details.json | 240 +- grafana/postgres/PGBackrest.json | 609 +++++ grafana/{common => postgres}/PG_Details.json | 1974 +++++++++-------- .../{common => postgres}/QueryStatistics.json | 231 +- .../TableSize_Details.json | 236 +- .../PG_Overview_postgres_exporter.json | 200 ++ .../PG_Overview_sql_exporter.json | 203 ++ grafana/prometheus/Prometheus_Alerts.json | 487 ++++ hugo/content/exporter/_index.md | 365 +-- hugo/content/grafana/_index.md | 14 +- hugo/content/prometheus/_index.md | 2 +- .../crunchy-alert-rules-pg.yml.example | 76 +- prometheus/linux/crunchy-prometheus.yml | 38 +- .../common/crunchy_backrest_collector.yml | 149 ++ .../common/crunchy_bloat_check_collector.yml | 36 + .../common/crunchy_global_collector.yml | 544 +++++ .../common/crunchy_per_db_collector.yml | 244 ++ .../crunchy_pg_stat_statements_collector.yml | 167 ++ ...chy_pg_stat_statements_reset_collector.yml | 11 + .../crunchy_pgbouncer_121_collector.yml | 200 ++ .../crunchy_pgbouncer_fdw_collector.yml | 158 ++ sql_exporter/common/setup_db.sql | 26 + sql_exporter/common/sql_exporter.yml.example | 44 + sql_exporter/linux/crontab.txt | 9 + .../linux/crunchy-sql-exporter@.service | 24 + sql_exporter/linux/sql_exporter.sysconfig | 8 + 41 files changed, 8480 insertions(+), 6204 deletions(-) create mode 100644 changelogs/fragments/361.yml delete mode 100644 grafana/common/PGBackrest.json delete mode 100644 grafana/common/PG_Overview.json delete mode 100644 grafana/common/Prometheus_Alerts.json rename grafana/{linux => common}/crunchy_grafana_dashboards.yml (100%) rename grafana/{common => etcd}/ETCD_Details.json (86%) delete mode 100644 grafana/linux/Overview.json create mode 100644 grafana/pgbouncer/direct/PGBouncer_direct.json rename grafana/{common/PGBouncer.json => pgbouncer/fdw/PGBouncer_fdw.json} (53%) rename grafana/{common => postgres}/Bloat_Details.json (50%) rename grafana/{common => postgres}/CRUD_Details.json (65%) create mode 100644 grafana/postgres/PGBackrest.json rename grafana/{common => postgres}/PG_Details.json (59%) rename grafana/{common => postgres}/QueryStatistics.json (84%) rename grafana/{common => postgres}/TableSize_Details.json (53%) create mode 100644 grafana/postgres/postgres_exporter/PG_Overview_postgres_exporter.json create mode 100644 grafana/postgres/sql_exporter/PG_Overview_sql_exporter.json create mode 100644 grafana/prometheus/Prometheus_Alerts.json create mode 100644 sql_exporter/common/crunchy_backrest_collector.yml create mode 100644 sql_exporter/common/crunchy_bloat_check_collector.yml create mode 100644 sql_exporter/common/crunchy_global_collector.yml create mode 100644 sql_exporter/common/crunchy_per_db_collector.yml create mode 100644 sql_exporter/common/crunchy_pg_stat_statements_collector.yml create mode 100644 sql_exporter/common/crunchy_pg_stat_statements_reset_collector.yml create mode 100644 sql_exporter/common/crunchy_pgbouncer_121_collector.yml create mode 100644 sql_exporter/common/crunchy_pgbouncer_fdw_collector.yml create mode 100644 sql_exporter/common/setup_db.sql create mode 100644 sql_exporter/common/sql_exporter.yml.example create mode 100644 sql_exporter/linux/crontab.txt create mode 100644 sql_exporter/linux/crunchy-sql-exporter@.service create mode 100644 sql_exporter/linux/sql_exporter.sysconfig diff --git a/build/packages.yml b/build/packages.yml index a7255df2..1f3c3d7d 100644 --- a/build/packages.yml +++ b/build/packages.yml @@ -6,11 +6,40 @@ packages: - { target: "upstream", owner: "prometheus", group: "prometheus" } upstream_repo: "https://github.com/prometheus/prometheus" + - pgmonitor-prometheus-extras: + files: + - { target: "/etc/prometheus/auto.d", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { target: "/etc/prometheus/alert-rules.d", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { target: "/etc/prometheus/auto.tls.d/", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { target: "/var/lib/ccp_monitoring/prometheus", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/common/auto.d/*.example", target: "/etc/prometheus/auto.d/", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/linux/auto.d/*.example", target: "/etc/prometheus/auto.d/", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/common/alert-rules.d/*.example", target: "/etc/prometheus/alert-rules.d/*", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/linux/alert-rules.d/*.example", target: "/etc/prometheus/alert-rules.d/*", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/linux/crunchy-prometheus-service-rhel.conf", target: "/etc/systemd/system/prometheus.service.d/crunchy-prometheus-service-rhel.conf", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/linux/sysconfig.prometheus", target: "/etc/sysconfig/prometheus", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "prometheus/linux/crunchy-prometheus.yml", target: "/etc/prometheus/crunchy-prometheus.yml", mode: "0644", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + pkg_dependency: + - { pkg_name: "prometheus2", gte: 2.38.0 , lt: 2.50.0 } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - alertmanager: files: - { target: "upstream", owner: "prometheus", group: "prometheus" } upstream_repo: "https://github.com/prometheus/alertmanager" + - pgmonitor-alertmanager-extras: + files: + - { source: "alertmanager/common/crunchy-alertmanager.yml", target: "/etc/prometheus/crunchy-alertmanager.yml ", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "alertmanager/linux/crunchy-alertmanager-service-rhel.conf", target: "/etc/systemd/system/alertmanager.service.d/crunchy-alertmanager-service-rhel.conf", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "alertmanager/linux/sysconfig.alertmanager", target: "/etc/sysconfig/alertmanager", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { target: "/var/lib/ccp_monitoring/alertmanager", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + pkg_dependency: + - { pkg_name: "alertmanager", gte: 0.23.0, lt: 0.27.0 } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - node-exporter: files: - { target: "upstream", owner: "root", group: "root" } @@ -19,6 +48,16 @@ packages: - { pkg_name: "sysstat" } upstream_repo: "https://github.com/prometheus/node_exporter" + - pgmonitor-node-exporter-extras: + files: + - { source: "node_exporter/linux/crunchy-node-exporter-service-rhel.conf", target: "/etc/systemd/system/node_exporter.service.d/crunchy-node-exporter-service-rhel.conf", mode: "0644", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "node_exporter/linux/sysconfig.node_exporter", target: "/etc/sysconfig/node_exporter", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { target: "/var/lib/ccp_monitoring/node_exporter/", mode: "0700", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + pkg_dependency: + - { pkg_name: "node-exporter", gte: 1.5.0, lt: 1.8.0 } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - postgres-exporter: files: - { target: "/usr/bin/postgres_exporter", mode: "0755", type: "file", owner: "root", group: "root" } @@ -26,6 +65,31 @@ packages: - { target: "/etc/postgres_exporter", type: "folder", mode: "0755", owner: "root", group: "root" } upstream_repo: "https://github.com/CrunchyData/postgres_exporter" + - pgmonitor-pg-common: + files: + - { source: "postgres_exporter/linux/crunchy-postgres-exporter@.service", target: "/usr/lib/systemd/system/crunchy-postgres-exporter@.service", mode: "0644", type: "files", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/pgbackrest-info.sh", target: "/usr/bin/pgbackrest-info.sh", mode: "0755", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/pgmonitor.conf", target: "/etc/pgmonitor.conf", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + pkg_dependency: + - { pkg_name: "postgres-exporter", gte: 0.10.1, lt: 0.16.0 } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + # Double-hash (##) stands for PostgreSQL major version. Version matches between pkg_name and dependency package + - pgmonitor-pg##-extras: + files: + - { source: "postgres_exporter/common/queries_*.yml", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/common/*.sql", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/common/pg##/*", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/queries_*.yml", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg##", target: "/etc/sysconfig/postgres_exporter_pg##", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg##_per_db", target: "/etc/sysconfig/postgres_exporter_pg##_per_db", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/crontab.txt", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + pkg_dependency: + - { pkg_name: "pgmonitor-pg-common" } + - { pkg_name: "postgresql##-contrib" } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - blackbox-exporter: files: - { target: "/etc/default/blackbox_exporter", mode: "0644", type: "file", owner: "root", group: "root" } @@ -41,68 +105,123 @@ packages: - { pkg_name: "blackbox-exporter", gte: 0.22.0, lt: 0.25.0 } upstream_repo: "https://github.com/CrunchyData/pgmonitor" - - pgmonitor-node-exporter-extras: + + - sql-exporter: files: - - { source: "node_exporter/linux/crunchy-node-exporter-service-rhel.conf", target: "/etc/systemd/system/node_exporter.service.d/crunchy-node-exporter-service-rhel.conf", mode: "0644", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "node_exporter/linux/sysconfig.node_exporter", target: "/etc/sysconfig/node_exporter", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { target: "/var/lib/ccp_monitoring/node_exporter/", mode: "0700", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "https://github.com/CrunchyData/pgmonitor/sql_exporter/linux/crunchy-sql-exporter@.service" target: "/usr/lib/systemd/system/crunchy-sql-exporter@.service", mode: "0645", type: "file", owner: "root", group: "root" } + - { target: "/usr/bin/sql_exporter", mode: "0755", type: "file", owner: "root", group: "root" } + - { target: "/etc/sql_exporter", type: "folder", mode: "0755", owner: "root", group: "root" } + upstream_repo: "https://github.com/burningalchemist/sql_exporter" + + # If postgres_exporter is dropped, move pgbackrest-info and pgmonitor.conf to sql_exporter folder + - sql-exporter-extras: + files: + - { source: "sql_exporter/common/crunchy_backrest_collector.yml", target: "/etc/sql_exporter/crunchy_backrest_collector.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_bloat_check_collector.yml", target: "/etc/sql_exporter/crunchy_bloat_check_collector.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_global_collector.yml", target: "/etc/sql_exporter/crunchy_global_collector.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_per_db_collector.yml", target: "/etc/sql_exporter/crunchy_per_db_collector.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_pgbouncer_121_collector.yml", target: "/etc/sql_exporter/crunchy_pgbouncer_collector_121.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_pgbouncer_fdw_collector.yml", target: "/etc/sql_exporter/crunchy_pgbouncer_fdw_collector.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_pg_stat_statements_collector.yml", target: "/etc/sql_exporter/crunchy_pg_stat_statements_collector.yml", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/crunchy_pg_stat_statements_reset_collector.yml", target: "/etc/sql_exporter/crunchy_pg_stat_statements_reset_collector.yml", mode: "640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/setup_db.sql", target: "/etc/sql_exporter/setup_db.sql", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/common/sql_exporter.yml.example", target: "/etc/sql_exporter/sql_exporter.yml.example", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/linux/sql_exporter.sysconfig", target: "/etc/sysconfig/sql_exporter", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "sql_exporter/linux/crontab.txt", target: "/etc/sql_exporter/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/pgbackrest-info.sh", target: "/usr/bin/pgbackrest-info.sh", mode: "0755", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "postgres_exporter/linux/pgmonitor.conf", target: "/etc/pgmonitor.conf", mode: "0644", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + pkg_conflict: + - { pkg_name: "pgmonitor-pg-common" } pkg_dependency: - - { pkg_name: "node-exporter", gte: 1.5.0, lt: 1.8.0 } + - { pkg_name: "sql-exporter", gte: 0.13.0, lt: 0.15.0 } + + + - grafana: + files: + - { target: "upstream", owner: "grafana", group: "grafana" } + upstream_repo: "https://github.com/grafana/grafana" + + - pgmonitor-grafana-extras-common: + files: + - { source: "grafana/common/crunchy_grafana_datasource.yml", target: "/etc/grafana/provisioning/datasources/datasource.yml", mode: "0640", type: "file", rpm_new: true, owner: "grafana", group: "grafana" } + - { source: "grafana/common/crunchy_grafana_dashboards.yml", target: "/etc/grafana/provisioning/dashboards/dashboards.yml", mode: "0640", type: "file", rpm_new: true, owner: "grafana", group: "grafana" } + pkg_dependency: + - { pkg_name: "grafana", gte: 10.0.0, lt: 11.0.0 } upstream_repo: "https://github.com/CrunchyData/pgmonitor" - - pgmonitor-pg-common: + - pgmonitor-grafana-extras-etcd: files: - - { source: "postgres_exporter/linux/crunchy-postgres-exporter@.service", target: "/usr/lib/systemd/system/crunchy-postgres-exporter@.service", mode: "0644", type: "files", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/linux/pgbackrest-info.sh", target: "/usr/bin/pgbackrest-info.sh", mode: "0755", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/linux/pgmonitor.conf", target: "/etc/pgmonitor.conf", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "grafana/etcd/ETCD_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } pkg_dependency: - - { pkg_name: "postgres-exporter", gte: 0.10.1, lt: 0.16.0 } + - { pkg_name: "pgmonitor-grafana-extras-common" } upstream_repo: "https://github.com/CrunchyData/pgmonitor" - - pgmonitor-prometheus-extras: + - pgmonitor-grafana-extras-linux: files: - - { target: "/etc/prometheus/auto.d", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { target: "/etc/prometheus/alert-rules.d", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { target: "/etc/prometheus/auto.tls.d/", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { target: "/var/lib/ccp_monitoring/prometheus", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/common/auto.d/*.example", target: "/etc/prometheus/auto.d/", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/linux/auto.d/*.example", target: "/etc/prometheus/auto.d/", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/common/alert-rules.d/*.example", target: "/etc/prometheus/alert-rules.d/*", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/linux/alert-rules.d/*.example", target: "/etc/prometheus/alert-rules.d/*", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/linux/crunchy-prometheus-service-rhel.conf", target: "/etc/systemd/system/prometheus.service.d/crunchy-prometheus-service-rhel.conf", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/linux/sysconfig.prometheus", target: "/etc/sysconfig/prometheus", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "prometheus/linux/crunchy-prometheus.yml", target: "/etc/prometheus/crunchy-prometheus.yml", mode: "0644", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "grafana/linux/Filesystem_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/linux/Network_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/linux/OS_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/linux/OS_Overview.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + pkg_dependency: + - { pkg_name: "pgmonitor-grafana-extras-common" } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - pgmonitor-grafana-extras-pg: + files: + - { source: "grafana/postgres/Bloat_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/postgres/CRUD_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/postgres/PGBackrest.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/postgres/PG_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/postgres/QueryStatistics.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + - { source: "grafana/postgres/TableSize_Details.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } pkg_dependency: - - { pkg_name: "prometheus2", gte: 2.38.0 , lt: 2.50.0 } + - { pkg_name: "pgmonitor-grafana-extras-common" } upstream_repo: "https://github.com/CrunchyData/pgmonitor" - - pgmonitor-alertmanager-extras: + - pgmonitor-grafana-extras-pg-postgres-exporter: files: - - { source: "alertmanager/common/crunchy-alertmanager.yml", target: "/etc/prometheus/crunchy-alertmanager.yml ", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "alertmanager/linux/crunchy-alertmanager-service-rhel.conf", target: "/etc/systemd/system/alertmanager.service.d/crunchy-alertmanager-service-rhel.conf", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "/etc/systemd/system/sysconfig.alertmanager", target: "/etc/sysconfig/alertmanager", mode: "0640", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { target: "/var/lib/ccp_monitoring/alertmanager", mode: "0750", type: "folder", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } + - { source: "grafana/postgres/postgres_exporter/PG_Overview_postgres_exporter.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } pkg_dependency: - - { pkg_name: "alertmanager", gte: 0.23.0, lt: 0.27.0 } + - { pkg_name: "pgmonitor-grafana-extras-common" } upstream_repo: "https://github.com/CrunchyData/pgmonitor" - - pgmonitor-grafana-extras: + - pgmonitor-grafana-extras-pg-sql-exporter: files: - - { source: "grafana/common/crunchy_grafana_datasource.yml", target: "/etc/grafana/provisioning/datasources/datasource.yml", mode: "0640", type: "file", rpm_new: true, owner: "grafana", group: "grafana" } - - { source: "grafana/common/*.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } - - { source: "grafana/linux/*.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } - - { source: "grafana/linux/crunchy_grafana_dashboards.yml", target: "/etc/grafana/provisioning/dashboards/dashboards.yml", mode: "0640", type: "file", rpm_new: true, owner: "grafana", group: "grafana" } + - { source: "grafana/postgres/sql_exporter/PG_Overview_sql_exporter.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + pkg_dependency: + - { pkg_name: "pgmonitor-grafana-extras-common" } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - pgmonitor-grafana-extras-pgbouncer-direct: + files: + - { source: "grafana/pgbouncer/direct/PGBouncer_direct.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + pkg_dependency: + - { pkg_name: "pgmonitor-grafana-extras-common" } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - pgmonitor-grafana-extras-pgbouncer-fdw: + files: + - { source: "grafana/pgbouncer/fdw/PGBouncer_fdw.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } + pkg_dependency: + - { pkg_name: "pgmonitor-grafana-extras-common" } + upstream_repo: "https://github.com/CrunchyData/pgmonitor" + + - pgmonitor-grafana-extras-prometheus: + files: + - { source: "grafana/prometheus/Prometheus_Alerts.json", target: "/etc/grafana/crunchy_dashboards/", mode: "0640", type: "file", rpm_new: false, owner: "grafana", group: "grafana" } pkg_dependency: - - { pkg_name: "grafana", gte: 9.2.19, lt: 10.0.0 } + - { pkg_name: "pgmonitor-grafana-extras-common" } upstream_repo: "https://github.com/CrunchyData/pgmonitor" - - pg_bloat_check: + + - pg-bloat-check: files: - { source: "pg_bloat_check.py", target: "/usr/bin/pg_bloat_check.py", mode: "0755", type: "file", rpm_new: false, owner: "root", group: "root" } pkg_dependency: - { pkg_name: "psycopg2" } upstream_repo: "https://github.com/keithf4/pg_bloat_check" + # Double-hash (##) stands for PostgreSQL major version. Version matches between pkg_name and dependency package - pgbouncer_fdw##: files: @@ -110,18 +229,3 @@ packages: pkg_dependency: - { pkg_name: "postgresql##-contrib" } upstream_repo: "https://github.com/CrunchyData/pgbouncer_fdw" - - # Double-hash (##) stands for PostgreSQL major version. Version matches between pkg_name and dependency package - - pgmonitor-pg##-extras: - files: - - { source: "postgres_exporter/common/queries_*.yml", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/common/*.sql", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/common/pg##/*", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/linux/queries_*.yml", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg##", target: "/etc/sysconfig/postgres_exporter_pg##", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg##_per_db", target: "/etc/sysconfig/postgres_exporter_pg##_per_db", mode: "0640", type: "file", rpm_new: true, owner: "ccp_monitoring", group: "ccp_monitoring" } - - { source: "postgres_exporter/linux/crontab.txt", target: "/etc/postgres_exporter/##/", mode: "0644", type: "file", rpm_new: false, owner: "ccp_monitoring", group: "ccp_monitoring" } - pkg_dependency: - - { pkg_name: "pgmonitor-pg-common" } - - { pkg_name: "postgresql##-contrib" } - upstream_repo: "https://github.com/CrunchyData/pgmonitor" diff --git a/changelogs/fragments/361.yml b/changelogs/fragments/361.yml new file mode 100644 index 00000000..e005e427 --- /dev/null +++ b/changelogs/fragments/361.yml @@ -0,0 +1,10 @@ +major_changes: + - sql_exporter - Add support for new PostgreSQL metrics collecting exporter: sql_exporter + - sql_exporter - Add support for directly connecting to PgBouncer to collect metrics + - pgmonitor-extension - Add support for using the PostgreSQL pgmonitor-extension to aid in metrics collection with sql_exporter + - pgmonitor-extension - Add more extensive support for materialized views and refreshed tables for expensive or custom metric queries + - postgres_exporter - Note that postgres_exporter is still supported but will be deprecated in a future version + - grafana - New Grafana minimum version is now 10.4. All dashboards have been updated to fix AngularJS deprecation warnings and re-exported from 10.4. + - grafana - Add new dashboards for sql_exporter support. New PostgreSQL Overview and PgBouncer direct metrics dashboards + - grafana - Organize packages to allow better choice of available Grafana dashboards + - grafana - Remove top level general Overview dashboard diff --git a/grafana/common/PGBackrest.json b/grafana/common/PGBackrest.json deleted file mode 100644 index d3b39cdf..00000000 --- a/grafana/common/PGBackrest.json +++ /dev/null @@ -1,604 +0,0 @@ -{ - "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, - "iteration": 1634925357078, - "links": [], - "panels": [ - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "dtdhms" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 11, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 45 - }, - "textMode": "auto" - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "exemplar": true, - "expr": "time()- ccp_backrest_oldest_full_backup_time_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Recovery Window", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 3 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "ccp_backrest_last_incr_backup_time_since_completion_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "incr", - "refId": "A" - }, - { - "exemplar": true, - "expr": "ccp_backrest_last_diff_backup_time_since_completion_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "diff", - "refId": "B" - }, - { - "exemplar": true, - "expr": "ccp_backrest_last_full_backup_time_since_completion_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "full", - "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": [ - { - "$$hashKey": "object:96", - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:97", - "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, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 3 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "ccp_backrest_last_info_backup_runtime_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{backup_type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Last Backup Runtime", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:197", - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:198", - "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, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 11 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "ccp_backrest_last_info_repo_total_size_bytes{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{backup_type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Last Backup Size (Total)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:353", - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:354", - "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, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 11 - }, - "hiddenSeries": false, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "ccp_backrest_last_info_repo_backup_size_bytes{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{backup_type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Last Backup Size (Actual)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:438", - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:439", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "15m", - "schemaVersion": 27, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "echo", - "value": "echo" - }, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_backrest_last_info_backup_runtime_seconds{}, stanza)", - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": "Stanza", - "multi": false, - "name": "backrest_stanza", - "options": [], - "query": { - "query": "label_values(ccp_backrest_last_info_backup_runtime_seconds{}, stanza)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "1", - "value": "1" - }, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_backrest_last_info_backup_runtime_seconds{stanza=\"[[backrest_stanza]]\"}, repo)", - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": "Repo", - "multi": false, - "name": "backrest_repo", - "options": [], - "query": { - "query": "label_values(ccp_backrest_last_info_backup_runtime_seconds{stanza=\"[[backrest_stanza]]\"}, repo)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-2d", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "pgBackRest", - "uid": "QtHwNCrik", - "version": 1 -} diff --git a/grafana/common/PG_Overview.json b/grafana/common/PG_Overview.json deleted file mode 100644 index 99353b6b..00000000 --- a/grafana/common/PG_Overview.json +++ /dev/null @@ -1,445 +0,0 @@ -{ - "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, - "iteration": 1617294517997, - "links": [], - "panels": [ - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "PG Details", - "url": "/d/6jtN_vfiz/postgresql-details?$__all_variables&var-pgcluster=${__field.labels.cluster_name}" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "PRIMARY", - "type": 1, - "value": "0.5" - }, - { - "id": 2, - "op": "=", - "text": "REPLICA", - "type": 1, - "value": "1" - }, - { - "id": 3, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 0 - }, - "id": 1, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 47 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeat": "pgnodes", - "repeatDirection": "h", - "scopedVars": { - "pgnodes": { - "selected": false, - "text": "alpha_ip16_pg1", - "value": "alpha_ip16_pg1" - } - }, - "targets": [ - { - "expr": "pg_up{job=~\"[[pgnodes]]\"} / ccp_is_in_recovery_status{job=~\"[[pgnodes]]\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[pgnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "PG Details", - "url": "/d/6jtN_vfiz/postgresql-details?$__all_variables&var-pgcluster=${__field.labels.cluster_name}" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "PRIMARY", - "type": 1, - "value": "0.5" - }, - { - "id": 2, - "op": "=", - "text": "REPLICA", - "type": 1, - "value": "1" - }, - { - "id": 3, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 0 - }, - "id": 2, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 47 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294517997, - "repeatPanelId": 1, - "scopedVars": { - "pgnodes": { - "selected": false, - "text": "alpha_ip26_pg2", - "value": "alpha_ip26_pg2" - } - }, - "targets": [ - { - "expr": "pg_up{job=~\"[[pgnodes]]\"} / ccp_is_in_recovery_status{job=~\"[[pgnodes]]\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[pgnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "PG Details", - "url": "/d/6jtN_vfiz/postgresql-details?$__all_variables&var-pgcluster=${__field.labels.cluster_name}" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "PRIMARY", - "type": 1, - "value": "0.5" - }, - { - "id": 2, - "op": "=", - "text": "REPLICA", - "type": 1, - "value": "1" - }, - { - "id": 3, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 3, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 47 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294517997, - "repeatPanelId": 1, - "scopedVars": { - "pgnodes": { - "selected": false, - "text": "alpha_ip36_pg3", - "value": "alpha_ip36_pg3" - } - }, - "targets": [ - { - "expr": "pg_up{job=~\"[[pgnodes]]\"} / ccp_is_in_recovery_status{job=~\"[[pgnodes]]\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[pgnodes]]", - "type": "stat" - } - ], - "refresh": "5m", - "schemaVersion": 27, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": "PROMETHEUS", - "definition": "", - "description": null, - "error": null, - "hide": 2, - "includeAll": true, - "label": "PGCluster", - "multi": true, - "name": "pgnodes", - "options": [], - "query": { - "query": "label_values(up{exp_type='pg'}, job)", - "refId": "PROMETHEUS-pgnodes-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "PostgreSQL Overview", - "uid": "pxinDnNik", - "version": 2 -} diff --git a/grafana/common/Prometheus_Alerts.json b/grafana/common/Prometheus_Alerts.json deleted file mode 100644 index 91bffc84..00000000 --- a/grafana/common/Prometheus_Alerts.json +++ /dev/null @@ -1,308 +0,0 @@ -{ - "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": 8, - "links": [], - "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" - }, - { - "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": "number", - "unit": "none" - } - ], - "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": "number", - "unit": "none" - } - ], - "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": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Prometheus Alerts", - "uid": "QTsttxNmk", - "version": 2 -} diff --git a/grafana/linux/crunchy_grafana_dashboards.yml b/grafana/common/crunchy_grafana_dashboards.yml similarity index 100% rename from grafana/linux/crunchy_grafana_dashboards.yml rename to grafana/common/crunchy_grafana_dashboards.yml diff --git a/grafana/common/ETCD_Details.json b/grafana/etcd/ETCD_Details.json similarity index 86% rename from grafana/common/ETCD_Details.json rename to grafana/etcd/ETCD_Details.json index 70c9c3b9..5bec8f63 100644 --- a/grafana/common/ETCD_Details.json +++ b/grafana/etcd/ETCD_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -23,8 +26,7 @@ "fiscalYearStartMonth": 0, "gnetId": 15308, "graphTooltip": 0, - "id": 17, - "iteration": 1652279079766, + "id": 16, "links": [ { "asDropdown": true, @@ -45,6 +47,10 @@ "panels": [ { "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "gridPos": { "h": 1, "w": 24, @@ -53,10 +59,23 @@ }, "id": 88, "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "refId": "A" + } + ], "title": "Status", "type": "row" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { @@ -123,10 +142,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "8.3.7", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -143,10 +164,13 @@ } ], "title": "Has Leader", - "transformations": [], "type": "stat" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "description": "", "fieldConfig": { "defaults": { @@ -155,7 +179,10 @@ }, "custom": { "align": "center", - "displayMode": "auto" + "cellOptions": { + "type": "auto" + }, + "inspect": false }, "decimals": 2, "displayName": "", @@ -191,8 +218,11 @@ "value": 2 }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -239,8 +269,10 @@ "value": 2 }, { - "id": "custom.displayMode", - "value": "auto" + "id": "custom.cellOptions", + "value": { + "type": "auto" + } }, { "id": "custom.width", @@ -286,8 +318,11 @@ "value": 2 }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -330,8 +365,11 @@ "value": 2 }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -386,8 +424,11 @@ ] }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "custom.width", @@ -455,8 +496,11 @@ ] }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "custom.width", @@ -505,10 +549,11 @@ "y": 1 }, "id": 74, - "links": [], "maxDataPoints": 100, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -518,7 +563,7 @@ "showHeader": true, "sortBy": [] }, - "pluginVersion": "8.3.7", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -713,6 +758,10 @@ "type": "table" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "description": "", "fieldConfig": { "defaults": { @@ -781,10 +830,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "8.3.7", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -800,10 +851,13 @@ } ], "title": "Leader Changes", - "transformations": [], "type": "stat" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "description": "", "fieldConfig": { "defaults": { @@ -872,10 +926,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "8.3.7", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -892,11 +948,14 @@ } ], "title": "Failed Proposals", - "transformations": [], "type": "stat" }, { "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "gridPos": { "h": 1, "w": 24, @@ -905,16 +964,32 @@ }, "id": 95, "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "refId": "A" + } + ], "title": "Traffic", "type": "row" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -926,6 +1001,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -967,15 +1043,16 @@ "y": 8 }, "id": 22, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1000,12 +1077,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1017,6 +1101,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1058,15 +1143,16 @@ "y": 8 }, "id": 21, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1091,12 +1177,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1108,6 +1201,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1149,15 +1243,16 @@ "y": 8 }, "id": 20, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1182,12 +1277,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1199,6 +1301,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1240,15 +1343,16 @@ "y": 8 }, "id": 16, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1275,6 +1379,10 @@ }, { "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "gridPos": { "h": 1, "w": 24, @@ -1283,16 +1391,32 @@ }, "id": 97, "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "refId": "A" + } + ], "title": "Keys", "type": "row" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1304,6 +1428,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1345,17 +1470,18 @@ "y": 16 }, "id": 58, - "links": [], "options": { "legend": { "calcs": [ "lastNotNull" ], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1378,12 +1504,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1395,6 +1528,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1436,15 +1570,16 @@ "y": 16 }, "id": 52, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1476,12 +1611,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1493,6 +1635,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1534,15 +1677,16 @@ "y": 16 }, "id": 48, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1566,6 +1710,10 @@ }, { "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "gridPos": { "h": 1, "w": 24, @@ -1574,16 +1722,32 @@ }, "id": 76, "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "refId": "A" + } + ], "title": "General Info", "type": "row" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1595,6 +1759,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1636,15 +1801,16 @@ "y": 24 }, "id": 29, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1669,12 +1835,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1686,6 +1859,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1727,17 +1901,18 @@ "y": 24 }, "id": 1, - "links": [], "options": { "legend": { "calcs": [ "lastNotNull" ], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1776,12 +1951,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1793,6 +1975,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1835,15 +2018,16 @@ "y": 31 }, "id": 7, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1881,12 +2065,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1898,6 +2089,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1939,17 +2131,18 @@ "y": 31 }, "id": 3, - "links": [], "options": { "legend": { "calcs": [ "lastNotNull" ], "displayMode": "table", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -1986,12 +2179,19 @@ "type": "timeseries" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2003,6 +2203,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2044,17 +2245,18 @@ "y": 31 }, "id": 60, - "links": [], "options": { "legend": { "calcs": [ "lastNotNull" ], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", @@ -2096,6 +2298,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2107,6 +2312,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2148,22 +2354,27 @@ "y": 31 }, "id": 62, - "links": [], "options": { "legend": { "calcs": [ "lastNotNull" ], "displayMode": "table", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "etcd_server_slow_apply_total{exp_type=\"etcd\",job=~\"$job\"}", "format": "time_series", @@ -2173,6 +2384,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "etcd_server_slow_read_indexes_total{exp_type=\"etcd\",job=~\"$job\"}", "format": "time_series", @@ -2196,6 +2411,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2207,6 +2425,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2248,20 +2467,25 @@ "y": 41 }, "id": 56, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "rate(etcd_disk_backend_defrag_duration_seconds_sum{exp_type=\"etcd\",job=~\"$job\"}[1m])", "format": "time_series", @@ -2286,6 +2510,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2297,6 +2524,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2338,20 +2566,25 @@ "y": 41 }, "id": 9, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "sum(rate(etcd_debugging_snap_save_total_duration_seconds_sum{exp_type=\"etcd\",job=~\"$job\"}[1m]))", "format": "time_series", @@ -2376,6 +2609,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2387,6 +2623,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2428,20 +2665,25 @@ "y": 41 }, "id": 40, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(rate(etcd_server_proposals_failed_total{exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -2451,6 +2693,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(etcd_server_proposals_pending{exp_type=\"etcd\",job=~\"$job\"})", "format": "time_series", "intervalFactor": 2, @@ -2460,6 +2706,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(rate(etcd_server_proposals_committed_total{exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -2469,6 +2719,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(rate(etcd_server_proposals_applied_total{exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -2491,6 +2745,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2502,6 +2759,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2543,20 +2801,25 @@ "y": 41 }, "id": 41, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(grpc_server_started_total{grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\",exp_type=\"etcd\",job=~\"$job\"}) - sum(grpc_server_handled_total{grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\",exp_type=\"etcd\",job=~\"$job\"})", "format": "time_series", "intervalFactor": 2, @@ -2566,6 +2829,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(grpc_server_started_total{grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\",exp_type=\"etcd\",job=~\"$job\"}) - sum(grpc_server_handled_total{grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\",exp_type=\"etcd\",job=~\"$job\"})", "format": "time_series", "intervalFactor": 2, @@ -2589,6 +2856,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2600,6 +2870,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2641,20 +2912,25 @@ "y": 47 }, "id": 54, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "rate(etcd_debugging_mvcc_db_compaction_keys_total{exp_type=\"etcd\",job=~\"$job\"}[5m])", "format": "time_series", @@ -2678,6 +2954,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2689,6 +2968,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2730,20 +3010,25 @@ "y": 47 }, "id": 19, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "changes(etcd_server_leader_changes_seen_total{exp_type=\"etcd\",job=~\"$job\"}[1d])", "format": "time_series", @@ -2770,6 +3055,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2781,6 +3069,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2822,20 +3111,25 @@ "y": 47 }, "id": 5, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "sum(etcd_server_proposals_pending{exp_type=\"etcd\",job=~\"$job\"})", "format": "time_series", @@ -2861,6 +3155,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2872,6 +3169,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -2913,7 +3211,6 @@ "y": 47 }, "id": 2, - "links": [], "options": { "legend": { "calcs": [ @@ -2922,15 +3219,21 @@ "max" ], "displayMode": "table", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "sum(rate(etcd_server_proposals_committed_total{exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", @@ -2942,6 +3245,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "sum(rate(etcd_server_proposals_applied_total{exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", @@ -2967,6 +3274,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2978,6 +3288,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -3019,20 +3330,25 @@ "y": 53 }, "id": 23, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(rate(grpc_server_started_total{grpc_type=\"unary\",exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -3042,6 +3358,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(rate(grpc_server_handled_total{grpc_type=\"unary\",grpc_code!=\"OK\",exp_type=\"etcd\",job=~\"$job\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -3065,6 +3385,9 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -3076,6 +3399,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -3117,20 +3441,25 @@ "y": 53 }, "id": 8, - "links": [], "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "multi" + "mode": "multi", + "sort": "none" } }, "pluginVersion": "8.2.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "sum(rate(etcd_network_client_grpc_received_bytes_total{exp_type=\"etcd\",job=~\"$job\"}[1m]))", "format": "time_series", @@ -3141,6 +3470,10 @@ "step": 30 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "exemplar": true, "expr": "sum(rate(etcd_network_client_grpc_sent_bytes_total{exp_type=\"etcd\",job=~\"$job\"}[1m]))", "format": "time_series", @@ -3156,8 +3489,7 @@ } ], "refresh": "1m", - "schemaVersion": 34, - "style": "dark", + "schemaVersion": 39, "tags": [ "etcd", "prometheus" @@ -3174,6 +3506,10 @@ "ip11_etcd1" ] }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "definition": "label_values(up{exp_type='etcd'},job)", "hide": 0, "includeAll": true, @@ -3225,6 +3561,6 @@ "timezone": "browser", "title": "ETCD Details", "uid": "wsdkI9RZz", - "version": 4, + "version": 1, "weekStart": "" } diff --git a/grafana/linux/Filesystem_Details.json b/grafana/linux/Filesystem_Details.json index 5c1f025a..b99b9930 100644 --- a/grafana/linux/Filesystem_Details.json +++ b/grafana/linux/Filesystem_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,55 +16,97 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 3, - "iteration": 1582574806450, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "fill": 1, - "fillGradient": 0, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 0 }, - "height": "250px", - "hiddenSeries": false, "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "100-(100*(node_filesystem_free_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} / node_filesystem_size_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}))", "format": "time_series", "intervalFactor": 2, @@ -69,6 +114,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "100-(100*(node_filesystem_free{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} / node_filesystem_size{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}))", "format": "time_series", "intervalFactor": 2, @@ -76,90 +125,96 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Filesystem Usage %", - "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 - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "fill": 1, - "fillGradient": 0, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 0 }, - "height": "250px", - "hiddenSeries": false, "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_filesystem_size_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} - node_filesystem_free_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}", "format": "time_series", "intervalFactor": 2, @@ -167,6 +222,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_filesystem_size{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} - node_filesystem_free{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}", "format": "time_series", "intervalFactor": 2, @@ -174,95 +233,109 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Filesystem Space Used", - "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": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "fill": 1, - "fillGradient": 0, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "IO/second read (-) / write (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*_read$/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 7 }, - "height": "250px", - "hiddenSeries": false, "id": 1, - "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": "/.*_read$/", - "transform": "negative-Y" + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_reads_completed_total{job=~\"[[osnodes]]\"}[5m])", "format": "time_series", "intervalFactor": 4, @@ -270,6 +343,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_writes_completed_total{job=~\"[[osnodes]]\"}[5m])", "format": "time_series", "intervalFactor": 4, @@ -277,6 +354,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_reads_completed{job=~\"[[osnodes]]\"}[5m])", "format": "time_series", "intervalFactor": 4, @@ -284,6 +365,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_writes_completed{job=~\"[[osnodes]]\"}[5m])", "format": "time_series", "intervalFactor": 4, @@ -291,94 +376,109 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Disk IO Per Device [5m]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "IO/second read (-) / write (+)", - "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 - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "fill": 1, - "fillGradient": 0, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Bytes/second read (-) / write (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*_read/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 14 }, - "hiddenSeries": false, "id": 4, - "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": "/.*_read/", - "transform": "negative-Y" + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_read_bytes_total{job=~\"[[osnodes]]\"}[5m]) * 512", "format": "time_series", "intervalFactor": 4, @@ -386,6 +486,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_written_bytes_total{job=~\"[[osnodes]]\"}[5m]) * 512", "format": "time_series", "intervalFactor": 2, @@ -393,6 +497,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_sectors_read{job=~\"[[osnodes]]\"}[5m]) * 512", "format": "time_series", "intervalFactor": 4, @@ -400,6 +508,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_sectors_written{job=~\"[[osnodes]]\"}[5m]) * 512", "format": "time_series", "intervalFactor": 2, @@ -407,89 +519,96 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Disk Throughput Per Device [5m]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "Bytes/second read (-) / write (+)", - "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 - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 21 }, - "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": [] + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "irate(node_disk_io_time_seconds_total{job=~\"[[osnodes]]\"}[5m])", "format": "time_series", "intervalFactor": 1, @@ -497,61 +616,25 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "IO Time Per Device in Seconds [5m]", - "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": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 21, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allValue": null, "current": { - "text": "pg1", - "value": "pg1" + "selected": false, + "text": "ip11_etcd1", + "value": "ip11_etcd1" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "", "hide": 0, "includeAll": false, @@ -565,7 +648,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -592,5 +674,6 @@ "timezone": "", "title": "Filesystem Details", "uid": "g8iVvnHmz", - "version": 2 + "version": 1, + "weekStart": "" } diff --git a/grafana/linux/Network_Details.json b/grafana/linux/Network_Details.json index 4b43d910..ab576792 100644 --- a/grafana/linux/Network_Details.json +++ b/grafana/linux/Network_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -14,62 +17,98 @@ }, "description": "", "editable": false, + "fiscalYearStartMonth": 0, "gnetId": 1856, "graphTooltip": 0, - "id": 17, - "iteration": 1614015359479, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 29, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load1{job=~\"[[osnodes]]\"}", "format": "time_series", "interval": "", @@ -78,6 +117,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load5{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -85,6 +128,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load15{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -92,106 +139,114 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "System Load", - "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 - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "editable": true, - "error": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "bits in (-) / bits out (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*in/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 7 }, - "hiddenSeries": false, "id": 12, - "legend": { - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [ - { - "alias": "/.*in/", - "transform": "negative-Y" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_network_receive_bytes_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[3m]))", "interval": "", "intervalFactor": 2, @@ -202,6 +257,10 @@ "target": "" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_network_transmit_bytes_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[3m]))", "interval": "", "intervalFactor": 2, @@ -210,106 +269,114 @@ "step": 60 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network Traffic", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "bits in (-) / bits out (+)", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "editable": true, - "error": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "bits in (-) / bits out (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*in/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 7 }, - "hiddenSeries": false, "id": 25, - "legend": { - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": true, - "values": true - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 1, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [ - { - "alias": "/.*in/", - "transform": "negative-Y" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "sum" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(increase(node_network_receive_bytes_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[1m]))", "interval": "5m", "intervalFactor": 2, @@ -320,6 +387,10 @@ "target": "" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(increase(node_network_transmit_bytes_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[1m]))", "hide": false, "interval": "5m", @@ -329,118 +400,80 @@ "step": 600 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network Utillization", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "bits in (-) / bits out (+)", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "PROMETHEUS", - "decimals": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" }, "overrides": [] }, - "format": "decbytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 5, "w": 12, "x": 0, "y": 14 }, - "height": "200px", "hideTimeOverride": false, "id": 26, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "repeat": null, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "max" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(increase(node_network_receive_bytes_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[24h]))", "interval": "", "intervalFactor": 2, @@ -449,90 +482,79 @@ "step": 600 } ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, "title": "Traffic In", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "max" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, "overrides": [] }, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 5, "w": 12, "x": 12, "y": 14 }, - "height": "200px", "id": 27, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "repeat": null, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "max" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(increase(node_network_transmit_bytes_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[24h]))", "interval": "", "intervalFactor": 2, @@ -541,175 +563,201 @@ "step": 600 } ], - "thresholds": "", - "timeFrom": null, "title": "Traffic Out", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "max" + "type": "stat" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 19 }, - "hiddenSeries": false, "id": 31, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_network_receive_drop_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[3m]))", "interval": "", "legendFormat": "Dropped", "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_network_receive_errs_total{device=~\"[[network_device]]\",job=~\"[[osnodes]]\"}[3m]))", "interval": "", "legendFormat": "Errors", "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network Errors/Dropped Packets", - "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 - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "editable": true, - "error": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 24 }, - "hiddenSeries": false, "id": 21, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Tcp_CurrEstab{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -720,6 +768,10 @@ "target": "" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Tcp_ActiveOpens{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -729,6 +781,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Tcp_PassiveOpens{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -738,6 +794,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Tcp_EstabResets{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -747,6 +807,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Tcp_AttemptFails{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -756,6 +820,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Tcp_RetransSegs{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -765,109 +833,109 @@ "step": 40 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Netstat: TCP", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "editable": true, - "error": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*Out.*/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 31 }, - "hiddenSeries": false, "id": 23, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [ - { - "alias": "/.*Out.*/", - "transform": "negative-Y" + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "Udp_NoPorts", - "yaxis": 2 + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_InDatagrams{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -878,6 +946,10 @@ "target": "" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_InErrors{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -887,6 +959,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_OutDatagrams{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -896,6 +972,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_NoPorts{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -905,6 +985,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_InCsumErrors{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -914,6 +998,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_RcvbufErrors{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -923,6 +1011,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(irate(node_netstat_Udp_SndbufErrors{job=~\"[[osnodes]]\"}[5m]))", "interval": "", "intervalFactor": 2, @@ -932,100 +1024,96 @@ "step": 40 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Netstat: UDP", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", - "editable": true, - "error": false, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 38 }, - "hiddenSeries": false, "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(node_nf_conntrack_entries_limit{job=~\"[[osnodes]]\"}) - sum(node_nf_conntrack_entries{job=~\"[[osnodes]]\"})", "interval": "", "intervalFactor": 2, @@ -1036,6 +1124,10 @@ "target": "" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(node_nf_conntrack_entries_limit{job=~\"[[osnodes]]\"})", "interval": "", "intervalFactor": 2, @@ -1045,66 +1137,28 @@ "step": 40 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Conntrack", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": false, - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allValue": null, "current": { "selected": false, - "text": "Common Node", - "value": "Common Node" + "text": "ip11_etcd1", + "value": "ip11_etcd1" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(up{exp_type='node'}, job)", - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "osnodes", "options": [], @@ -1114,24 +1168,23 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": true, - "text": "enp0s8", - "value": "enp0s8" + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(node_network_receive_bytes_total, device)", - "error": null, "hide": 0, "includeAll": true, - "label": null, "multi": false, "name": "network_device", "options": [], @@ -1141,7 +1194,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1169,5 +1221,6 @@ "timezone": "browser", "title": "Network Details", "uid": "MBRTkBRZk", - "version": 5 + "version": 1, + "weekStart": "" } diff --git a/grafana/linux/OS_Details.json b/grafana/linux/OS_Details.json index 325c46ae..a5f4d1e6 100644 --- a/grafana/linux/OS_Details.json +++ b/grafana/linux/OS_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,19 +16,20 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "iteration": 1618265425340, "links": [], "panels": [ { - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -47,6 +51,9 @@ }, "id": 12, "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" @@ -56,72 +63,112 @@ }, "showThresholdLabels": false, "showThresholdMarkers": false, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load5{job=~\"[[osnodes]]\"}", "interval": "", "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "System Load (5m)", "type": "gauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 10, "x": 4, "y": 0 }, - "hiddenSeries": false, "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load1{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -129,6 +176,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load5{job=~\"[[osnodes]]\"}", "format": "time_series", "interval": "", @@ -137,6 +188,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_load15{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -144,99 +199,98 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "System Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:182", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:183", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 60, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 6, - "fillGradient": 0, "gridPos": { "h": 7, "w": 10, "x": 14, "y": 0 }, - "hiddenSeries": false, "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": true, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode=\"idle\", job=~\"[[osnodes]]\"}[5m]))", "format": "time_series", "intervalFactor": 1, @@ -244,6 +298,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode=\"user\", job=~\"[[osnodes]]\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -251,6 +309,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode=\"iowait\", job=~\"[[osnodes]]\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -258,6 +320,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum by (mode)(irate(node_cpu_seconds_total{mode=\"system\", job=~\"[[osnodes]]\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -265,58 +331,22 @@ "refId": "E" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:92", - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "$$hashKey": "object:93", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [], + "max": 1, + "min": 0, "thresholds": { "mode": "percentage", "steps": [ @@ -346,6 +376,8 @@ }, "id": 14, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "auto", "reduceOptions": { "calcs": [ @@ -356,72 +388,112 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_MemAvailable_bytes{job=~\"[[osnodes]]\"} / node_memory_MemTotal_bytes{job=~\"[[osnodes]]\"}", "interval": "", "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Available Memory", "type": "gauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 20, "x": 4, "y": 7 }, - "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": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_MemTotal_bytes{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -429,6 +501,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_MemTotal_bytes{job=~\"[[osnodes]]\"} - node_memory_MemAvailable_bytes{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -436,6 +512,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_Cached_bytes{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 1, @@ -443,56 +523,22 @@ "refId": "C" } ], - "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": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [], + "max": 1, + "min": 0, "thresholds": { "mode": "percentage", "steps": [ @@ -522,6 +568,9 @@ }, "id": 16, "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" @@ -531,11 +580,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "1 - (node_memory_SwapFree_bytes{job=~\"[[osnodes]]\"} / node_memory_SwapTotal_bytes{job=~\"[[osnodes]]\"})", "interval": "", "legendFormat": "", @@ -546,55 +600,92 @@ "type": "gauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 20, "x": 4, "y": 14 }, - "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": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_SwapTotal_bytes{job=~\"[[osnodes]]\"} ", "format": "time_series", "intervalFactor": 2, @@ -602,6 +693,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_SwapTotal_bytes{job=~\"[[osnodes]]\"} - node_memory_SwapFree_bytes{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 2, @@ -609,6 +704,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "node_memory_SwapCached_bytes{job=~\"[[osnodes]]\"}", "format": "time_series", "intervalFactor": 2, @@ -616,56 +715,22 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Swap", - "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": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "percentage", "steps": [ @@ -696,6 +761,10 @@ "id": 17, "options": { "displayMode": "gradient", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ @@ -705,11 +774,17 @@ "values": false }, "showUnfilled": true, - "text": {} + "sizing": "auto", + "text": {}, + "valueMode": "color" }, - "pluginVersion": "7.4.5", + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "100 - 100 * sum(node_filesystem_free_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} / node_filesystem_size_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}) BY (job,device,mountpoint)", "interval": "", "legendFormat": "{{mountpoint}}", @@ -720,60 +795,100 @@ "type": "bargauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 20, "x": 4, "y": 21 }, - "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": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "100-(100*(node_filesystem_free_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} / node_filesystem_size_bytes{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}))", "format": "time_series", "interval": "", @@ -782,6 +897,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "100-(100*(node_filesystem_free{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"} / node_filesystem_size{job=~\"[[osnodes]]\", fstype!~\".*tmpfs.*|.*root.*|.*pipe.*\"}))", "format": "time_series", "intervalFactor": 2, @@ -789,67 +908,26 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "FileSystem Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:528", - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "$$hashKey": "object:529", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allValue": null, "current": { "selected": false, "text": "ip16_pg1", "value": "ip16_pg1" }, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "definition": "", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "Node", @@ -865,7 +943,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -892,5 +969,6 @@ "timezone": "browser", "title": "OS Details", "uid": "4t6SO2Fik", - "version": 3 + "version": 1, + "weekStart": "" } diff --git a/grafana/linux/OS_Overview.json b/grafana/linux/OS_Overview.json index 6aa66f84..7ec31e52 100644 --- a/grafana/linux/OS_Overview.json +++ b/grafana/linux/OS_Overview.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,20 +16,21 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "iteration": 1617294779945, + "id": 18, "links": [], "panels": [ { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "links": [ { "targetBlank": true, @@ -36,25 +40,24 @@ ], "mappings": [ { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" }, { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" + "options": { + "match": "null", + "result": { + "text": "DOWN" + } + }, + "type": "special" } ], "thresholds": { @@ -85,8 +88,6 @@ "y": 0 }, "id": 1, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", @@ -100,249 +101,22 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": { "valueSize": 50 }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "10.4.2", "repeat": "osnodes", "repeatDirection": "h", - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip11_etcd1", - "value": "ip11_etcd1" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 2, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip12_haproxy1", - "value": "ip12_haproxy1" - } - }, "targets": [ { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 3, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip13_pgbouncer1", - "value": "ip13_pgbouncer1" - } - }, - "targets": [ - { "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", "format": "time_series", "interval": "", @@ -355,820 +129,28 @@ ], "title": "[[osnodes]]", "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 4, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } + ], + "refresh": "5m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": [ + "All" ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 + "value": [ + "$__all" + ] }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip14_pgmonitor1", - "value": "ip14_pgmonitor1" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 4 - }, - "id": 5, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip15_backrest1", - "value": "ip15_backrest1" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 4 - }, - "id": 6, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip16_pg1", - "value": "ip16_pg1" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 4 - }, - "id": 7, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip21_etcd2", - "value": "ip21_etcd2" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 4 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip26_pg2", - "value": "ip26_pg2" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 8 - }, - "id": 9, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip31_etcd3", - "value": "ip31_etcd3" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "links": [ - { - "targetBlank": true, - "title": "OS Details", - "url": "/d/4t6SO2Fik/os-details?$__all_variables" - } - ], - "mappings": [ - { - "id": 0, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "null" - }, - { - "id": 1, - "op": "=", - "text": "UP", - "type": 1, - "value": "1" - }, - { - "id": 2, - "op": "=", - "text": "DOWN", - "type": 1, - "value": "0" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(68, 126, 188, 0.9)", - "value": 0.5 - }, - { - "color": "rgba(50, 172, 45, 0.9)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 10, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 50 - }, - "textMode": "auto" - }, - "pluginVersion": "7.4.5", - "repeatDirection": "h", - "repeatIteration": 1617294779945, - "repeatPanelId": 1, - "scopedVars": { - "osnodes": { - "selected": false, - "text": "ip36_pg3", - "value": "ip36_pg3" - } - }, - "targets": [ - { - "expr": "up{job=~\"[[osnodes]]\", exp_type=\"node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "up", - "refId": "A", - "step": 2 - } - ], - "title": "[[osnodes]]", - "type": "stat" - } - ], - "refresh": "5m", - "schemaVersion": 27, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "", - "description": null, - "error": null, "hide": 2, "includeAll": true, "label": "Node", @@ -1184,7 +166,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1211,5 +192,6 @@ "timezone": "browser", "title": "OS Overview", "uid": "pxinDnKik", - "version": 2 + "version": 1, + "weekStart": "" } diff --git a/grafana/linux/Overview.json b/grafana/linux/Overview.json deleted file mode 100644 index 7d23d206..00000000 --- a/grafana/linux/Overview.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "id": 15, - "links": [], - "panels": [ - { - "content": "\n
\n
\n
\n\n
\">OS
\n\n\n\n\n\n", - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 7, - "links": [], - "mode": "html", - "options": { - "content": "\n
\n
\n
\n\n
\">OS
\n\n\n\n\n\n", - "mode": "html" - }, - "pluginVersion": "7.1.0", - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "text" - }, - { - "content": "\n
\n
\n
\n\n
\">PostgreSQL
\n\n\n\n\n\n", - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 8, - "links": [], - "mode": "html", - "options": { - "content": "\n
\n
\n
\n\n
\">PostgreSQL
\n\n\n\n\n\n", - "mode": "html" - }, - "pluginVersion": "7.1.0", - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "text" - }, - { - "content": "\n
\n
\n
\n\n
\">etcd
\n\n\n\n\n\n", - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 7 - }, - "id": 9, - "links": [], - "mode": "html", - "options": { - "content": "\n
\n
\n
\n\n
\">etcd
\n\n\n\n\n\n", - "mode": "html" - }, - "pluginVersion": "7.1.0", - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "text" - }, - { - "content": "\n
\n
\n
\n\n
\">Prometheus
\n\n\n\n\n\n", - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 7 - }, - "id": 10, - "links": [], - "mode": "html", - "options": { - "content": "\n
\n
\n
\n\n
\">Prometheus
Alerts
\n\n\n\n\n\n", - "mode": "html" - }, - "pluginVersion": "7.1.0", - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "text" - } - ], - "refresh": false, - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview", - "uid": "VhzrGq2Wk", - "version": 1 -} diff --git a/grafana/pgbouncer/direct/PGBouncer_direct.json b/grafana/pgbouncer/direct/PGBouncer_direct.json new file mode 100644 index 00000000..62314d5c --- /dev/null +++ b/grafana/pgbouncer/direct/PGBouncer_direct.json @@ -0,0 +1,693 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": false, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 27, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.15", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_client_active{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "client_active", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_client_waiting{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "client_waiting", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_server_active{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "server_active", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_server_idle{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "server_idle", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_server_used{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "server_used", + "range": true, + "refId": "E" + } + ], + "title": "PGBouncer Total State Counts", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.15", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "ccp_pgbouncer_lists_item_count{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{list}}", + "range": true, + "refId": "A" + } + ], + "title": "PGBouncer Total Item Counts", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 0, + "y": 10 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.15", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "ccp_pgbouncer_databases_current_connections{cluster_name=~\"[[cluster_name]]\", job=~\"[[pgbnode]]\", name=~\"[[pool]]\"} / ccp_pgbouncer_databases_pool_size{cluster_name=~\"[[cluster_name]]\", job=~\"[[pgbnode]]\", name=~\"[[pool]]\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "Connection % Used Per Pool ([[pool]])", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 8, + "y": 10 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.15", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_clients_wait_seconds{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\", database=~\"[[pool]]\"}) by (pool,state)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pool}}", + "range": true, + "refId": "A" + } + ], + "title": "Client Connection State Counts Per Pool ([[pool]])", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 16, + "y": 10 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.15", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_servers_close_needed{cluster_name=~\"[[cluster_name]]\",job=~\"[[pgbnode]]\", database=~\"[[pool]]\"}) by (state)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Server Connection State Counts Per Pool ([[pool]])", + "type": "timeseries" + } + ], + "refresh": "15m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "hotel", + "value": "hotel" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(up{exp_type='pgbouncer'},cluster_name)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster_name", + "options": [], + "query": { + "query": "label_values(up{exp_type='pgbouncer'},cluster_name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "ip13_pgbouncer1_bouncer", + "value": "ip13_pgbouncer1_bouncer" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(up{exp_type='pgbouncer'},job)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "pgbnode", + "options": [], + "query": { + "query": "label_values(up{exp_type='pgbouncer'},job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(ccp_pgbouncer_databases_pool_size{cluster_name=\"[[cluster_name]]\", job=\"[[pgbnode]]\"},name)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "pool", + "options": [], + "query": { + "query": "label_values(ccp_pgbouncer_databases_pool_size{cluster_name=\"[[cluster_name]]\", job=\"[[pgbnode]]\"},name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "PGBouncer (direct)", + "uid": "a7ff3775-37c9-4072-b0bc-1292f5c5841b", + "version": 1, + "weekStart": "" +} diff --git a/grafana/common/PGBouncer.json b/grafana/pgbouncer/fdw/PGBouncer_fdw.json similarity index 53% rename from grafana/common/PGBouncer.json rename to grafana/pgbouncer/fdw/PGBouncer_fdw.json index a45e8c78..adaed59d 100644 --- a/grafana/common/PGBouncer.json +++ b/grafana/pgbouncer/fdw/PGBouncer_fdw.json @@ -28,55 +28,86 @@ "liveNow": false, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 10, "w": 8, "x": 0, "y": 0 }, - "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": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.2.19", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -92,86 +123,90 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Connection % Used", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 10, "w": 8, "x": 8, "y": 0 }, - "hiddenSeries": false, "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.2.19", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -239,86 +274,90 @@ "refId": "E" } ], - "thresholds": [], - "timeRegions": [], "title": "PGBouncer Total State Counts", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 10, "w": 8, "x": 16, "y": 0 }, - "hiddenSeries": false, "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.2.19", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -334,86 +373,90 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "PGBouncer Item Counts", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 10 }, - "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": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.2.19", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -429,86 +472,90 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Client Connection Counts Per Pool - [[cluster_name]] - [[pgbouncer_target_host]] - [[conn_pool]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 10 }, - "hiddenSeries": false, "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.2.19", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -524,49 +571,20 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Server Connection Counts Per Pool - [[cluster_name]] - [[pgbouncer_target_host]] - [[conn_pool]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 37, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { "current": { - "isNone": true, "selected": false, - "text": "None", - "value": "" + "text": "hotel", + "value": "hotel" }, "datasource": { "type": "prometheus", @@ -590,10 +608,9 @@ }, { "current": { - "isNone": true, "selected": false, - "text": "None", - "value": "" + "text": "192.168.122.13", + "value": "192.168.122.13" }, "datasource": { "type": "prometheus", @@ -617,10 +634,9 @@ }, { "current": { - "isNone": true, - "selected": false, - "text": "None", - "value": "" + "selected": true, + "text": "pgbouncer.pgbouncer", + "value": "pgbouncer.pgbouncer" }, "datasource": { "type": "prometheus", @@ -649,7 +665,7 @@ ] }, "time": { - "from": "now-2d", + "from": "now-15m", "to": "now" }, "timepicker": { @@ -668,6 +684,6 @@ "timezone": "", "title": "PGBouncer", "uid": "H4OOvdVWz", - "version": 2, + "version": 1, "weekStart": "" } diff --git a/grafana/common/Bloat_Details.json b/grafana/postgres/Bloat_Details.json similarity index 50% rename from grafana/common/Bloat_Details.json rename to grafana/postgres/Bloat_Details.json index 0b6efcfb..0830894c 100644 --- a/grafana/common/Bloat_Details.json +++ b/grafana/postgres/Bloat_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,61 +16,97 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "iteration": 1618857609712, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 43, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "sum(ccp_bloat_check_total_wasted_space_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\"})/sum(ccp_bloat_check_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\"})*100", "format": "time_series", "hide": false, @@ -77,101 +116,101 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Total Bloat %", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:117", - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:118", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 5 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "ccp_bloat_check_total_wasted_space_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=\"[[pgdatabase]]\", schemaname=\"[[schemaname]]\",objectname=\"[[objectname]]\"}", "format": "time_series", "interval": "", @@ -181,101 +220,101 @@ "step": 60 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Bloat Per Table", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:202", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:203", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 12, "w": 24, "x": 0, "y": 15 }, - "hiddenSeries": false, "id": 1, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max", + "min", + "sum" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "ccp_bloat_check_total_wasted_space_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=\"[[pgdatabase]]\"} > 10240", "format": "time_series", "interval": "", @@ -285,79 +324,32 @@ "step": 60 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Top N Bloated Tables > 10kB", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:289", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:290", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allValue": null, "current": { "selected": false, - "text": "crunchy", - "value": "crunchy" + "text": "hotel", + "value": "hotel" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": null, "definition": "label_values(up{exp_type='pg'}, cluster_name)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "PGCluster", "multi": false, "name": "pgcluster", - "options": [ - { - "selected": true, - "text": "crunchy", - "value": "crunchy" - } - ], + "options": [], "query": { "query": "label_values(up{exp_type='pg'}, cluster_name)", "refId": "StandardVariableQuery" @@ -367,22 +359,21 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": true, - "text": "crunchy_pg1_crunchy", - "value": "crunchy_pg1_crunchy" + "selected": false, + "text": "hotel_ip16_pg1", + "value": "hotel_ip16_pg1" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(up{exp_type='pg', cluster_name=\"[[pgcluster]]\"}, job)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "Node", @@ -398,22 +389,21 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, - "text": "testdb", - "value": "testdb" + "text": "charlie", + "value": "charlie" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(ccp_bloat_check_total_wasted_space_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\"},dbname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "PGDatabase", @@ -429,25 +419,23 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, "text": "information_schema", "value": "information_schema" }, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "definition": "label_values(ccp_bloat_check_total_wasted_space_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\"},schemaname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "schemaname", "options": [], @@ -460,25 +448,23 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, "text": "sql_features", "value": "sql_features" }, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "definition": "label_values(ccp_bloat_check_total_wasted_space_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\",schemaname=\"[[schemaname]]\"}, objectname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "objectname", "options": [], @@ -491,7 +477,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -518,5 +503,6 @@ "timezone": "browser", "title": "Bloat Details", "uid": "Sa8VDnNmz", - "version": 2 + "version": 1, + "weekStart": "" } diff --git a/grafana/common/CRUD_Details.json b/grafana/postgres/CRUD_Details.json similarity index 65% rename from grafana/common/CRUD_Details.json rename to grafana/postgres/CRUD_Details.json index c181a796..86c2488a 100644 --- a/grafana/common/CRUD_Details.json +++ b/grafana/postgres/CRUD_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,61 +16,97 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "iteration": 1618857086778, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "rate(ccp_stat_user_tables_n_tup_ins{cluster_name=\"[[pgcluster]]\", job=~\"[[pgnodes]]\", dbname = \"[[pgdatabase]]\", schemaname = \"[[schemaname]]\", relname=\"[[tablename]]\"}[60s])", "format": "time_series", "interval": "", @@ -77,6 +116,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "rate(ccp_stat_user_tables_n_tup_upd{cluster_name=\"[[pgcluster]]\", job=~\"[[pgnodes]]\", dbname = \"[[pgdatabase]]\", schemaname = \"[[schemaname]]\", relname=\"[[tablename]]\"}[60s])", "format": "time_series", "interval": "", @@ -86,6 +129,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "expr": "rate(ccp_stat_user_tables_n_tup_del{cluster_name=\"[[pgcluster]]\", job=~\"[[pgnodes]]\", dbname = \"[[pgdatabase]]\", schemaname = \"[[schemaname]]\", relname=\"[[tablename]]\"}[60s])", "format": "time_series", "interval": "", @@ -95,67 +142,26 @@ "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": [ - { - "$$hashKey": "object:366", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:367", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allValue": null, "current": { "selected": false, - "text": "crunchy", - "value": "crunchy" + "text": "hotel", + "value": "hotel" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(up{exp_type='pg'}, cluster_name)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "PGCluster", @@ -171,22 +177,21 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, - "text": "crunchy_pg1_crunchy", - "value": "crunchy_pg1_crunchy" + "text": "hotel_ip16_pg1", + "value": "hotel_ip16_pg1" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(up{exp_type='pg', cluster_name=\"[[pgcluster]]\"}, job)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "Node", @@ -202,22 +207,21 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": false, - "text": "testdb", - "value": "testdb" + "selected": true, + "text": "postgres", + "value": "postgres" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(ccp_stat_user_tables_n_tup_ins{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\"}, dbname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "PGDatabase", @@ -233,25 +237,23 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": false, - "text": "public", - "value": "public" + "selected": true, + "text": "pgmonitor_ext", + "value": "pgmonitor_ext" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(ccp_stat_user_tables_n_tup_ins{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\"},schemaname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "schemaname", "options": [], @@ -264,25 +266,23 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": true, - "text": "bloat_tables", - "value": "bloat_tables" + "selected": false, + "text": "ccp_sequence_exhaustion", + "value": "ccp_sequence_exhaustion" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(ccp_stat_user_tables_n_tup_ins{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\",schemaname=\"[[schemaname]]\"},relname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "tablename", "options": [], @@ -295,7 +295,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -322,5 +321,6 @@ "timezone": "browser", "title": "CRUD Details", "uid": "ubhVvnNmk", - "version": 2 + "version": 1, + "weekStart": "" } diff --git a/grafana/postgres/PGBackrest.json b/grafana/postgres/PGBackrest.json new file mode 100644 index 00000000..8780bc1e --- /dev/null +++ b/grafana/postgres/PGBackrest.json @@ -0,0 +1,609 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dtdhms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 11, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 45 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "time()- ccp_backrest_oldest_full_backup_time_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Recovery Window", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 3 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "ccp_backrest_last_incr_backup_time_since_completion_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "incr", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "ccp_backrest_last_diff_backup_time_since_completion_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "diff", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "ccp_backrest_last_full_backup_time_since_completion_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "full", + "refId": "C" + } + ], + "title": "Time Since Last Completed Backup", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 3 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "ccp_backrest_last_info_backup_runtime_seconds{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{backup_type}}", + "refId": "A" + } + ], + "title": "Last Backup Runtime", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "ccp_backrest_last_info_repo_total_size_bytes{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{backup_type}}", + "refId": "A" + } + ], + "title": "Last Backup Size (Total)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "exemplar": true, + "expr": "ccp_backrest_last_info_repo_backup_size_bytes{stanza=\"[[backrest_stanza]]\", repo=\"[[backrest_repo]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{backup_type}}", + "refId": "A" + } + ], + "title": "Last Backup Size (Actual)", + "type": "timeseries" + } + ], + "refresh": "15m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "hotel", + "value": "hotel" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(ccp_backrest_last_info_backup_runtime_seconds{}, stanza)", + "hide": 0, + "includeAll": false, + "label": "Stanza", + "multi": false, + "name": "backrest_stanza", + "options": [], + "query": { + "query": "label_values(ccp_backrest_last_info_backup_runtime_seconds{}, stanza)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "1", + "value": "1" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(ccp_backrest_last_info_backup_runtime_seconds{stanza=\"[[backrest_stanza]]\"}, repo)", + "hide": 0, + "includeAll": false, + "label": "Repo", + "multi": false, + "name": "backrest_repo", + "options": [], + "query": { + "query": "label_values(ccp_backrest_last_info_backup_runtime_seconds{stanza=\"[[backrest_stanza]]\"}, repo)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "pgBackRest", + "uid": "QtHwNCrik", + "version": 1, + "weekStart": "" +} diff --git a/grafana/common/PG_Details.json b/grafana/postgres/PG_Details.json similarity index 59% rename from grafana/common/PG_Details.json rename to grafana/postgres/PG_Details.json index 2ef63bbd..9f7f8628 100644 --- a/grafana/common/PG_Details.json +++ b/grafana/postgres/PG_Details.json @@ -70,6 +70,8 @@ "hideTimeOverride": true, "id": 51, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "auto", "reduceOptions": { "calcs": [ @@ -80,9 +82,10 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "9.2.20", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -142,6 +145,8 @@ "hideTimeOverride": true, "id": 54, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "auto", "reduceOptions": { "calcs": [ @@ -152,9 +157,10 @@ }, "showThresholdLabels": false, "showThresholdMarkers": false, + "sizing": "auto", "text": {} }, - "pluginVersion": "9.2.20", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -223,10 +229,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.2.20", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -286,6 +294,8 @@ "hideTimeOverride": true, "id": 56, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "auto", "reduceOptions": { "calcs": [ @@ -296,9 +306,10 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "9.2.20", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -358,6 +369,8 @@ "hideTimeOverride": true, "id": 57, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "auto", "reduceOptions": { "calcs": [ @@ -368,9 +381,10 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "9.2.20", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -421,8 +435,10 @@ "id": 55, "options": { "displayMode": "gradient", + "maxVizHeight": 300, "minVizHeight": 10, "minVizWidth": 0, + "namePlacement": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ @@ -432,9 +448,11 @@ "values": false }, "showUnfilled": true, - "text": {} + "sizing": "auto", + "text": {}, + "valueMode": "color" }, - "pluginVersion": "9.2.20", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -452,57 +470,86 @@ "type": "bargauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 6 }, - "hiddenSeries": false, "id": 18, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -558,45 +605,10 @@ "step": 60 } ], - "thresholds": [], - "timeRegions": [], "title": "Connections", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [ - "current" - ] - }, - "yaxes": [ - { - "$$hashKey": "object:647", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:648", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" @@ -604,55 +616,118 @@ "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Lag Bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Time/" + }, + "properties": [ + { + "id": "unit", + "value": "dtdhms" + }, + { + "id": "custom.axisLabel", + "value": "Lag Time (hh:mm:ss)" + } + ] + }, + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsNull", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 6 }, - "hiddenSeries": false, "id": 35, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:675", - "alias": "/Time/", - "yaxis": 2 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -679,98 +754,96 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Replication Lag", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:153", - "format": "bytes", - "label": "Lag Bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:154", - "format": "dtdhms", - "label": "Lag Time (hh:mm:ss)", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 12 }, - "hiddenSeries": false, "id": 39, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, "links": [ { "title": "TableSize Details", "url": "/d/Igh7D7Hmz/tablesize-details?$__all_variables" } ], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -797,90 +870,90 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Database Size - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:399", - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:400", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 12 }, - "hiddenSeries": false, "id": 41, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -906,83 +979,90 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Transactions Per Second (TPS) - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:229", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:230", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "description": "", - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 19 }, - "hiddenSeries": false, "id": 47, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -997,82 +1077,89 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "% Toward Wraparound", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1131", - "format": "percent", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1132", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 19 }, - "hiddenSeries": false, "id": 45, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1087,71 +1174,77 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "% Towards Emergency Vacuum", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1207", - "format": "percent", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1208", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "description": "", - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 10, "w": 12, "x": 0, "y": 25 }, - "hiddenSeries": false, "id": 11, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [ { "targetBlank": false, @@ -1159,19 +1252,23 @@ "url": "/d/ubhVvnNmk/crud-details?$__all_variables" } ], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1244,84 +1341,91 @@ "step": 240 } ], - "thresholds": [], - "timeRegions": [], "title": "CRUD - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1053", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1054", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 10, "w": 12, "x": 12, "y": 25 }, - "hiddenSeries": false, "id": 17, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1428,88 +1532,90 @@ "step": 240 } ], - "thresholds": [], - "timeRegions": [], "title": "Locks - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1795", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1796", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 35 }, - "hiddenSeries": false, "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1528,43 +1634,10 @@ "step": 120 } ], - "thresholds": [], - "timeRegions": [], "title": "Cache Hit Ratio (1 min rate) - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:885", - "format": "percent", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:886", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" @@ -1572,45 +1645,80 @@ "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 35 }, - "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": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1640,95 +1748,129 @@ "step": 120 } ], - "thresholds": [], - "timeRegions": [], "title": "Commit vs Rollback - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:961", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:962", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Total Size", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Archive*/" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.axisLabel", + "value": "Rate (5m)" + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Fail*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.axisLabel", + "value": "Rate (5m)" + } + ] + } + ] + }, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 42 }, - "hiddenSeries": false, "id": 49, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:852", - "alias": "/Archive*/", - "yaxis": 2 - }, - { - "$$hashKey": "object:859", - "alias": "/Fail*/", - "color": "#C4162A", - "yaxis": 2 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1766,87 +1908,93 @@ "refId": "C" } ], - "thresholds": [], - "timeRegions": [], "title": "WAL Activity", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1283", - "format": "bytes", - "label": "Total Size", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1284", - "format": "short", - "label": "Rate (5m)", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 42 }, - "hiddenSeries": false, "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -1919,84 +2067,89 @@ "step": 120 } ], - "thresholds": [], - "timeRegions": [], "title": "Buffers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2175", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2176", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 49 }, - "hiddenSeries": false, "id": 15, - "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": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -2027,84 +2180,93 @@ "step": 240 } ], - "thresholds": [], - "timeRegions": [], "title": "Conflicts/DeadLocks - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2099", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2100", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 49 }, - "hiddenSeries": false, "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -2159,50 +2321,20 @@ "step": 120 } ], - "thresholds": [], - "timeRegions": [], "title": "Vacuum/Analyze Activity Rate - [[pgdatabase]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2327", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2328", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 37, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { "current": { "selected": false, - "text": "charlie", - "value": "charlie" + "text": "hotel", + "value": "hotel" }, "datasource": { "type": "prometheus", @@ -2231,8 +2363,8 @@ { "current": { "selected": false, - "text": "charlie_ip16_pg1", - "value": "charlie_ip16_pg1" + "text": "hotel_ip16_pg1", + "value": "hotel_ip16_pg1" }, "datasource": { "type": "prometheus", @@ -2262,12 +2394,10 @@ "current": { "selected": true, "text": [ - "alpha", - "testdb" + "All" ], "value": [ - "alpha", - "testdb" + "$__all" ] }, "datasource": { diff --git a/grafana/common/QueryStatistics.json b/grafana/postgres/QueryStatistics.json similarity index 84% rename from grafana/common/QueryStatistics.json rename to grafana/postgres/QueryStatistics.json index e9063713..c056d52d 100644 --- a/grafana/common/QueryStatistics.json +++ b/grafana/postgres/QueryStatistics.json @@ -22,10 +22,9 @@ ] }, "description": "", - "editable": true, + "editable": false, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "iteration": 1673302404559, "links": [], "liveNow": false, "panels": [ @@ -69,10 +68,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "sum(ccp_pg_stat_statements_total_calls_count{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"})", @@ -125,10 +126,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "sum(ccp_pg_stat_statements_total_exec_time_ms{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"})", @@ -182,10 +185,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "avg(ccp_pg_stat_statements_total_mean_exec_time_ms{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"})", @@ -239,10 +244,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "sum(ccp_pg_stat_statements_total_row_count{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"})", @@ -257,48 +264,85 @@ "type": "stat" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "PDC1078F23EBDF0E5" }, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 7, "w": 23, "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.5.15", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.2", "targets": [ { "expr": "irate(ccp_pg_stat_statements_total_calls_count{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"}[1m])", @@ -307,37 +351,8 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Query Executions (Calls) Per Minute", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:100", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:101", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "datasource": { @@ -347,7 +362,10 @@ "fieldConfig": { "defaults": { "custom": { - "displayMode": "auto", + "align": "auto", + "cellOptions": { + "type": "auto" + }, "filterable": false, "inspect": false }, @@ -378,8 +396,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -409,7 +430,9 @@ }, "id": 4, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -424,7 +447,7 @@ } ] }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "ccp_pg_stat_statements_top_mean_exec_time_ms{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"}", @@ -475,7 +498,10 @@ "fieldConfig": { "defaults": { "custom": { - "displayMode": "auto", + "align": "auto", + "cellOptions": { + "type": "auto" + }, "filterable": false, "inspect": false }, @@ -506,8 +532,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -537,7 +566,9 @@ }, "id": 6, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -552,7 +583,7 @@ } ] }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "ccp_pg_stat_statements_top_max_exec_time_ms{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"}", @@ -603,7 +634,10 @@ "fieldConfig": { "defaults": { "custom": { - "displayMode": "auto", + "align": "auto", + "cellOptions": { + "type": "auto" + }, "filterable": false, "inspect": false }, @@ -634,8 +668,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -665,7 +702,9 @@ }, "id": 5, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -680,7 +719,7 @@ } ] }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "expr": "ccp_pg_stat_statements_top_total_exec_time_ms{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=~\"[[pgdatabase]]\", role=~\"[[role]]\"}", @@ -731,7 +770,10 @@ "fieldConfig": { "defaults": { "custom": { - "displayMode": "auto", + "align": "auto", + "cellOptions": { + "type": "auto" + }, "filterable": false, "inspect": false }, @@ -762,8 +804,10 @@ "value": "bytes" }, { - "id": "custom.displayMode", - "value": "auto" + "id": "custom.cellOptions", + "value": { + "type": "auto" + } } ] } @@ -777,7 +821,9 @@ }, "id": 12, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -792,7 +838,7 @@ } ] }, - "pluginVersion": "8.5.15", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -807,7 +853,7 @@ "refId": "A" } ], - "title": "Query Total WAL Generated (Bytes)", + "title": "Query Total WAL Genterated (Bytes)", "transformations": [ { "id": "organize", @@ -841,16 +887,15 @@ } ], "refresh": "15m", - "schemaVersion": 36, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { "current": { "selected": false, - "text": "golf", - "value": "golf" + "text": "hotel", + "value": "hotel" }, "datasource": { "type": "prometheus", @@ -879,8 +924,8 @@ { "current": { "selected": false, - "text": "golf_ip16_pg1", - "value": "golf_ip16_pg1" + "text": "hotel_ip16_pg1", + "value": "hotel_ip16_pg1" }, "datasource": { "type": "prometheus", diff --git a/grafana/common/TableSize_Details.json b/grafana/postgres/TableSize_Details.json similarity index 53% rename from grafana/common/TableSize_Details.json rename to grafana/postgres/TableSize_Details.json index 613c8a78..2fa27c78 100644 --- a/grafana/common/TableSize_Details.json +++ b/grafana/postgres/TableSize_Details.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,62 +16,98 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "iteration": 1618856334694, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.2", "targets": [ { - "expr": "ccp_table_size_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=\"[[pgdatabase]]\", schemaname=\"[[schemaname]]\", relname=\"[[tablename]]\"}", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "expr": "ccp_table_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\", dbname=\"[[pgdatabase]]\", schemaname=\"[[schemaname]]\", relname=\"[[tablename]]\"}", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -77,67 +116,26 @@ "step": 30 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Table Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:138", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:139", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allValue": null, "current": { "selected": false, - "text": "crunchy", - "value": "crunchy" + "text": "hotel", + "value": "hotel" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(up{exp_type='pg'}, cluster_name)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "PGCluster", @@ -153,22 +151,21 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": true, - "text": "crunchy_pg1_crunchy", - "value": "crunchy_pg1_crunchy" + "text": "hotel_ip16_pg1", + "value": "hotel_ip16_pg1" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", "definition": "label_values(up{exp_type='pg', cluster_name=\"[[pgcluster]]\"}, job)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "Node", @@ -184,22 +181,21 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": true, + "selected": false, "text": "testdb", "value": "testdb" }, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, "definition": "label_values(ccp_database_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\"}, dbname)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "PGDatabase", @@ -215,30 +211,28 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": true, - "text": "public", - "value": "public" + "selected": false, + "text": "information_schema", + "value": "information_schema" }, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_table_size_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\"},schemaname)", - "description": null, - "error": null, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(ccp_table_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\"},schemaname)", "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "schemaname", "options": [], "query": { - "query": "label_values(ccp_table_size_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\"},schemaname)", + "query": "label_values(ccp_table_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\"},schemaname)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -246,30 +240,28 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, - "text": "bloat_indexes", - "value": "bloat_indexes" + "text": "sql_features", + "value": "sql_features" + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" }, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_table_size_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\",schemaname=\"[[schemaname]]\"},relname)", - "description": null, - "error": null, + "definition": "label_values(ccp_table_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\",schemaname=\"[[schemaname]]\"},relname)", "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "tablename", "options": [], "query": { - "query": "label_values(ccp_table_size_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\",schemaname=\"[[schemaname]]\"},relname)", + "query": "label_values(ccp_table_size_bytes{cluster_name=\"[[pgcluster]]\", job=\"[[pgnodes]]\",dbname=\"[[pgdatabase]]\",schemaname=\"[[schemaname]]\"},relname)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -277,7 +269,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -304,5 +295,6 @@ "timezone": "", "title": "TableSize Details", "uid": "Igh7D7Hmz", - "version": 2 + "version": 1, + "weekStart": "" } diff --git a/grafana/postgres/postgres_exporter/PG_Overview_postgres_exporter.json b/grafana/postgres/postgres_exporter/PG_Overview_postgres_exporter.json new file mode 100644 index 00000000..ea6beb2e --- /dev/null +++ b/grafana/postgres/postgres_exporter/PG_Overview_postgres_exporter.json @@ -0,0 +1,200 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 30, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "PG Details", + "url": "/d/6jtN_vfiz/postgresql-details?$__all_variables&var-pgcluster=${__field.labels.cluster_name}" + } + ], + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "REPLICA" + }, + "0.5": { + "text": "PRIMARY" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "text": "DOWN" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.9)", + "value": 0.5 + }, + { + "color": "rgba(68, 126, 188, 0.9)", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 0 + }, + "id": 1, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 47 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.2", + "repeat": "pgnodes", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "expr": "pg_up{job=~\"[[pgnodes]]\"} / ccp_is_in_recovery_status{job=~\"[[pgnodes]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "metric": "up", + "refId": "A", + "step": 2 + } + ], + "title": "[[pgnodes]]", + "type": "stat" + } + ], + "refresh": "5m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "", + "hide": 2, + "includeAll": true, + "label": "PGCluster", + "multi": true, + "name": "pgnodes", + "options": [], + "query": { + "query": "label_values(up{exp_type='pg'}, job)", + "refId": "PROMETHEUS-pgnodes-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "PostgreSQL Overview", + "uid": "pxinDnNik", + "version": 1, + "weekStart": "" +} diff --git a/grafana/postgres/sql_exporter/PG_Overview_sql_exporter.json b/grafana/postgres/sql_exporter/PG_Overview_sql_exporter.json new file mode 100644 index 00000000..6666c950 --- /dev/null +++ b/grafana/postgres/sql_exporter/PG_Overview_sql_exporter.json @@ -0,0 +1,203 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 30, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "PG Details", + "url": "/d/6jtN_vfiz/postgresql-details?$__all_variables&var-pgcluster=${__field.labels.cluster_name}" + } + ], + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "REPLICA" + }, + "0.5": { + "text": "PRIMARY" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "text": "DOWN" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(50, 172, 45, 0.9)", + "value": 0.5 + }, + { + "color": "rgba(68, 126, 188, 0.9)", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 0 + }, + "id": 1, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 47 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.2", + "repeat": "pgnodes", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "editorMode": "code", + "expr": "up{exp_type=\"pg\", job=~\"[[pgnodes]]\"} / ccp_is_in_recovery_status{exp_type=\"pg\",job=~\"[[pgnodes]]\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "metric": "up", + "range": true, + "refId": "A", + "step": 2 + } + ], + "title": "[[pgnodes]]", + "type": "stat" + } + ], + "refresh": "5m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "definition": "label_values(up{exp_type='pg'},job)", + "hide": 2, + "includeAll": true, + "label": "PGCluster", + "multi": true, + "name": "pgnodes", + "options": [], + "query": { + "query": "label_values(up{exp_type='pg'},job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "PostgreSQL Overview (sql_exporter)", + "uid": "d991a161-466f-44fc-9fa4-dbf395c20279", + "version": 1, + "weekStart": "" +} diff --git a/grafana/prometheus/Prometheus_Alerts.json b/grafana/prometheus/Prometheus_Alerts.json new file mode 100644 index 00000000..e474f55b --- /dev/null +++ b/grafana/prometheus/Prometheus_Alerts.json @@ -0,0 +1,487 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": false, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "displayName", + "value": "Time" + }, + { + "id": "unit", + "value": "time: YYYY-MM-DD HH:mm:ss" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "severity_num" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 200 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 300 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "alertstate" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "alert_value" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "expr": "ALERTS{alertstate=\"firing\"}", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 4, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Active Alerts", + "transformations": [ + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "displayName", + "value": "Time" + }, + { + "id": "unit", + "value": "time: YYYY-MM-DD HH:mm:ss" + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "severity_num" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 200 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 300 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "alertstate" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "alert_value" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 3, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PDC1078F23EBDF0E5" + }, + "expr": "ALERTS{alertstate=\"firing\"}", + "format": "table", + "instant": false, + "interval": "", + "intervalFactor": 4, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": "1w", + "title": "Alert History (1 week)", + "transformations": [ + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + } + ], + "refresh": "5m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Prometheus Alerts", + "uid": "QTsttxNmk", + "version": 1, + "weekStart": "" +} diff --git a/hugo/content/exporter/_index.md b/hugo/content/exporter/_index.md index e5824c00..5b85fd5f 100644 --- a/hugo/content/exporter/_index.md +++ b/hugo/content/exporter/_index.md @@ -6,6 +6,7 @@ weight: 1 The Linux instructions below use RHEL, but any Linux-based system should work. [Crunchy Data](https://www.crunchydata.com) customers can obtain Linux packages through the [Crunchy Customer Portal](https://access.crunchydata.com/). + - [Installation](#installation) - [RPM installs](#rpm-installs) - [Non-RPMs installs](#non-rpm-installs) @@ -15,26 +16,30 @@ The Linux instructions below use RHEL, but any Linux-based system should work. [ - [Metrics Collected](#metrics-collected) - [PostgreSQL](#postgresql) - [System](#system) +- [Legacy postgres_exporter Setup](#postgres-exporter) +IMPORTANT NOTE: As of pgMonitor version 5.0.0, postgres_exporter has been deprecated in favor of sql_exporter. Support for postgres_exporter is still possible with 5.0, but only for bug fixes while custom queries are still supported. No new features will be added using postgres_exporter and it will be fully obsoleted in a future version of pgMonitor. We recommend migrating to sql_exporter as soon as possible. + ## Installation {#installation} + ### RPM installs {#rpm-installs} -The following RPM packages are available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). *After installing via these packages, continue reading at the [Setup](#setup) section.* +The following RPM packages are available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). To access the pgMonitor packages, please follow the same instructions for setting up access to the Crunchy Postgres packages. + +After installing via these packages, continue reading at the [Setup](#setup) section. ##### Available Packages | Package Name | Description | |--------------------------------|---------------------------------------------------------------------------| -| blackbox_exporter | Package for the blackbox_exporter | -| node_exporter | Base package for node_exporter | -| pg_bloat_check | Package for pg_bloat_check script | -| pgbouncer_fdw | Package for the pgbouncer_fdw extension | +| node-exporter | Base package for node_exporter | +| sql-exporter | Base package for sql_exporter | +| sql-exporter-extras | Crunchy-optimized configurations for sql_exporter | +| blackbox-exporter | Package for the blackbox_exporter | +| pg-bloat-check | Package for pg_bloat_check script | | pgmonitor-node_exporter-extras | Crunchy-optimized configurations for node_exporter | -| pgmonitor-pg-common | Package containing postgres_exporter items common for all versions of PostgreSQL | -| pgmonitor-pg##-extras | Crunchy-optimized configurations for postgres_exporter. Note that each major version of PostgreSQL has its own extras package (pgmonitor-pg13-extras, pgmonitor-pg14-extras, etc) | -| postgres_exporter | Base package for postgres_exporter | ### Non-RPM installs {#non-rpm-installs} @@ -42,11 +47,10 @@ For non-package installations on Linux, applications can be downloaded from thei | Application | Source Repository | |-------------------------------|-----------------------------------------------------------| -| blackbox_exporter | https://github.com/prometheus/blackbox_exporter | | node_exporter | https://github.com/prometheus/node_exporter | +| sql_exporter | https://github.com/burningalchemist/sql_exporter | +| blackbox_exporter | https://github.com/prometheus/blackbox_exporter | | pg_bloat_check | https://github.com/keithf4/pg_bloat_check | -| pgbouncer_fdw | https://github.com/CrunchyData/pgbouncer_fdw | -| postgres_exporter | https://github.com/prometheus-community/postgres_exporter | #### User and Configuration Directory Installation @@ -81,22 +85,25 @@ The following pgMonitor configuration files should be placed according to the fo | node_exporter/linux/crunchy-node-exporter-service-rhel.conf | /etc/systemd/system/node_exporter.service.d/crunchy-node-exporter-service-rhel.conf | | node_exporter/linux/sysconfig.node_exporter | /etc/sysconfig/node_exporter | -##### postgres_exporter +##### sql_exporter + +sql_exporter takes advantage of the Crunchy Data pgmonitor-extension (https://github.com/CrunchyData/pgmonitor-extension) to provide a much easier configuration and setup. The extension takes care of creating all the necessary objects inside the database. + +The mimimum required version of pgmonitor-extension is currently 1.0.0. The following pgMonitor configuration files should be placed according to the following mapping: | pgMonitor Configuration File | System Location | |------------------------------|-----------------| -| postgres_exporter/common/pg##/setup.sql | /etc/postgres_exporter/##/setup.sql | -| postgres_exporter/common/pg##/queries*.yml | /etc/postgres_exporter/##/queries*.yml | -| postgres_exporter/common/queries*.yml | /etc/postgres_exporter/##/queries*.yml | -| postgres_exporter/linux/crontab.txt | /etc/postgres_exporter/##/crontab.txt | -| postgres_exporter/linux/crunchy-postgres-exporter@.service | /usr/lib/systemd/system/crunchy-postgres-exporter@.service | -| postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg## | /etc/sysconfig/postgres_exporter_pg## | -| postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg##_per_db | /etc/sysconfig/postgres_exporter_pg##_per_db | -| postgres_exporter/linux/queries_*.yml | /etc/postgres_exporter/##/queries_*.yml | +| sql_exporter/common/*.yml | /etc/sql_exporter/*.yml | +| sql_exporter/common/*.sql | /etc/sql_exporter/*.sql | +| linux/crunchy-sql-exporter@.service | /usr/lib/systemd/system/crunchy-sql-exporter@.service | +| sql_exporter/linux/sql_exporter.sysconfig | /etc/sysconfig/sql_exporter | +| sql_exporter/linux/crontab.txt | /etc/sysconfig/crontab.txt | | postgres_exporter/linux/pgbackrest-info.sh | /usr/bin/pgbackrest-info.sh | | postgres_exporter/linux/pgmonitor.conf | /etc/pgmonitor.conf (multi-backrest-repository/container environment only) | +| sql_exporter/common/sql_exporter.yml.example | /etc/sql_exporter/sql_exporter.yml.example | + ##### blackbox_exporter @@ -123,35 +130,29 @@ The following files contain defaults that should enable the exporters to run eff If you need to modify them, see the notes in the files for more details and recommendations: - {{< shell >}}/etc/systemd/system/node_exporter.service.d/crunchy-node-exporter-service-rhel{{< /shell >}} - {{< shell >}}/etc/sysconfig/node_exporter{{< /shell >}} -- {{< shell >}}/etc/sysconfig/postgres_exporter_pg##{{< /shell >}} -- {{< shell >}}/etc/sysconfig/postgres_exporter_pg##_per_db{{< /shell >}} - -Note that {{< shell >}}/etc/sysconfig/postgres_exporter_pg##{{< /shell >}} & {{< shell >}}postgres_exporter_pg##_per_db{{< /shell >}} are the default sysconfig files for monitoring the database running on the local socket at /var/run/postgresql and connect to the "postgres" database. If you've installed the pgMonitor setup to a different database, modify these files accordingly or make new ones. If you make new ones, ensure the service name you enable references this file (see the Enable Services section below ). +- {{< shell >}}/etc/sysconfig/sql_exporter{{< /shell >}} #### Database Configuration ##### General Configuration -First, make sure you have installed the PostgreSQL contrib modules. You can install them with the following command: +First, make sure you have installed the PostgreSQL contrib modules. An example of installing this on a RHEL system would be: ```bash sudo yum install postgresql##-contrib ``` -Where `##` corresponds to your current PostgreSQL version. For PostgreSQL 13 this would be: +Where `##` corresponds to your current PostgreSQL version. -```bash -sudo yum install postgresql13-contrib +You will need to modify your {{< shell >}}postgresql.conf{{< /shell >}} configuration file to tell PostgreSQL to load the following shared libraries: ``` - -You will need to modify your {{< shell >}}postgresql.conf{{< /shell >}} configuration file to tell PostgreSQL to load shared libraries. In the default setup, this file can be found at {{< shell >}}/var/lib/pgsql/##/data/postgresql.conf{{< /shell >}}. - -``` -shared_preload_libraries = 'pg_stat_statements,auto_explain' +shared_preload_libraries = 'pg_stat_statements,auto_explain,pgmonitor_bgw' ``` You will need to restart your PostgreSQL instance for the change to take effect. pgMonitor has optional metrics that can be collected via pg_stat_statements. auto_explain does not do anything to your database without further configuration. But even if neither of these extensions are initially used, they are very good to have enabled here by default for when they may be needed in the future. +The pgmonitor-extension uses its own background worker to refresh metric data. + The following statement only needs to be run on the "global" database, typically the "postgres" database. If you want the pg_stat_statements view to be visible in other databases, this statement must be run there as well. ```sql @@ -160,47 +161,30 @@ CREATE EXTENSION pg_stat_statements; ##### Monitoring Setup -| Query File | Description | -|-----------------------|----------------------------------------------------------------------------------------------------------| -| setup.sql | Creates `ccp_monitoring` role with all necessary grants. Creates all necessary database objects (functions, tables, etc) required for monitoring. | -| setup_metric_views.sql | Creates materialized views and maintenance objects for them. This feature is optional. See [Materialized View Metrics](#mat-view-metrics). | -| queries_bloat.yml | postgres_exporter query file to allow bloat monitoring. | -| queries_global.yml | postgres_exporter query file with minimal recommended queries that are common across all PG versions and only need to be run once per database instance. | -| queries_global_dbsize.yml | postgres_exporter query file that contains metrics for monitoring database size. This is a separate file to allow the option to use a materialized view for very large databases | -| queries_global_matview.yml | postgres_exporter query file that contains alternative metrics that use materialized views of common metrics across all PG versions | -| queries_per_db.yml | postgres_exporter query file with queries that gather per databse stats. WARNING: If your database has many tables this can greatly increase the storage requirements for your prometheus database. If necessary, edit the query to only gather tables you are interested in statistics for. The "PostgreSQL Details" and the "CRUD Details" Dashboards use these statistics. | -| queries_per_db_matview.yml | postgres_exporter query files that contains alternative metrics that use materialized views of per database stats | -| queries_general.yml | postgres_exporter query file for queries that are specific to the version of PostgreSQL that is being monitored. | -| queries_backrest.yml | postgres_exporter query file for monitoring pgBackRest backup status. By default, new backrest data is only collected every 10 minutes to avoid excessive load when there are large backup lists. See sysconfig file for exporter service to adjust this throttling. | -| queries_pgbouncer.yml | postgres_exporter query file for monitoring pgbouncer. | -| queries_pg_stat_statements.yml | postgres_exporter query file for specific pg_stat_statements metrics that are most useful for monitoring and trending. | - +| Configuration File | Description | +|------------------------------------------------|----------------------------------------------------------------------------------------------------------| +| setup_db.sql | Creates `ccp_monitoring` role with all necessary grants. Creates the pgmonitor-extension and sets proper privileges | +| sql_exporter.yml.example | Example configuration file for configuring sql_exporter to connect to PostgreSQL and setting collection files to use | +| crunchy_backrest_collector.yml | Collection file with pgBackRest queries and metrics | +| crunchy_bloat_check_collector.yml | Collection file with pg_bloat_check queries and metrics | +| crunchy_global_collector.yml | Collection file with global level queries and metrics | +| crunchy_per_db_collector.yml | Collection file with general per-database level queries and metrics | +| crunchy_pgbouncer_collector_121.yml | Collection file with pgBouncer queries and metrics for a minimum version of 1.21 | +| crunchy_pg_stat_statements_collector.yml | Collection file with pg_stat_statements queries and metrics +| crunchy_pg_stat_statements_reset_collector.yml | Collection file with options to allow resetting of pg_stat_statements metrics | -By default, there are two postgres_exporter services expected to be running. One connects to the default {{< shell >}}postgres{{< /shell >}} database that most PostgreSQL instances come with and is meant for collecting global metrics that are the same on all databases in the instance (connection/replication statistics, etc). This service uses the sysconfig file {{< shell >}}postgres_exporter_pg##{{< /shell >}}. Connect to this database and run the setup.sql script to install the required database objects for pgMonitor. -The second postgres_exporter service is used to collect per-database metrics and uses the sysconfig file {{< shell >}}postgres_exporter_pg##_per_db{{< /shell >}}. By default it is set to also connect to the {{< shell >}}postgres{{< /shell >}} database, but you can add as many additional connection strings to this service for each individual database that you want metrics for. Per-db metrics include things like table/index statistics and bloat. See the section below for monitorig multiple databases for how to do this. +Run the setup_db.sql file on all databases that will be monitored by pgMonitor. At minimum this must be at least the global database so the necessary database objects are created. The `pgmonitor-extension` is expected to be available to be installed in the target database(s) when running this file. Note the setup.sql file is a convenience file and the steps contained within it can be done manually and customized as needed. -Note that your pg_hba.conf will have to be configured to allow the {{< shell >}}ccp_monitoring{{< /shell >}} system user to connect as the {{< shell >}}ccp_monitoring{{< /shell >}} role to any database in the instance. As of version 4.0 of pg_monitor, the postgres_exporter service is set by default to connect via local socket, so passwordless local peer authentication is the expected default. If password-based authentication is required, we recommend using SCRAM authentication, which is supported as of version 0.7.x of postgres_exporter. See our blog post for more information on SCRAM - https://info.crunchydata.com/blog/how-to-upgrade-postgresql-passwords-to-scram +The `sql_exporter.yml.example` file should be copied and renamed to `sql_exporter.yml` since this is what the sysconfig file is expecting to find. This file contains settings for sql_exporter, the list of collection files to use, and the configuration for which databases to connect to and which collections to run on each database. Please see the examples inside the file and refer to the upstream project for all of the configuration options available. The example shows how to run both the global and per-db collections on the default 'postgres' database. It also shows how you can connect to pgBouncer to collect metrics directly from it as well. The collector names that can be used can be found inside the collection files at the top. -postgres_exporter only takes a single yaml file as an argument for custom queries, so this requires concatenating the relevant files together. The sysconfig files for the service help with this concatenation task and define the variable {{< yaml >}}QUERY_FILE_LIST{{< /yaml >}}. Set this variable to a space delimited list of the full path names to all files that contain queries you want to be in the single file that postgres_exporter uses. +Note that your pg_hba.conf will have to be configured to allow the {{< shell >}}ccp_monitoring{{< /shell >}} system user to connect as the {{< shell >}}ccp_monitoring{{< /shell >}} role to any database in the instance. sql_exporter is set to connect via the local TCP loopback by default. If passwordless login is desired, a .pgpass file can be created for the ccp_monitoring user or the connection configuration can be changed to use a local socket and peer-based authentication can be done instead. -For example, to use just the common queries for PostgreSQL 12 modify the relevant sysconfig file as follows: - -```bash -QUERY_FILE_LIST="/etc/postgres_exporter/12/queries_global.yml /etc/postgres_exporter/12/queries_general.yml" -``` - -As an another example, to include queries for PostgreSQL 13 as well as pgBackRest, modify the relevant sysconfig file as follows: - -```bash -QUERY_FILE_LIST="/etc/postgres_exporter/13/queries_global.yml /etc/postgres_exporter/13/queries_general.yml /etc/postgres_exporter/13/queries_backrest.yml" -``` - -For replica servers, the setup is the same except that the setup.sql file does not need to be run since writes cannot be done there and it was already run on the primary. +For replica servers, the setup is the same except that the setup_db.sql file does not need to be run since writes cannot be done there and it was already run on the primary. ##### Access Control: GRANT statements -The {{< shell >}}ccp_monitoring{{< /shell >}} database role (created by running the "setup.sql" file above) must be allowed to connect to all databases in the cluster. Note that by default, all users are granted CONNECT on all new databases, so this step can likely be skipped. Otherwise, run the following command to generate the necessary GRANT statements: +The {{< shell >}}ccp_monitoring{{< /shell >}} database role (created by running the "setup_db.sql" file above) must be allowed to connect to all databases in the cluster. Note that by default, all users are granted CONNECT on all new databases, so this step can likely be skipped. Otherwise, run the following command to generate the necessary GRANT statements: ```sql SELECT 'GRANT CONNECT ON DATABASE "' || datname || '" TO ccp_monitoring;' @@ -214,41 +198,17 @@ GRANT CONNECT ON DATABASE "postgres" TO ccp_monitoring; ``` Run these grant statements to then allow monitoring to connect. -##### Materialized View Metrics {#mat-view-metrics} - -With large databases/tables and some other conditions, certain metrics can cause excessive load. For those cases, materialized views and alternative metric queries have been made available. The materialized views are refreshed on their own schedule independent of the Prometheus data scrape, so any load that may be associated with gathering the underlying data is mitigated. A configuration table, seen below, contains options for how often these materialized views should be refreshed. And a single procedure can be called to refresh all materialized views relevant to monitoring. - -For every database that will be collecting materialized view metrics, you will have to run the {{< shell >}}setup_metric_views.sql{{< /shell >}} file against that database. This will likely need to be run as a superuser and must be run after running the base setup file mentioned above to create the necessary monitoring user first. -``` -psql -U postgres -d alphadb -f setup_metric_views.sql -psql -U postgres -d betadb -f setup_metric_views.sql -``` -The {{< shell >}}/etc/postgres_exporter/##/crontab.txt{{< /shell >}} file has an example entry for how to call the refresh procedure. You should modify this to run as often as you need depending on how recent you need your metric data to be. This procedure is safe to run on the primary or replicas and will safely exit if the database is in recovery mode. - -Configuration table {{< shell >}}monitor.metric_views{{< /shell >}}: - -| Column | Description | -|--------------------|------------------------------------------------------------------| -| view_schema | Schema containing the materialized view | -| view_name | Name of the materialized view | -| concurrent_refresh | Boolean that sets whether this materialized view can be refreshed concurrently (requires a unique index) | -| run_interval | How often this materialized view should have its data refreshed. Must be a value compatible with the PG interval type | -| last_run | Timestamp of the last time this view was refreshed | -| active | Boolean that sets whether this view should be refreshed when the procedure is called | -| scope | Whether the data contained in the view is per-database or instance-wide. Currently unused | - -You are also free to use this materialized view system for your own custom metrics as well. Simply make a materialized view, add its name to the configuration table and ensure the user running the refresh has permissions to do so for your view(s). ##### Bloat setup -Run the script on the specific database(s) you will be monitoring for bloat in the cluster. See the note below, or in crontab.txt, concerning a superuser requirement for using this script. +Run the script on the specific database(s) you will be monitoring for bloat in the cluster. See the note below, or in crontab.txt, concerning a superuser or special privilege requirements for using this script. ```bash psql -d postgres -c "CREATE EXTENSION pgstattuple;" /usr/bin/pg_bloat_check.py -c "host=localhost dbname=postgres user=postgres" --create_stats_table psql -d postgres -c "GRANT SELECT,INSERT,UPDATE,DELETE,TRUNCATE ON bloat_indexes, bloat_stats, bloat_tables TO ccp_monitoring;" ``` -The {{< shell >}}/etc/postgres_exporter/##/crontab.txt{{< /shell >}} file has an example bloat check crontab entry. Modify this example to schedule bloat checking weekly during your 'off-peak' hours; alternatively, scheduling it monthly is usually good enough for most databases as long as the results are acted upon quickly. +The {{< shell >}}/etc/sql_exporter/##/crontab.txt{{< /shell >}} file has an example bloat check crontab entry. Modify this example to schedule bloat checking weekly during your 'off-peak' hours; alternatively, scheduling it monthly is usually good enough for most databases as long as the results are acted upon quickly. {{< note >}}Bloat monitoring requires the user running the check to be able to read all possible tables that will ever exist. PostgreSQL 14 introduced the built-in role {{< shell >}}pg_read_all_data{{< /shell >}} that can be granted to any role to allow it to read all possible data for the entire cluster. It is recommended to grant this role vs running the bloat check as a superuser. If you are running a version of PostgreSQL less than 14, a superuser is required and you will have to adjust the crontab accordingly to run as that user. ``` @@ -262,11 +222,7 @@ The configuration file for the blackbox_exporter provided by pgMonitor ({{< shel ##### PGBouncer -In order to monitor pgbouncer with pgMonitor, the pgbouncer_fdw maintained by CrunchyData is required. Please see its repository for full installation instructions. A package for this is available for Crunchy customers. - -https://github.com/CrunchyData/pgbouncer_fdw - -Once that is working, you should be able to add the {{< shell >}}queries_pgbouncer.yml{{< /shell >}} file to the {{< yaml >}}QUERY_FILE_LIST{{< /shell >}} for the exporter that is monitoring the database where the FDW was installed. +It is possible for sql_exporter to connect directly to pgBouncer to collect metrics. Specific settings must be used and the example sql_exporter configuration and relevant collection file(s) have these settings enabled. Please refer to those files. #### Enable Services @@ -277,48 +233,50 @@ sudo systemctl status node_exporter ``` If you've installed the blackbox exporter: -``` +```bash sudo systemctl enable blackbox_exporter sudo systemctl start blackbox_exporter sudo systemctl status blackbox_exporter ``` -To most easily allow the use of multiple postgres exporters, running multiple major versions of PostgreSQL, and to avoid maintaining many similar service files, a systemd template service file is used. The name of the sysconfig EnvironmentFile to be used by the service is passed as the value after the "@" and before ".service" in the service name. The default exporter's sysconfig file is named "postgres_exporter_pg##" and tied to the major version of postgres that it was installed for. A similar EnvironmentFile exists for the per-db service. Be sure to replace the ## in the below commands first! +```bash +sudo systemctl enable crunchy-sql-exporter@sql_exporter +sudo systemctl start crunchy-sql-exporter@sql_exporter +sudo systemctl status crunchy-sql-exporter@sql_exporter +``` + +To allow the possible use of multiple sql_exporters running on a single system, and to avoid maintaining many similar service files, a systemd template service file is used. The name of the sysconfig EnvironmentFile to be used by the service is passed as the value after the "@" and before ".service" in the service name. The default exporter's sysconfig file is named "sql_exporter". If you need to run multiple sql_exporters on a single system, simply make a new copy of the sysconfig file and pass that to the service name. ```bash -sudo systemctl enable crunchy-postgres-exporter@postgres_exporter_pg## -sudo systemctl start crunchy-postgres-exporter@postgres_exporter_pg## -sudo systemctl status crunchy-postgres-exporter@postgres_exporter_pg## +sudo systemctl enable crunchy-sql-exporter@sql_exporter_cluster2 +sudo systemctl start crunchy-sql-exporter@sql_exporter_cluster2 +sudo systemctl status crunchy-sql-exporter@sql_exporter_cluster2 -sudo systemctl enable crunchy-postgres-exporter@postgres_exporter_pg##_per_db -sudo systemctl start crunchy-postgres-exporter@postgres_exporter_pg##_per_db -sudo systemctl status crunchy-postgres-exporter@postgres_exporter_pg##_per_db ``` -### Monitoring multiple databases and/or running multiple postgres exporters (RHEL / CentOS) +### Monitoring multiple databases -Certain metrics are not cluster-wide, so multiple exporters must be run to avoid duplication when monitoring multiple databases in a single PostgreSQL instance. To collect these per-database metrics, an additional exporter service is required and pgMonitor provides this using the following query file: ({{< shell >}}queries_per_db.yml{{< /shell >}}). In Prometheus, you can then define the global and per-db exporter targets for a single job. This will place all the metrics that are collected for a single database instance together. +sql_exporter can connect to as many databases as you need. Simply add another connection configuration to the `job_name` in the sql_exporter configuration file for the other databases you wish to monitor. If making use of pgMonitor's metrics, ensure that the pgmonitor-extension is also installed on those target databases. -{{< note >}}The "setup.sql" file does not need to be run on these additional databases if using the queries that pgMonitor comes with.{{< /note >}} +IMPORTANT NOTE: If you are collecting metrics on multiple databases with the same exporter, you must ensure the results of the queries for those metrics are unique for each row. For example, you should add the database name to all queries and set that as a label to ensure the metrics are unique for each database. Otherwise you will get duplicate metric errors or confusing results. All per-database metrics provided by pgMonitor have been set to ensure unique values. -pgMonitor provides and recommends an example sysconfig file for this per-db exporter: {{< shell >}}sysconfig.postgres_exporter_pg##_per_db{{< /shell >}}. If you'd like to create additional exporter services for different query files, just copy the existing ones and modify the relevant lines, mainly the port, database name, and query file. The below example shows connecting to 3 databases in the same instance to collect their per-db metrics: `postgres`, `mydb1`, and `mydb2`. -``` -OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/14/queries_per_db.yml" -DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable" -``` -As was done with the exporter service that is collecting the global metrics, also modify the {{< yaml >}}QUERY_LIST_FILE{{< /yaml >}} in the new sysconfig file to only collect per-db metrics -``` -QUERY_FILE_LIST="/etc/postgres_exporter/14/queries_per_db.yml" ``` - -Since a systemd template is used for the postgres_exporter services, all you need to do is pass the sysconfig file name as part of the new service name. +jobs: + - job_name: global_targets + collectors: [crunchy_global] + static_configs: + - targets: + pg1: 'pg://ccp_monitoring@127.0.0.1:5432/postgres?sslmode=disable' + - job_name: per_db_targets + collectors: [crunchy_per_db] + static_configs: + - targets: + postgres: 'pg://ccp_monitoring@127.0.0.1:5432/postgres?sslmode=disable' + alpha: 'pg://ccp_monitoring@127.0.0.1:5432/alpha?sslmode=disable' + beta: 'pg://ccp_monitoring@127.0.0.1:5432/beta?sslmode=disable' + charlie: 'pg://ccp_monitoring@127.0.0.1:5432/charlie?sslmode=disable' ``` -sudo systemctl enable crunchy-postgres-exporter@postgres_exporter_pg14_per_db -sudo systemctl start cruncy-postgres-exporter@postgres_exporter_pg14_per_db -sudo systemctl status crunchy-postgres-exporter@postgres_exporter_pg14_per_db -``` -Lastly, update the Prometheus auto.d target file to include the new exporter in the same job you already had running for this system ## Metrics Collected {#metrics-collected} @@ -326,11 +284,8 @@ The metrics collected by our exporters are outlined below. ### PostgreSQL {#postgresql} -PostgreSQL metrics are collected by the [postgres_exporter](https://github.com/wrouesnel/postgres_exporter). pgMonitor uses custom queries for its PG metrics. The default metrics that postgres_exporter comes with are all disabled except for the `pg_up` metric. +PostgreSQL metrics are collected by [sql_exporter](https://github.com/burningalchemist/sql_exporter). pgMonitor uses custom queries for its PG metrics. -#### General Metrics - -*pg_up* - Database is up and connectable by metric collector. This is the only metrics that comes with postgres_exporter that is currently used #### Common Metrics @@ -487,7 +442,9 @@ Bloat metrics are only available if the `pg_bloat_check` script has been setup t #### pgBouncer Metrics -The following metric prefixes correspond to the SHOW command views found in the [pgBouncer documentation](https://www.pgbouncer.org/usage.html). Each column found in the SHOW view is a separate metric under the respective prefix. Ex: `ccp_pgbouncer_pools_client_active` corresponds to the `SHOW POOLS` view's `client_active` column. These metrics are found in the `queries_bouncer.yml` file. These metrics only need to be collected once per database instance so should be collected by the global postgres_exporter. +The following metric prefixes correspond to the SHOW command views found in the [pgBouncer documentation](https://www.pgbouncer.org/usage.html). Each column found in the SHOW view is a separate metric under the respective prefix. Ex: `ccp_pgbouncer_pools_client_active` corresponds to the `SHOW POOLS` view's `client_active` column. + +sql_exporter can connect directly to pgBouncer with some specific configuration options set. See the example `sql_exporter.yml` and the `crunchy_pgbouncer_collector_###.yml` file. * *ccp_pgbouncer_pools* - SHOW POOLS @@ -501,7 +458,9 @@ The following metric prefixes correspond to the SHOW command views found in the #### pg_stat_statements Metrics -Collecting all per-query metrics into Prometheus could greatly increase storage requirements and heavily impact performance without sufficient resources. Therefore the metrics below give simplified numeric metrics on overall statistics and Top N queries. N can be set with the PG_STAT_STATEMENTS_LIMIT variable in the exporter sysconfig file (defaults to 20). Note that the statistics for individual queries can only be reset on PG12+. Prior to that, pg_stat_statements must have all statistics reset to redo the top N queries. +Collecting all per-query metrics into Prometheus could greatly increase storage requirements and heavily impact performance. Therefore, the metrics below give simplified numeric metrics on overall statistics and Top N queries. N is set as the LIMIT value in the `crunchy_pg_stat_statements_collector.yml` collections file. If you would like to adjust this number, it is recommended to make a copy of this collection file and use that modified file in your sql_exporter collector file config instead. + +Note that the statistics for individual queries can only be reset on PG12+. Prior to that, pg_stat_statements must have all statistics reset to redo the top N queries. * *ccp_pg_stat_statements_top_max_time_ms* - Maximum time spent in the statement in milliseconds per database/user/query for the top N queries @@ -520,3 +479,151 @@ Collecting all per-query metrics into Prometheus could greatly increase storage ### System {#system} \*NIX Operating System metrics (Linux, BSD, etc) are collected using the [node_exporter](https://github.com/prometheus/node_exporter) provided by the Prometheus team. pgMonitor only collects the default metrics provided by node_exporter, but many additional metrics are available if needed. + + +## Legacy postgres_exporter Setup {#postgres-exporter} + +If you had been using pgMonitor prior to version 5.0.0, postgres_exporter was the method used to collect PostgreSQL metrics. This exporter can still be used with 5.0.0, but there are some additional steps required. It is HIGHLY recommended to switch to using sql_exporter as soon as possible. Custom query support will be dropped from postgres_exporter at some point in the future and that will break pgMonitor since it relies solely on custom queries. No new features of pgMonitor are being developed around postgres_exporter. + +Most of the installation steps are the same as above with the below differences for the relevant sections. + +#### Available Packages + +| Package Name | Description | +|--------------------------------|---------------------------------------------------------------------------| +| pgbouncer_fdw | Package for the pgbouncer_fdw extension. Only necessary when using postgres_exporter | +| pgmonitor-pg-common | Package containing postgres_exporter items common for all versions of PostgreSQL | +| pgmonitor-pg##-extras | Crunchy-optimized configurations for postgres_exporter. Note that each major version of PostgreSQL has its own extras package (pgmonitor-pg13-extras, pgmonitor-pg14-extras, etc). | +| postgres_exporter | Base package for postgres_exporter | + + +#### Configuration File Installation + +The files contained in this repository are assumed to be installed in the following locations with the following names. In the instructions below, you should replace a double-hash (`##`) with the two-digit major version of PostgreSQL you are running (ex: 12, 13, 14, etc.). + +| pgMonitor Configuration File | System Location | +|------------------------------|-----------------| +| postgres_exporter/common/pg##/setup.sql | /etc/postgres_exporter/##/setup.sql | +| postgres_exporter/common/pg##/queries*.yml | /etc/postgres_exporter/##/queries*.yml | +| postgres_exporter/common/queries*.yml | /etc/postgres_exporter/##/queries*.yml | +| postgres_exporter/linux/crontab.txt | /etc/postgres_exporter/##/crontab.txt | +| postgres_exporter/linux/crunchy-postgres-exporter@.service | /usr/lib/systemd/system/crunchy-postgres-exporter@.service | +| postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg## | /etc/sysconfig/postgres_exporter_pg## | +| postgres_exporter/linux/pg##/sysconfig.postgres_exporter_pg##_per_db | /etc/sysconfig/postgres_exporter_pg##_per_db | +| postgres_exporter/linux/queries_*.yml | /etc/postgres_exporter/##/queries_*.yml | +| postgres_exporter/linux/pgbackrest-info.sh | /usr/bin/pgbackrest-info.sh | +| postgres_exporter/linux/pgmonitor.conf | /etc/pgmonitor.conf (multi-backrest-repository/container environment only) | + +#### Service Configuration + +The following files contain defaults that should enable the exporters to run effectively on your system for the purposes of using pgMonitor. Please take some time to review them. + +- {{< shell >}}/etc/sysconfig/postgres_exporter_pg##{{< /shell >}} +- {{< shell >}}/etc/sysconfig/postgres_exporter_pg##_per_db{{< /shell >}} + +Note that {{< shell >}}/etc/sysconfig/postgres_exporter_pg##{{< /shell >}} & {{< shell >}}postgres_exporter_pg##_per_db{{< /shell >}} are the default sysconfig files for monitoring the database running on the local socket at /var/run/postgresql and connect to the "postgres" database. If you've installed the pgMonitor setup to a different database, modify these files accordingly or make new ones. If you make new ones, ensure the service name you enable references this file (see the Enable Services section below ). + + + +#### Monitoring Setup + +| Query File | Description | +|-----------------------|----------------------------------------------------------------------------------------------------------| +| setup.sql | Creates `ccp_monitoring` role with all necessary grants. Creates all necessary database objects (functions, tables, etc) required for monitoring. | +| setup_metric_views.sql | Creates materialized views and maintenance objects for them. This feature is optional. See [Materialized View Metrics](#mat-view-metrics). | +| queries_bloat.yml | postgres_exporter query file to allow bloat monitoring. | +| queries_global.yml | postgres_exporter query file with minimal recommended queries that are common across all PG versions and only need to be run once per database instance. | +| queries_global_dbsize.yml | postgres_exporter query file that contains metrics for monitoring database size. This is a separate file to allow the option to use a materialized view for very large databases | +| queries_global_matview.yml | postgres_exporter query file that contains alternative metrics that use materialized views of common metrics across all PG versions | +| queries_per_db.yml | postgres_exporter query file with queries that gather per databse stats. WARNING: If your database has many tables this can greatly increase the storage requirements for your prometheus database. If necessary, edit the query to only gather tables you are interested in statistics for. The "PostgreSQL Details" and the "CRUD Details" Dashboards use these statistics. | +| queries_per_db_matview.yml | postgres_exporter query files that contains alternative metrics that use materialized views of per database stats | +| queries_general.yml | postgres_exporter query file for queries that are specific to the version of PostgreSQL that is being monitored. | +| queries_backrest.yml | postgres_exporter query file for monitoring pgBackRest backup status. By default, new backrest data is only collected every 10 minutes to avoid excessive load when there are large backup lists. See sysconfig file for exporter service to adjust this throttling. | +| queries_pgbouncer.yml | postgres_exporter query file for monitoring pgbouncer. | +| queries_pg_stat_statements.yml | postgres_exporter query file for specific pg_stat_statements metrics that are most useful for monitoring and trending. | + + +By default, there are two postgres_exporter services expected to be running. One connects to the default {{< shell >}}postgres{{< /shell >}} database that most PostgreSQL instances come with and is meant for collecting global metrics that are the same on all databases in the instance (connection/replication statistics, etc). This service uses the sysconfig file {{< shell >}}postgres_exporter_pg##{{< /shell >}}. Connect to this database and run the setup.sql script to install the required database objects for pgMonitor. + +The second postgres_exporter service is used to collect per-database metrics and uses the sysconfig file {{< shell >}}postgres_exporter_pg##_per_db{{< /shell >}}. By default it is set to also connect to the {{< shell >}}postgres{{< /shell >}} database, but you can add as many additional connection strings to this service for each individual database that you want metrics for. Per-db metrics include things like table/index statistics and bloat. See the section below for monitorig multiple databases for how to do this. + +Note that your pg_hba.conf will have to be configured to allow the {{< shell >}}ccp_monitoring{{< /shell >}} system user to connect as the {{< shell >}}ccp_monitoring{{< /shell >}} role to any database in the instance. As of version 4.0 of pg_monitor, the postgres_exporter service is set by default to connect via local socket, so passwordless local peer authentication is the expected default. If password-based authentication is required, we recommend using SCRAM authentication, which is supported as of version 0.7.x of postgres_exporter. See our blog post for more information on SCRAM - https://info.crunchydata.com/blog/how-to-upgrade-postgresql-passwords-to-scram + +postgres_exporter only takes a single yaml file as an argument for custom queries, so this requires concatenating the relevant files together. The sysconfig files for the service help with this concatenation task and define the variable {{< yaml >}}QUERY_FILE_LIST{{< /yaml >}}. Set this variable to a space delimited list of the full path names to all files that contain queries you want to be in the single file that postgres_exporter uses. + +For example, to use just the common queries for PostgreSQL 12 modify the relevant sysconfig file as follows: + +```bash +QUERY_FILE_LIST="/etc/postgres_exporter/12/queries_global.yml /etc/postgres_exporter/12/queries_general.yml" +``` + +As an another example, to include queries for PostgreSQL 13 as well as pgBackRest, modify the relevant sysconfig file as follows: + +```bash +QUERY_FILE_LIST="/etc/postgres_exporter/13/queries_global.yml /etc/postgres_exporter/13/queries_general.yml /etc/postgres_exporter/13/queries_backrest.yml" +``` + +For replica servers, the setup is the same except that the setup.sql file does not need to be run since writes cannot be done there and it was already run on the primary. + +#### Materialized View Metrics {#mat-view-metrics} + +With large databases/tables and some other conditions, certain metrics can cause excessive load. For those cases, materialized views and alternative metric queries have been made available. The materialized views are refreshed on their own schedule independent of the Prometheus data scrape, so any load that may be associated with gathering the underlying data is mitigated. A configuration table, seen below, contains options for how often these materialized views should be refreshed. And a single procedure can be called to refresh all materialized views relevant to monitoring. + +For every database that will be collecting materialized view metrics, you will have to run the {{< shell >}}setup_metric_views.sql{{< /shell >}} file against that database. This will likely need to be run as a superuser and must be run after running the base setup file mentioned above to create the necessary monitoring user first. +``` +psql -U postgres -d alphadb -f setup_metric_views.sql +psql -U postgres -d betadb -f setup_metric_views.sql +``` +The {{< shell >}}/etc/postgres_exporter/##/crontab.txt{{< /shell >}} file has an example entry for how to call the refresh procedure. You should modify this to run as often as you need depending on how recent you need your metric data to be. This procedure is safe to run on the primary or replicas and will safely exit if the database is in recovery mode. + +Configuration table {{< shell >}}monitor.metric_views{{< /shell >}}: + +| Column | Description | +|--------------------|------------------------------------------------------------------| +| view_schema | Schema containing the materialized view | +| view_name | Name of the materialized view | +| concurrent_refresh | Boolean that sets whether this materialized view can be refreshed concurrently (requires a unique index) | +| run_interval | How often this materialized view should have its data refreshed. Must be a value compatible with the PG interval type | +| last_run | Timestamp of the last time this view was refreshed | +| active | Boolean that sets whether this view should be refreshed when the procedure is called | +| scope | Whether the data contained in the view is per-database or instance-wide. Currently unused | + +You are also free to use this materialized view system for your own custom metrics as well. Simply make a materialized view, add its name to the configuration table and ensure the user running the refresh has permissions to do so for your view(s). + +##### PGBouncer + +In order to monitor pgbouncer with postgres_exporter, the pgbouncer_fdw maintained by CrunchyData is required. Please see its repository for full installation instructions. A package for this is available for Crunchy Data customers. + +https://github.com/CrunchyData/pgbouncer_fdw + +Once that is working, you should be able to add the {{< shell >}}queries_pgbouncer.yml{{< /shell >}} file to the {{< yaml >}}QUERY_FILE_LIST{{< /shell >}} for the exporter that is monitoring the database where the FDW was installed. + +#### Monitoring multiple databases and/or running multiple postgres exporters (RHEL) + +Certain metrics are not cluster-wide, so multiple exporters must be run to avoid duplication when monitoring multiple databases in a single PostgreSQL instance. To collect these per-database metrics, an additional exporter service is required and pgMonitor provides this using the following query file: ({{< shell >}}queries_per_db.yml{{< /shell >}}). In Prometheus, you can then define the global and per-db exporter targets for a single job. This will place all the metrics that are collected for a single database instance together. + +{{< note >}}The "setup.sql" file does not need to be run on these additional databases if using the queries that pgMonitor comes with.{{< /note >}} + +pgMonitor provides and recommends an example sysconfig file for this per-db exporter: {{< shell >}}sysconfig.postgres_exporter_pg##_per_db{{< /shell >}}. If you'd like to create additional exporter services for different query files, just copy the existing ones and modify the relevant lines, mainly the port, database name, and query file. The below example shows connecting to three databases in the same instance to collect their per-db metrics: `postgres`, `mydb1`, and `mydb2`. +``` +OPT="--web.listen-address=0.0.0.0:9188 --extend.query-path=/etc/postgres_exporter/14/queries_per_db.yml" +DATA_SOURCE_NAME="postgresql:///postgres?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb1?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable,postgresql:///mydb2?host=/var/run/postgresql/&user=ccp_monitoring&sslmode=disable" +``` +As was done with the exporter service that is collecting the global metrics, also modify the {{< yaml >}}QUERY_LIST_FILE{{< /yaml >}} in the new sysconfig file to only collect per-db metrics +``` +QUERY_FILE_LIST="/etc/postgres_exporter/14/queries_per_db.yml" +``` + +Since a systemd template is used for the postgres_exporter services, all you need to do is pass the sysconfig file name as part of the new service name. +``` +sudo systemctl enable crunchy-postgres-exporter@postgres_exporter_pg14_per_db +sudo systemctl start cruncy-postgres-exporter@postgres_exporter_pg14_per_db +sudo systemctl status crunchy-postgres-exporter@postgres_exporter_pg14_per_db + +``` +Lastly, update the Prometheus auto.d target file to include the new exporter in the same job you already had running for this system + +#### General Metrics + +*pg_up* - Database is up and connectable by metric collector. This metric is only available with postgres_exporter + diff --git a/hugo/content/grafana/_index.md b/hugo/content/grafana/_index.md index 5a572e63..492136c5 100644 --- a/hugo/content/grafana/_index.md +++ b/hugo/content/grafana/_index.md @@ -4,8 +4,6 @@ draft: false weight: 3 --- -There are RPM packages available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). Otherwise the Grafana RPM Package can be downloaded and installed from https://grafana.com/grafana/download. There is no difference between the Crunchy provided package and the one directly from Grafana. - - [Included Dashboards](#dashboards) - [Installation](#installation) - [Linux](#linux) @@ -43,7 +41,7 @@ pgMonitor comes with several dashboards ready to be used with automatic provisio #### With RPM Packages -There are RPM packages available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). +There are RPM packages available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). To access the pgMonitor packages, please follow the same instructions for setting up access to the Crunchy Postgres packages. If you install the below available packages with RPM, you can continue reading at the [Setup](#setup) section. @@ -74,6 +72,16 @@ Review the {{< shell >}}crunchy_grafana_dashboards.yml{{< /shell >}} file to ens Save all of the desired .json dashboard files to the {{< shell >}}/etc/grafana/crunchy_dashboards{{< /shell >}} folder. All of them are not required, so if there is a dashboard you do not need, it can be left out. +Please note that due to the change from postgres_exporter to sql_exporter, and its ability to connect directly to pgBouncer to collect its metrics, some dashboards are specific to one exporter or the other. Please use the relevant dashboards accordingly: + +| Dashboard file | Use when | +|---------------------------------------------------------------------------|-----------------------| +| grafana/postgres/sql_exporter/PG_Overview_sql_exporter.json | sql_exporter is collecting metrics | +| grafana/postgres/postgres_exporter/PG_Overview_postgres_exporter.json | postgres_exporter is collecting metrics | +| grafana/pgbouncer/direct/PGBouncer_direct.json | sql_exporter is connecting directly to pgBouncer for its metrics | +| grafana/pgbouncer/fdw/PGBouncer_fdw.json | postgres_exporter is using pgbouncer_fdw to collect pgBouncer metrics | + + ## Upgrading {#upgrading} Please review the ChangeLog for pgMonitor and take note of any changes to metric names and/or dashboards. Note that if you are using the included dashboards that are managed via the provisioning system, they will automatically be updated. If you've made any changes to configuration files and kept their default names, the package will not overwrite them and will instead make a new file with an {{< shell >}}*.rpmnew{{< /shell >}} extension. You can compare your file and the new one and incorporate any changes as needed or desired. diff --git a/hugo/content/prometheus/_index.md b/hugo/content/prometheus/_index.md index b1622dcb..ea3ce085 100644 --- a/hugo/content/prometheus/_index.md +++ b/hugo/content/prometheus/_index.md @@ -18,7 +18,7 @@ Prometheus can be set up on any Linux-based system, but pgMonitor currently only #### With RPM Packages -There are RPM packages available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). +There are RPM packages available to [Crunchy Data](https://www.crunchydata.com) customers through the [Crunchy Customer Portal](https://access.crunchydata.com/). To access the pgMonitor packages, please follow the same instructions for setting up access to the Crunchy Postgres packages. After installing via these RPMs, you can continue reading at the [Setup](#setup) section. diff --git a/prometheus/common/alert-rules.d/crunchy-alert-rules-pg.yml.example b/prometheus/common/alert-rules.d/crunchy-alert-rules-pg.yml.example index 85af401d..fa250d67 100644 --- a/prometheus/common/alert-rules.d/crunchy-alert-rules-pg.yml.example +++ b/prometheus/common/alert-rules.d/crunchy-alert-rules-pg.yml.example @@ -9,27 +9,89 @@ groups: rules: ########## EXPORTER RULES ########## - - alert: PGExporterScrapeError - expr: pg_exporter_last_scrape_error > 0 + - alert: SQLExporterScrapeError + expr: scrape_errors_total > 0 for: 60s labels: service: postgresql severity: critical severity_num: 300 annotations: - summary: 'Postgres Exporter running on {{ $labels.job }} (instance: {{ $labels.instance }}) is encountering scrape errors processing queries. Error count: ( {{ $value }} )' + summary: 'sql_exporter running on {{ $labels.job }} (instance: {{ $labels.instance }}) is encountering scrape errors processing queries. Error count: ( {{ $value }} )' + + +########## PGMONITOR EXTENSION RULES ########## + - alert: PGMonitorMatViewRefreshTime + expr: ccp_metric_matview_refresh_longest_runtime_seconds > 65 + for: 60s + labels: + service: postgresql + severity: warning + severity_num: 200 + annotations: + summary: 'Materialized view refresh on {{ $labels.job }} (instance: {{ $labels.instance }}) is taking longer than expected to run. Longest time recorded: ( {{ $value }} )' + + - alert: PGMonitorMatViewRefreshTime + expr: ccp_metric_matview_refresh_longest_runtime_seconds > 300 + for: 60s + labels: + service: postgresql + severity: critical + severity_num: 300 + annotations: + summary: 'Materialized view refresh on {{ $labels.job }} (instance: {{ $labels.instance }}) is taking longer than expected to run. Longest time recorded: ( {{ $value }} )' + + - alert: PGMonitorTableRefreshTime + expr: ccp_metric_table_refresh_longest_runtime_seconds > 65 + for: 60s + labels: + service: postgresql + severity: warning + severity_num: 200 + annotations: + summary: 'Table refresh on {{ $labels.job }} (instance: {{ $labels.instance }}) is taking longer than expected to run. Longest time recorded: ( {{ $value }} )' + + - alert: PGMonitorTableRefreshTime + expr: ccp_metric_table_refresh_longest_runtime_seconds > 300 + for: 60s + labels: + service: postgresql + severity: critical + severity_num: 300 + annotations: + summary: 'Table refresh on {{ $labels.job }} (instance: {{ $labels.instance }}) is taking longer than expected to run. Longest time recorded: ( {{ $value }} )' + + - alert: PGMonitorMatViewRefreshFail + expr: ccp_metric_matview_refresh_last_run_fail_count > 0 + for: 60s + labels: + service: postgresql + severity: critical + severity_num: 300 + annotations: + summary: 'Materialized view refresh on {{ $labels.job }} (instance: {{ $labels.instance }}) has not run within the expected interval of time. Number of objects not refreshed: ( {{ $value }} )' + + - alert: PGMonitorTableRefreshFail + expr: ccp_metric_table_refresh_last_run_fail_count > 0 + for: 60s + labels: + service: postgresql + severity: critical + severity_num: 300 + annotations: + summary: 'Table refresh on {{ $labels.job }} (instance: {{ $labels.instance }}) has not run within the expected interval of time. Number of objects not refreshed: ( {{ $value }} )' ########## POSTGRESQL RULES ########## - alert: PGIsUp - expr: pg_up < 1 + expr: up{exp_type="pg"} < 1 for: 60s labels: service: postgresql severity: critical severity_num: 300 annotations: - summary: 'postgres_exporter running on {{ $labels.job }} is unable to communicate with the configured database' + summary: 'sql_exporter running on {{ $labels.job }} is down or unable to communicate with the configured database' - alert: PGNoPrimary expr: max by (cluster_name) (ccp_is_in_recovery_status) < 2 @@ -44,7 +106,7 @@ groups: ## Example to check for current version of PostgreSQL. Metric returns the version that the exporter is running on, so you can set a rule to check for the minimum version you'd like all systems to be on. Number returned is the 6 digit integer representation contained in the setting "server_version_num". # # - alert: PGMinimumVersion -# expr: ccp_postgresql_version_current < 110005 +# expr: ccp_postgresql_version_current < 160000 # for: 60s # labels: # service: postgresql @@ -96,7 +158,7 @@ groups: ## Optional monitor for changes to pg_settings (postgresql.conf) system catalog. -## A similar metric is available for monitoring pg_hba.conf. See ccp_hba_settings_checksum(). +## A similar metric is available for monitoring pg_hba.conf. See ccp_hba_settings_checksum. ## If metric returns 0, then NO settings have changed for either pg_settings since last known valid state ## If metric returns 1, then pg_settings have changed since last known valid state ## To see what may have changed, check the monitor.pg_settings_checksum table for a history of config state. diff --git a/prometheus/linux/crunchy-prometheus.yml b/prometheus/linux/crunchy-prometheus.yml index 50cc3dd0..e80eea76 100644 --- a/prometheus/linux/crunchy-prometheus.yml +++ b/prometheus/linux/crunchy-prometheus.yml @@ -7,11 +7,6 @@ global: scrape_interval: 15s # By default, scrape targets every 15 seconds. -# Attach these labels to any time series or alerts when communicating with -# external systems (federation, remote storage, Alertmanager). -#external_labels: -# monitor: 'codelab-monitor' - # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. #scrape_configs: @@ -27,26 +22,27 @@ scrape_configs: - files: - /etc/prometheus/auto.d/*.yml - metric_relabel_configs: - # Do not store the metrics that come built into postgres_exporter - # Version 0.4.5+ of postgres_exporter has option to disable most of these, but ignore here as well for older versions - - source_labels: [ __name__ ] - regex: '(pg_locks_count.*|pg_settings.*|pg_stat_activity.*|pg_stat_bgwriter.*|pg_stat_database.*)' - action: drop - # Version 0.5+ of postgres_exporter automatically adds a "server" label to all custom query metrics. This breaks upgrades from older versions - # of pgmonitor and also breaks our PG Overview dashboard and several other single metric panels. - # pgmonitor only runs two exporters max by default and our per-db exporter distinguishes each metric by a dbname label, - # so we do not need the "server" label. This relabel will only target metrics that start with "ccp_", so shouldn't break users' custom metrics. - - source_labels: [__name__, server] - regex: "ccp_.*;.+" - action: replace - target_label: server - replacement: "" + ### The following sections are only relevant if postgres_exporter is in use and MUST be enable if so. Remove the single # sections + # + #metric_relabel_configs: + ## Do not store the metrics that come built into postgres_exporter + #- source_labels: [ __name__ ] + # regex: '(pg_locks_count.*|pg_settings.*|pg_stat_activity.*|pg_stat_bgwriter.*|pg_stat_database.*)' + # action: drop + ## Version 0.5+ of postgres_exporter automatically adds a "server" label to all custom query metrics. This breaks upgrades from older versions + ## of pgmonitor and also breaks our PG Overview dashboard and several other single metric panels. + ## pgmonitor only runs two exporters max by default and our per-db exporter distinguishes each metric by a dbname label, + ## so we do not need the "server" label. This relabel will only target metrics that start with "ccp_", so shouldn't break users' custom metrics. + #- source_labels: [__name__, server] + # regex: "ccp_.*;.+" + # action: replace + # target_label: server + # replacement: "" + ### END postgres_exporter section ## Monitoring for tcp services that don't have an associated exporter can be accomplished using the tcp probe ## of the blackbox_exporter provided by the Prometheus developers. ## Note this only provides a simple up/down that the service is listening on the given IP/port. - ## If an exporter is available, an Absence alert for each node is recommended over a blackbox probe. ## Below is an example to monitor the services indicated by the comment. ## The "targets" list is all that should need to be edited to customize to your setup assuming blackbox_exporter runs ## on same system as Prometheus. diff --git a/sql_exporter/common/crunchy_backrest_collector.yml b/sql_exporter/common/crunchy_backrest_collector.yml new file mode 100644 index 00000000..8bfae4fa --- /dev/null +++ b/sql_exporter/common/crunchy_backrest_collector.yml @@ -0,0 +1,149 @@ +collector_name: crunchy_pgbackrest + +metrics: + - metric_name: ccp_backrest_last_info_backrest_repo_version + type: gauge + help: "pgBackRest version number when this backup was performed" + values: [backrest_repo_version] + key_labels: + - config_file + - stanza + - repo + - backup_type + query_ref: ccp_backrest_last_info + - metric_name: ccp_backrest_last_info_repo_backup_size_bytes + type: gauge + help: "Actual size of only this individual backup in the pgbackrest repository" + values: [repo_backup_size_bytes] + key_labels: + - config_file + - stanza + - repo + - backup_type + query_ref: ccp_backrest_last_info + - metric_name: ccp_backrest_last_info_repo_total_size_bytes + type: gauge + help: "Total size of this backup in the pgbackrest repository, including all required previous backups and WAL" + values: [repo_total_size_bytes] + key_labels: + - config_file + - stanza + - repo + - backup_type + query_ref: ccp_backrest_last_info + - metric_name: ccp_backrest_last_info_backup_runtime_seconds + type: gauge + help: "Total runtime in seconds of this backup" + values: [backup_runtime_seconds] + key_labels: + - config_file + - stanza + - repo + - backup_type + query_ref: ccp_backrest_last_info + - metric_name: ccp_backrest_last_info_backup_error + type: gauge + help: "An error has been encountered in the backup. Check logs for more information." + values: [backup_error] + key_labels: + - config_file + - stanza + - repo + - backup_type + query_ref: ccp_backrest_last_info + + + - metric_name: ccp_backrest_oldest_full_backup_time_seconds + type: gauge + help: "Seconds since the oldest completed full backup" + values: [time_seconds] + key_labels: + - config_file + - stanza + - repo + query_ref: ccp_backrest_oldest_full_backup + + + - metric_name: ccp_backrest_last_full_backup_time_since_completion_seconds + type: gauge + help: "Seconds since the last completed full backup" + values: [time_since_completion_seconds] + key_labels: + - config_file + - stanza + - repo + query_ref: ccp_backrest_last_full_backup + + + - metric_name: ccp_backrest_last_diff_backup_time_since_completion_seconds + type: gauge + help: "Seconds since the last completed full or differential backup. Differential is always based off last full." + values: [time_since_completion_seconds] + key_labels: + - config_file + - stanza + - repo + query_ref: ccp_backrest_last_diff_backup + + + - metric_name: ccp_backrest_last_incr_backup_time_since_completion_seconds + type: gauge + help: "Seconds since the last completed full, differential or incremental backup. Incremental is always based off last full or differential." + values: [time_since_completion_seconds] + key_labels: + - config_file + - stanza + - repo + query_ref: ccp_backrest_last_incr_backup + + +########## QUERIES ########## +queries: + - query_name: ccp_backrest_last_info + query: | + SELECT backrest_repo_version + , config_file + , stanza + , repo + , backup_type + , repo_backup_size_bytes + , repo_total_size_bytes + , backup_runtime_seconds + , backup_error + FROM pgmonitor_ext.ccp_backrest_last_info + + + - query_name: ccp_backrest_oldest_full_backup + query: | + SELECT config_file + , stanza + , repo + , time_seconds + FROM pgmonitor_ext.ccp_backrest_oldest_full_backup + + + - query_name: ccp_backrest_last_full_backup + query: | + SELECT config_file + , stanza + , repo + , time_since_completion_seconds + FROM pgmonitor_ext.ccp_backrest_last_full_backup + + + - query_name: ccp_backrest_last_diff_backup + query: | + SELECT config_file + , stanza + , repo + , time_since_completion_seconds + FROM pgmonitor_ext.ccp_backrest_last_diff_backup + + + - query_name: ccp_backrest_last_incr_backup + query: | + SELECT config_file + , stanza + , repo + , time_since_completion_seconds + FROM pgmonitor_ext.ccp_backrest_last_incr_backup diff --git a/sql_exporter/common/crunchy_bloat_check_collector.yml b/sql_exporter/common/crunchy_bloat_check_collector.yml new file mode 100644 index 00000000..08bdd94e --- /dev/null +++ b/sql_exporter/common/crunchy_bloat_check_collector.yml @@ -0,0 +1,36 @@ +collector_name: crunchy_bloat_check + +metrics: + - metric_name: ccp_bloat_check_size_bytes + type: gauge + help: "Size of object in bytes" + values: [size_bytes] + key_labels: + - dbname + - schemaname + - objectname + query_ref: ccp_bloat_check + + - metric_name: ccp_bloat_check_total_wasted_space_bytes + type: gauge + help: "Total wasted space in bytes of given object" + values: [total_wasted_space_bytes] + key_labels: + - dbname + - schemaname + - objectname + query_ref: ccp_bloat_check + + +########## QUERIES ########## +queries: + - query_name: ccp_bloat_check + query: | + SELECT current_database() AS dbname + , schemaname + , objectname + , size_bytes + , (dead_tuple_size_bytes + (free_space_bytes - (relpages - (fillfactor/100) * relpages ) * current_setting('block_size')::bigint ))::bigint AS total_wasted_space_bytes + FROM bloat_stats + + diff --git a/sql_exporter/common/crunchy_global_collector.yml b/sql_exporter/common/crunchy_global_collector.yml new file mode 100644 index 00000000..47efc2bd --- /dev/null +++ b/sql_exporter/common/crunchy_global_collector.yml @@ -0,0 +1,544 @@ +collector_name: crunchy_global + +metrics: + - metric_name: ccp_archive_command_status_seconds_since_last_fail + type: gauge + help: "Seconds since the last recorded failure of the archive_command" + values: [seconds_since_last_fail] + query_ref: ccp_archive_command_status + - metric_name: ccp_archive_command_status_seconds_since_last_archive + type: gauge + help: "Seconds since the last successful archive operation" + values: [seconds_since_last_archive] + query_ref: ccp_archive_command_status + - metric_name: ccp_archive_command_status_archived_count + type: gauge + help: "Number of WAL files that have been successfully archived" + values: [archived_count] + query_ref: ccp_archive_command_status + - metric_name: ccp_archive_command_status_failed_count + type: gauge + help: "Number of failed attempts for archiving WAL files" + values: [failed_count] + query_ref: ccp_archive_command_status + + + - metric_name: ccp_connection_stats_active + type: gauge + help: "Total non-idle connections" + values: [active] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_total + type: gauge + help: "Total idle and non-idle connections" + values: [total] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_idle + type: gauge + help: "Total idle connections" + values: [idle] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_idle_in_txn + type: gauge + help: "Total idle in transaction connections" + values: [idle_in_txn] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_max_idle_in_txn_time + type: gauge + help: "Length of time in seconds of the longest idle in transaction session" + values: [max_idle_in_txn_time] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_max_query_time + type: gauge + help: "Length of time in seconds of the longest running query" + values: [max_query_time] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_max_blocked_query_time + type: gauge + help: "Length of time in seconds of the longest running query that has been blocked by a heavyweight lock" + values: [max_blocked_query_time] + query_ref: ccp_connection_stats + - metric_name: ccp_connection_stats_max_connections + type: gauge + help: "Value of max_connections for the monitored database" + values: [max_connections] + query_ref: ccp_connection_stats + + + - metric_name: ccp_database_size_bytes + type: gauge + help: "Database size in bytes" + values: [bytes] + key_labels: + - dbname + query_ref: ccp_database_size + + + - metric_name: ccp_is_in_recovery_status + type: gauge + help: "Return value of 1 means database is in recovery. Otherwise 2 it is a primary." + values: [status] + query_ref: ccp_is_in_recovery + + + - metric_name: ccp_locks_count + type: gauge + help: "Number of locks per mode type" + values: [count] + key_labels: + - dbname + - mode + query_ref: ccp_locks + + + - metric_name: ccp_pg_hba_checksum_status + type: gauge + help: "Value of checksum monitioring status for pg_catalog.pg_hba_file_rules (pg_hba.conf). 0 = valid config. 1 = settings changed. To reset current config to valid after alert, run pgmonitor_ext.pg_hba_checksum_set_valid()." + values: [status] + query_ref: ccp_pg_hba_checksum + + + - metric_name: ccp_pg_settings_checksum_status + type: gauge + help: "Value of checksum monitioring status for pg_catalog.pg_settings (postgresql.conf). 0 = valid config. 1 = settings changed. To reset current config to valid after alert, run pgmonitor_ext.pg_settings_checksum_set_valid()." + values: [status] + query_ref: ccp_pg_settings_checksum + + + - metric_name: ccp_postgresql_version_current + type: gauge + help: "The current version of PostgreSQL that this exporter is running on as a 6 digit integer (######)." + values: [current] + query_ref: ccp_postgresql_version + + + - metric_name: ccp_postmaster_runtime_start_time_seconds + type: gauge + help: "Time at which postmaster started. Note this metric has been deprecated as of pgMonitor 4.3 and will be removed in a future version. Use ccp_postmaster_uptime_seconds instead." + values: [start_time_seconds] + query_ref: ccp_postmaster_runtime + + + - metric_name: ccp_postmaster_uptime_seconds + type: gauge + help: "Time interval in seconds since PostgreSQL database was last restarted" + values: [seconds] + query_ref: ccp_postmaster_uptime + + + - metric_name: ccp_replication_lag_received_time + type: gauge + help: "Length of time since the last WAL file was received and replayed on replica. Always increases, possibly causing false positives if the primary stops writing. Monitors for replicas that stop receiving WAL all together." + values: [received_time] + query_ref: ccp_replication_lag + - metric_name: ccp_replication_lag_replay_time + type: gauge + help: "Length of time since the last transaction was replayed on replica. Returns zero if last WAL recieved equals last WAL replayed. Avoids false positives when primary stops writing. Monitors for replicas that cannot keep up with primary WAL generation." + values: [replay_time] + query_ref: ccp_replication_lag + + + - metric_name: ccp_replication_lag_size_bytes + type: gauge + help: "Replication lag in bytes" + values: [bytes] + key_labels: + - replica + - replica_hostname + - replica_port + query_ref: ccp_replication_lag_size + + + - metric_name: ccp_replication_slots_active + type: gauge + help: "Active state of slot. 1 = true. 0 = false." + values: [active] + key_labels: + - slot_name + query_ref: ccp_replication_slots + - metric_name: ccp_replication_slots_retained_bytes + type: gauge + help: "The amount of WAL (in bytes) being retained for this slot" + values: [retained_bytes] + key_labels: + - slot_name + query_ref: ccp_replication_slots + + + - metric_name: ccp_sequence_exhaustion_count + type: gauge + help: "Count of sequences that have reached greater than or equal to 75% of their max available numbers. Function monitor.sequence_status() can provide more details if run directly on system." + values: [count] + query_ref: ccp_sequence_exhaustion + + + - metric_name: ccp_settings_pending_restart_count + type: gauge + help: "Number of settings from pg_settings catalog in a pending_restart state" + values: [count] + query_ref: ccp_settings_pending_restart + + + - metric_name: ccp_stat_bgwriter_checkpoints_timed + type: gauge + help: "Number of scheduled checkpoints that have been performed" + values: [checkpoints_timed] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_checkpoints_req + type: gauge + help: "Number of requested checkpoints that have been performed" + values: [checkpoints_req] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_checkpoint_write_time + type: gauge + help: "Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds" + values: [checkpoint_write_time] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_checkpoint_sync_time + type: gauge + help: "Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds" + values: [checkpoint_sync_time] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_buffers_checkpoint + type: gauge + help: "Number of buffers written during checkpoints" + values: [buffers_checkpoint] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_buffers_clean + type: gauge + help: "Number of buffers written by the background writer" + values: [buffers_clean] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_maxwritten_clean + type: gauge + help: "Number of times the background writer stopped a cleaning scan because it had written too many buffers" + values: [maxwritten_clean] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_buffers_backend + type: gauge + help: "Number of buffers written directly by a backend" + values: [buffers_backend] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_buffers_backend_fsync + type: gauge + help: "Number of times a backend had to execute its own fsync call (normally the background writer handles those even when the backend does its own write)" + values: [buffers_backend_fsync] + query_ref: ccp_stat_bgwriter + - metric_name: ccp_stat_bgwriter_buffers_alloc + type: gauge + help: "Number of buffers allocated" + values: [buffers_alloc] + query_ref: ccp_stat_bgwriter + + - metric_name: ccp_stat_database_xact_commit + type: gauge + help: "Number of transactions in this database that have been committed" + values: [xact_commit] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_xact_rollback + type: gauge + help: "Number of transactions in this database that have been rolled back" + values: [xact_rollback] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_blks_read + type: gauge + help: "Number of disk blocks read in this database" + values: [blks_read] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_blks_hit + type: gauge + help: "Number of times disk blocks were found already in the buffer cache, so that a read was not necessary" + values: [blks_hit] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_tup_returned + type: gauge + help: "Number of rows returned by queries in this database" + values: [tup_returned] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_tup_fetched + type: gauge + help: "Number of rows fetched by queries in this database" + values: [tup_fetched] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_tup_inserted + type: gauge + help: "Number of rows inserted by queries in this database" + values: [tup_inserted] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_tup_updated + type: gauge + help: "Number of rows updated by queries in this database" + values: [tup_updated] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_tup_deleted + type: gauge + help: "Number of rows deleted by queries in this database" + values: [tup_deleted] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_conflicts + type: gauge + help: "Number of queries canceled due to conflicts with recovery in this database" + values: [conflicts] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_temp_files + type: gauge + help: "Number of temporary files created by queries in this database. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing), and regardless of the log_temp_files setting." + values: [temp_files] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_temp_bytes + type: gauge + help: "Total amount of data written to temporary files by queries in this database" + values: [temp_bytes] + key_labels: + - dbname + query_ref: ccp_stat_database + - metric_name: ccp_stat_database_deadlocks + type: gauge + help: "Number of deadlocks detected in this database" + values: [deadlocks] + key_labels: + - dbname + query_ref: ccp_stat_database + + + - metric_name: ccp_transaction_wraparound_oldest_current_xid + type: gauge + help: "Oldest current transaction ID in cluster" + values: [oldest_current_xid] + query_ref: ccp_transaction_wraparound + - metric_name: ccp_transaction_wraparound_percent_towards_wraparound + type: gauge + help: "Percentage towards transaction ID exhaustion/wraparound" + values: [percent_towards_wraparound] + query_ref: ccp_transaction_wraparound + - metric_name: ccp_transaction_wraparound_percent_towards_emergency_autovac + type: gauge + help: "Percentage towards transaction ID wraparound" + values: [percent_towards_emergency_autovac] + query_ref: ccp_transaction_wraparound + + + - metric_name: ccp_wal_activity_last_5_min_size_bytes + type: gauge + help: "Current size in bytes of the last 5 minutes of WAL generation. Includes recycled WALs." + values: [last_5_min_size_bytes] + query_ref: ccp_wal_activity + - metric_name: ccp_wal_activity_total_size_bytes + type: gauge + help: "Current size in bytes of the WAL directory" + values: [total_size_bytes] + query_ref: ccp_wal_activity + +# - metric_name: +# type: gauge +# help: +# values: [] +# query_ref: + +########## QUERIES ########## +queries: + + - query_name: ccp_archive_command_status + query: | + SELECT CASE + WHEN EXTRACT(epoch from (last_failed_time - last_archived_time)) IS NULL THEN 0 + WHEN EXTRACT(epoch from (last_failed_time - last_archived_time)) < 0 THEN 0 + ELSE EXTRACT(epoch from (last_failed_time - last_archived_time)) + END AS seconds_since_last_fail + , EXTRACT(epoch from (CURRENT_TIMESTAMP - last_archived_time)) AS seconds_since_last_archive + , archived_count + , failed_count + FROM pg_catalog.pg_stat_archiver + + + - query_name: ccp_connection_stats + query: | + SELECT ((total - idle) - idle_in_txn) AS active + , total + , idle + , idle_in_txn + , (select coalesce(extract(epoch from (max(clock_timestamp() - state_change))),0) from pg_catalog.pg_stat_activity where state = 'idle in transaction') AS max_idle_in_txn_time + , (select coalesce(extract(epoch from (max(clock_timestamp() - query_start))),0) from pg_catalog.pg_stat_activity where backend_type = 'client backend' AND state NOT LIKE 'idle%' ) AS max_query_time + , (select coalesce(extract(epoch from (max(clock_timestamp() - query_start))),0) from pg_catalog.pg_stat_activity where backend_type = 'client backend' and wait_event_type = 'Lock' ) AS max_blocked_query_time + , max_connections + FROM ( + SELECT count(*) AS total + , COALESCE(SUM(CASE WHEN state = 'idle' THEN 1 ELSE 0 END),0) AS idle + , COALESCE(SUM(CASE WHEN state = 'idle in transaction' THEN 1 ELSE 0 END),0) AS idle_in_txn FROM pg_catalog.pg_stat_activity) x + JOIN (SELECT setting::float AS max_connections FROM pg_settings WHERE name = 'max_connections') xx ON (true) + + + - query_name: ccp_database_size + query: | + SELECT dbname + , bytes + FROM pgmonitor_ext.ccp_database_size + + + - query_name: ccp_is_in_recovery + query: | + SELECT CASE WHEN pg_is_in_recovery = true THEN 1 ELSE 2 END AS status + FROM pg_is_in_recovery() + + + - query_name: ccp_locks + query: | + SELECT dbname + , mode + , count + FROM pgmonitor_ext.ccp_locks + + + - query_name: ccp_pg_hba_checksum + query: | + SELECT pgmonitor_ext.pg_hba_checksum() AS status + + + - query_name: ccp_pg_settings_checksum + query: | + SELECT pgmonitor_ext.pg_settings_checksum() AS status + + + - query_name: ccp_postgresql_version + query: | + SELECT current_setting('server_version_num')::int AS current + + + - query_name: ccp_postmaster_runtime + query: | + SELECT extract('epoch' from pg_postmaster_start_time) as start_time_seconds from pg_catalog.pg_postmaster_start_time() + + + - query_name: ccp_postmaster_uptime + query: | + SELECT extract(epoch from (clock_timestamp() - pg_postmaster_start_time() )) AS seconds + + + - query_name: ccp_replication_lag + query: | + SELECT + CASE + WHEN (pg_last_wal_receive_lsn() = pg_last_wal_replay_lsn()) OR (pg_is_in_recovery() = false) THEN 0 + ELSE EXTRACT (EPOCH FROM clock_timestamp() - pg_last_xact_replay_timestamp())::INTEGER + END + AS replay_time + , CASE + WHEN pg_is_in_recovery() = false THEN 0 + ELSE EXTRACT (EPOCH FROM clock_timestamp() - pg_last_xact_replay_timestamp())::INTEGER + END + AS received_time + + + - query_name: ccp_replication_lag_size + query: | + SELECT client_addr AS replica + , client_hostname AS replica_hostname + , client_port AS replica_port + , pg_wal_lsn_diff(sent_lsn, replay_lsn) AS bytes + FROM pg_catalog.pg_stat_replication + + + - query_name: ccp_replication_slots + query: | + SELECT slot_name + , active::int + , pg_wal_lsn_diff(CASE WHEN pg_is_in_recovery() THEN pg_last_wal_replay_lsn() ELSE pg_current_wal_insert_lsn() END, restart_lsn) AS retained_bytes + FROM pg_catalog.pg_replication_slots + + + - query_name: ccp_sequence_exhaustion + query: | + SELECT count FROM pgmonitor_ext.sequence_exhaustion(75) + + + - query_name: ccp_settings_pending_restart + query: | + SELECT count(*) AS count FROM pg_catalog.pg_settings WHERE pending_restart = true + + + - query_name: ccp_stat_bgwriter + query: | + SELECT checkpoints_timed + , checkpoints_req + , checkpoint_write_time + , checkpoint_sync_time + , buffers_checkpoint + , buffers_clean + , maxwritten_clean + , buffers_backend + , buffers_backend_fsync + , buffers_alloc + FROM pgmonitor_ext.ccp_stat_bgwriter + + + - query_name: ccp_stat_database + query: | + SELECT d.datname AS dbname + , s.xact_commit + , s.xact_rollback + , s.blks_read + , s.blks_hit + , s.tup_returned + , s.tup_fetched + , s.tup_inserted + , s.tup_updated + , s.tup_deleted + , s.conflicts + , s.temp_files + , s.temp_bytes + , s.deadlocks + FROM pg_catalog.pg_stat_database s + JOIN pg_catalog.pg_database d ON d.datname = s.datname + WHERE d.datistemplate = false + + + - query_name: ccp_transaction_wraparound + query: | + WITH max_age AS ( + SELECT 2000000000 as max_old_xid, setting AS autovacuum_freeze_max_age FROM pg_catalog.pg_settings WHERE name = 'autovacuum_freeze_max_age' + ) + , per_database_stats AS ( + SELECT datname + , m.max_old_xid::int + , m.autovacuum_freeze_max_age::int + , age(d.datfrozenxid) AS oldest_current_xid + FROM pg_catalog.pg_database d + JOIN max_age m ON (true) WHERE d.datallowconn + ) + SELECT max(oldest_current_xid) AS oldest_current_xid + , max(ROUND(100*(oldest_current_xid/max_old_xid::float))) AS percent_towards_wraparound + , max(ROUND(100*(oldest_current_xid/autovacuum_freeze_max_age::float))) AS percent_towards_emergency_autovac + FROM per_database_stats + + + - query_name: ccp_wal_activity + query: | + SELECT last_5_min_size_bytes + , (SELECT COALESCE(sum(size),0) FROM pg_catalog.pg_ls_waldir()) AS total_size_bytes + FROM (SELECT COALESCE(sum(size),0) AS last_5_min_size_bytes + FROM pg_catalog.pg_ls_waldir() + WHERE modification > CURRENT_TIMESTAMP - '5 minutes'::interval) x + + diff --git a/sql_exporter/common/crunchy_per_db_collector.yml b/sql_exporter/common/crunchy_per_db_collector.yml new file mode 100644 index 00000000..17f79457 --- /dev/null +++ b/sql_exporter/common/crunchy_per_db_collector.yml @@ -0,0 +1,244 @@ +collector_name: crunchy_per_db + + +metrics: + - metric_name: ccp_table_size_bytes + type: gauge + help: "Table size in bytes including indexes" + values: [size_bytes] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_table_size + + - metric_name: ccp_stat_user_tables_seq_scan + type: gauge + help: "Number of sequential scans initiated on this table" + values: [seq_scan] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_seq_tup_read + type: gauge + help: "Number of live rows fetched by sequential scans" + values: [seq_tup_read] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_idx_scan + type: gauge + help: "Number of index scans initiated on this table" + values: [idx_scan] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_idx_tup_fetch + type: gauge + help: "Number of live rows fetched by index scans" + values: [idx_tup_fetch] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_n_tup_ins + type: gauge + help: "Number of rows inserted" + values: [n_tup_ins] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_n_tup_upd + type: gauge + help: "Number of rows updated" + values: [n_tup_upd] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_n_tup_del + type: gauge + help: "Number of rows deleted" + values: [n_tup_del] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_n_tup_hot_upd + type: gauge + help: "Number of rows HOT updated (i.e., with no separate index update required)" + values: [n_tup_hot_upd] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_n_live_tup + type: gauge + help: "Estimated number of live rows" + values: [n_live_tup] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_n_dead_tup + type: gauge + help: "Estimated number of dead rows" + values: [n_dead_tup] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_vacuum_count + type: gauge + help: "Number of times this table has been manually vacuumed (not counting VACUUM FULL)" + values: [vacuum_count] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_autovacuum_count + type: gauge + help: "Number of times this table has been vacuumed by the autovacuum daemon" + values: [autovacuum_count] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_analyze_count + type: gauge + help: "Number of times this table has been manually analyzed" + values: [analyze_count] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_stat_user_tables_autoanalyze_count + type: gauge + help: "Number of times this table has been analyzed by the autovacuum daemon" + values: [autoanalyze_count] + key_labels: + - dbname + - schemaname + - relname + query_ref: ccp_stat_user_tables + + - metric_name: ccp_metric_matview_refresh_last_run_fail_count + type: gauge + help: "Number of pgMonitor materialized view refreshes that have not completed a run within the expected time interval" + values: [count] + key_labels: + - dbname + query_ref: ccp_metric_matview_refresh_last_run_fail + + - metric_name: ccp_metric_table_refresh_last_run_fail_count + type: gauge + help: "Number of pgMonitor table refreshes that have not completed a run within the expected time interval" + values: [count] + key_labels: + - dbname + query_ref: ccp_metric_table_refresh_last_run_fail + + - metric_name: ccp_metric_matview_refresh_longest_runtime_seconds + type: gauge + help: "Longest runtime in seconds for pgMonitor materialized view refreshes" + values: [seconds] + key_labels: + - dbname + query_ref: ccp_metric_matview_refresh_longest_runtime + + - metric_name: ccp_metric_table_refresh_longest_runtime_seconds + type: gauge + help: "Longest runtime in seconds for pgMonitor table refreshes" + values: [seconds] + key_labels: + - dbname + query_ref: ccp_metric_table_refresh_longest_runtime + +queries: + - query_name: ccp_table_size + query: | + SELECT dbname + , schemaname + , relname + , size_bytes + FROM pgmonitor_ext.ccp_table_size + + - query_name: ccp_stat_user_tables + query: | + SELECT current_database() as dbname + , schemaname + , relname + , seq_scan + , seq_tup_read + , idx_scan + , idx_tup_fetch + , n_tup_ins + , n_tup_upd + , n_tup_del + , n_tup_hot_upd + , n_live_tup + , n_dead_tup + , vacuum_count + , autovacuum_count + , analyze_count + , autoanalyze_count + FROM pgmonitor_ext.ccp_stat_user_tables + + - query_name: ccp_metric_matview_refresh_last_run_fail + query: | + SELECT current_database() AS dbname + , count(*) AS count + FROM pgmonitor_ext.metric_views + WHERE active + AND materialized_view + AND ((last_run < (current_timestamp - run_interval)) OR last_run is NULL) + + - query_name: ccp_metric_table_refresh_last_run_fail + query: | + SELECT current_database() AS dbname + , count(*) AS count + FROM pgmonitor_ext.metric_tables + WHERE active + AND ((last_run < (current_timestamp - run_interval)) OR last_run is NULL) + + - query_name: ccp_metric_matview_refresh_longest_runtime + query: | + SELECT current_database() AS dbname + , extract('epoch' from max(last_run_time)) AS seconds + FROM pgmonitor_ext.metric_views + + - query_name: ccp_metric_table_refresh_longest_runtime + query: | + SELECT current_database() AS dbname + , extract('epoch' from max(last_run_time)) AS seconds + FROM pgmonitor_ext.metric_tables diff --git a/sql_exporter/common/crunchy_pg_stat_statements_collector.yml b/sql_exporter/common/crunchy_pg_stat_statements_collector.yml new file mode 100644 index 00000000..4a5a4033 --- /dev/null +++ b/sql_exporter/common/crunchy_pg_stat_statements_collector.yml @@ -0,0 +1,167 @@ + +collector_name: crunchy_pg_stat_statements + +metrics: + - metric_name: ccp_pg_stat_statements_total_calls_count + type: gauge + help: "Total number of queries run per user/database" + values: [calls_count] + key_labels: + - role + - dbname + query_ref: ccp_pg_stat_statements_total + - metric_name: ccp_pg_stat_statements_total_exec_time_ms + type: gauge + help: "Total runtime of all queries per user/database" + values: [exec_time_ms] + key_labels: + - role + - dbname + query_ref: ccp_pg_stat_statements_total + - metric_name: ccp_pg_stat_statements_total_mean_exec_time_ms + type: gauge + help: "Mean runtime of all queries per user/database" + values: [mean_exec_time_ms] + key_labels: + - role + - dbname + query_ref: ccp_pg_stat_statements_total + - metric_name: ccp_pg_stat_statements_total_row_count + type: gauge + help: "Total rows returned from all queries per user/database" + values: [row_count] + key_labels: + - role + - dbname + query_ref: ccp_pg_stat_statements_total + + + - metric_name: ccp_pg_stat_statements_top_mean_exec_time_ms + type: gauge + help: "Average query runtime in milliseconds" + values: [exec_time_ms] + key_labels: + - role + - dbname + - queryid + - query + query_ref: ccp_pg_stat_statements_top_mean + + + - metric_name: ccp_pg_stat_statements_top_total_exec_time_ms + type: gauge + help: "Total time spent in the statement in milliseconds" + values: [exec_time_ms] + key_labels: + - role + - dbname + - queryid + - query + query_ref: ccp_pg_stat_statements_top_total + + + - metric_name: ccp_pg_stat_statements_top_max_exec_time_ms + type: gauge + help: "Maximum time spent in the statement in milliseconds" + values: [exec_time_ms] + key_labels: + - role + - dbname + - queryid + - query + query_ref: ccp_pg_stat_statements_top_max + + + - metric_name: ccp_pg_stat_statements_top_wal_records + type: gauge + help: "Total number of WAL records generated by the statement" + values: [records] + key_labels: + - role + - dbname + - queryid + - query + query_ref: ccp_pg_stat_statements_top_wal + + - metric_name: ccp_pg_stat_statements_top_wal_fpi + type: gauge + help: "Total number of WAL full page images generated by the statement" + values: [fpi] + key_labels: + - role + - dbname + - queryid + - query + query_ref: ccp_pg_stat_statements_top_wal + + - metric_name: ccp_pg_stat_statements_top_wal_bytes + type: gauge + help: "Total amount of WAL generated by the statement in bytes" + values: [bytes] + key_labels: + - role + - dbname + - queryid + - query + query_ref: ccp_pg_stat_statements_top_wal + + +########## QUERIES ########## +queries: + - query_name: ccp_pg_stat_statements_top_total + query: | + SELECT role + , dbname + , queryid + , query + , total_exec_time exec_time_ms + FROM pgmonitor_ext.pg_stat_statements_func() + ORDER BY 5 DESC + LIMIT 20 + + - query_name: ccp_pg_stat_statements_top_mean + query: | + SELECT role + , dbname + , queryid + , query + , max(mean_exec_time) exec_time_ms + FROM pgmonitor_ext.pg_stat_statements_func() + GROUP BY 1,2,3,4 + ORDER BY 5 DESC + LIMIT 20 + + - query_name: ccp_pg_stat_statements_total + query: | + SELECT role + , dbname + , sum(calls) AS calls_count + , sum(total_exec_time) AS exec_time_ms + , avg(mean_exec_time) AS mean_exec_time_ms + , sum(rows) AS row_count + FROM pgmonitor_ext.pg_stat_statements_func() + GROUP BY 1,2 + + - query_name: ccp_pg_stat_statements_top_max + query: | + SELECT role + , dbname + , queryid + , query + , max_exec_time AS exec_time_ms + FROM pgmonitor_ext.pg_stat_statements_func() + ORDER BY 5 DESC + LIMIT 20 + + - query_name: ccp_pg_stat_statements_top_wal + query: | + SELECT role + , dbname + , queryid + , query + , wal_records AS records + , wal_fpi AS fpi + , wal_bytes AS bytes + FROM pgmonitor_ext.pg_stat_statements_func() + ORDER BY wal_bytes DESC + LIMIT 20 diff --git a/sql_exporter/common/crunchy_pg_stat_statements_reset_collector.yml b/sql_exporter/common/crunchy_pg_stat_statements_reset_collector.yml new file mode 100644 index 00000000..ec998cfe --- /dev/null +++ b/sql_exporter/common/crunchy_pg_stat_statements_reset_collector.yml @@ -0,0 +1,11 @@ + +collector_name: crunchy_pg_stat_statements_reset + +metrics: + - metric_name: crunchy_pg_stat_statements_reset_time + type: gauge + help: "Epoch time since pg_stat_statements was last reset" + values: [time] + query: | + SELECT time FROM pgmonitor_ext.ccp_pg_stat_statements_reset; + diff --git a/sql_exporter/common/crunchy_pgbouncer_121_collector.yml b/sql_exporter/common/crunchy_pgbouncer_121_collector.yml new file mode 100644 index 00000000..351ebaed --- /dev/null +++ b/sql_exporter/common/crunchy_pgbouncer_121_collector.yml @@ -0,0 +1,200 @@ +collector_name: crunchy_pgbouncer_121 +# Collector for PgBouncer minimum version of 1.21 + +metrics: + - metric_name: ccp_pgbouncer_clients_wait_seconds + type: gauge + help: "Current waiting time in seconds" + values: [wait] + key_labels: + - database + - user + - state + - application_name + - link + query_ref: ccp_pgbouncer_clients + + + - metric_name: ccp_pgbouncer_databases_pool_size + type: gauge + help: "Maximum number of server connections" + values: [pool_size] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + - metric_name: ccp_pgbouncer_databases_min_pool_size + type: gauge + help: "Minimum number of server connections" + values: [min_pool_size] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + - metric_name: ccp_pgbouncer_databases_reserve_pool + type: gauge + help: "Maximum number of additional connections for this database" + values: [reserve_pool] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + - metric_name: ccp_pgbouncer_databases_max_connections + type: gauge + help: "Maximum number of allowed connections for this database, as set by max_db_connections, either globally or per database" + values: [max_connections] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + - metric_name: ccp_pgbouncer_databases_current_connections + type: gauge + help: "Current number of connections for this database" + values: [current_connections] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + - metric_name: ccp_pgbouncer_databases_paused + type: gauge + help: "1 if this database is currently paused, else 0" + values: [paused] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + - metric_name: ccp_pgbouncer_databases_disabled + type: gauge + help: "1 if this database is currently disabled, else 0" + values: [disabled] + key_labels: + - name + - host + - port + - database + - force_user + - pool_mode + query_ref: ccp_pgbouncer_databases + + + - metric_name: ccp_pgbouncer_lists_item_count + type: gauge + help: "Count of items registered with pgBouncer" + values: [items] + key_labels: + - list + query_ref: ccp_pgbouncer_lists + + + - metric_name: ccp_pgbouncer_pools_client_active + type: gauge + help: "Client connections that are either linked to server connections or are idle with no queries waiting to be processed" + values: [cl_active] + key_labels: + - database + - user + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_client_waiting + type: gauge + help: "Client connections that have sent queries but have not yet got a server connection" + values: [cl_waiting] + key_labels: + - database + - user + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_server_active + type: gauge + help: "Server connections that are linked to a client" + values: [sv_active] + key_labels: + - database + - user + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_server_idle + type: gauge + help: "Server connections that are unused and immediately usable for client queries" + values: [sv_idle] + key_labels: + - database + - user + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_server_used + type: gauge + help: "Server connections that have been idle for more than server_check_delay, so they need server_check_query to run on them before they can be used again" + values: [sv_used] + key_labels: + - database + - user + query_ref: ccp_pgbouncer_pools + + + - metric_name: ccp_pgbouncer_servers_close_needed + type: gauge + help: "1 if the connection will be closed as soon as possible, because a configuration file reload or DNS update changed the connection information or RECONNECT was issued" + values: [close_needed] + key_labels: + - database + - user + - state + - application_name + - link + query_ref: ccp_pgbouncer_servers + + +########## QUERIES ########## +queries: + - query_name: ccp_pgbouncer_clients + no_prepared_statement: true + query: | + SHOW CLIENTS; + + - query_name: ccp_pgbouncer_databases + no_prepared_statement: true + query: | + SHOW DATABASES; + + - query_name: ccp_pgbouncer_lists + no_prepared_statement: true + query: | + SHOW LISTS; + + - query_name: ccp_pgbouncer_pools + no_prepared_statement: true + query: | + SHOW POOLS; + + - query_name: ccp_pgbouncer_servers + no_prepared_statement: true + query: | + SHOW SERVERS; + +# Add later if needed +# - query_name: ccp_pgbouncer_stats +# no_prepared_statement: true +# query: | +# SHOW STATS; + diff --git a/sql_exporter/common/crunchy_pgbouncer_fdw_collector.yml b/sql_exporter/common/crunchy_pgbouncer_fdw_collector.yml new file mode 100644 index 00000000..690c0ee2 --- /dev/null +++ b/sql_exporter/common/crunchy_pgbouncer_fdw_collector.yml @@ -0,0 +1,158 @@ +collector_name: crunchy_pgbouncer_fdw + +metrics: + - metric_name: ccp_pgbouncer_pools_client_active + type: gauge + help: "Client connections that are linked to server connection and can process queries." + values: [client_active] + key_labels: + - pgbouncer_target_host + - conn_pool + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_client_waiting + type: gauge + help: "Client connections that have sent queries but have not yet gotten a server connection." + values: [client_waiting] + key_labels: + - pgbouncer_target_host + - conn_pool + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_server_active + type: gauge + help: "Server connections that are linked to a client." + values: [server_active] + key_labels: + - pgbouncer_target_host + - conn_pool + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_server_idle + type: gauge + help: "Server connections that unused and immediately usable for client queries." + values: [server_idle] + key_labels: + - pgbouncer_target_host + - conn_pool + query_ref: ccp_pgbouncer_pools + - metric_name: ccp_pgbouncer_pools_server_used + type: gauge + help: "Server connections that have been idle more than server_check_delay, so they need server_check_query to run on it before it can be used." + values: [server_used] + key_labels: + - pgbouncer_target_host + - conn_pool + query_ref: ccp_pgbouncer_pools + + + - metric_name: ccp_pgbouncer_database_db_conn_perc_used + type: gauge + help: "Percentage of available pooler connections for this database that are in use" + values: [db_conn_perc_used] + key_labels: + - pgbouncer_target_host + - pool_db + query_ref: ccp_pgbouncer_database + - metric_name: ccp_pgbouncer_database_paused + type: gauge + help: "Pooler connections to this database are currently paused" + values: [paused] + key_labels: + - pgbouncer_target_host + - pool_db + query_ref: ccp_pgbouncer_database + - metric_name: ccp_pgbouncer_database_disabled + type: gauge + help: "Pooler connections to this database are currently disabled" + values: [disabled] + key_labels: + - pgbouncer_target_host + - pool_db + query_ref: ccp_pgbouncer_database + + + - metric_name: ccp_pgbouncer_clients_client_state_count + type: gauge + help: "Count of the client connections with this status" + values: [client_state_count] + key_labels: + - pgbouncer_target_host + - conn_pool + - client_state + query_ref: ccp_pgbouncer_clients + + + - metric_name: ccp_pgbouncer_servers_server_state_count + type: gauge + help: "Count of the server connections with this status" + values: [server_state_count] + key_labels: + - pgbouncer_target_host + - conn_pool + - server_state + query_ref: ccp_pgbouncer_servers + + + - metric_name: ccp_pgbouncer_list_item_count + type: gauge + help: "Count of items registered with pgBouncer" + values: [item_count] + key_labels: + - pgbouncer_target_host + - item + query_ref: ccp_pgbouncer_list + + +########## QUERIES ########## +queries: + - query_name: ccp_pgbouncer_database + query: | + SELECT pgbouncer_target_host + , name AS pool_db + , CASE WHEN max_connections != 0 + THEN ((current_connections::float / max_connections::float) * 100)::int + ELSE ((current_connections::float / pool_size::float) * 100)::int + END AS db_conn_perc_used + , paused + , disabled + FROM pgbouncer_databases + + + - query_name: ccp_pgbouncer_pools + query: | + SELECT pgbouncer_target_host + , database || '.' || p.user as conn_pool + , sum(cl_active) AS client_active + , sum(cl_waiting) AS client_waiting + , sum(sv_active) AS server_active + , sum(sv_idle) AS server_idle + , sum(sv_used) AS server_used + FROM pgbouncer_pools as p + GROUP BY 1,2 + + + - query_name: ccp_pgbouncer_clients + query: | + SELECT pgbouncer_target_host + , database || '.' || p.user as conn_pool + , state AS client_state + , count(*) AS client_state_count + FROM pgbouncer_clients as p + GROUP BY 1,2,3 + + + - query_name: ccp_pgbouncer_servers + query: | + SELECT pgbouncer_target_host + , database || '.' || p.user as conn_pool + , state as server_state + , count(*) AS server_state_count + FROM pgbouncer_servers as p + GROUP BY 1,2,3 + + + - query_name: ccp_pgbouncer_list + query: | + SELECT pgbouncer_target_host + , list AS item + , items AS item_count + FROM pgbouncer_lists + WHERE list IN ('databases', 'pools', 'free_clients', 'free_servers', 'used_servers')" diff --git a/sql_exporter/common/setup_db.sql b/sql_exporter/common/setup_db.sql new file mode 100644 index 00000000..e8ecb681 --- /dev/null +++ b/sql_exporter/common/setup_db.sql @@ -0,0 +1,26 @@ +-- pgMonitor Setup +-- +-- Copyright © 2017-2023 Crunchy Data Solutions, Inc. All Rights Reserved. +-- + +DO $$ +BEGIN + IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'ccp_monitoring') THEN + CREATE ROLE ccp_monitoring WITH LOGIN PASSWORD 'stuff'; + END IF; +END +$$; + +GRANT pg_monitor to ccp_monitoring; +GRANT pg_execute_server_program TO ccp_monitoring; + +ALTER ROLE ccp_monitoring SET lock_timeout TO '2min'; +ALTER ROLE ccp_monitoring SET jit TO 'off'; + +CREATE SCHEMA IF NOT EXISTS pgmonitor_ext AUTHORIZATION ccp_monitoring; + +CREATE EXTENSION pgmonitor SCHEMA pgmonitor_ext; + +GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgmonitor_ext TO ccp_monitoring; +GRANT EXECUTE ON ALL PROCEDURES IN SCHEMA pgmonitor_ext TO ccp_monitoring; +GRANT ALL ON ALL TABLES IN SCHEMA pgmonitor_ext TO ccp_monitoring; diff --git a/sql_exporter/common/sql_exporter.yml.example b/sql_exporter/common/sql_exporter.yml.example new file mode 100644 index 00000000..ffad2289 --- /dev/null +++ b/sql_exporter/common/sql_exporter.yml.example @@ -0,0 +1,44 @@ +# Global settings and defaults. +global: + # Subtracted from Prometheus' scrape_timeout to give us some headroom and prevent Prometheus from + # timing out first. + scrape_timeout_offset: 500ms + # Minimum interval between collector runs: by default (0s) collectors are executed on every scrape. + min_interval: 0s + # Maximum number of open connections to any one target. Metric queries will run concurrently on + # multiple connections. + max_connections: 3 + # Maximum number of idle connections to any one target. + max_idle_connections: 3 + # Maximum amount of time a connection may be reused to any one target. Infinite by default. + max_connection_lifetime: 10m + +# The target(s) to monitor and the list of collectors to execute +# +jobs: + - job_name: global_targets + collectors: [crunchy_global] + static_configs: + - targets: + pg1: 'pg://ccp_monitoring@127.0.0.1:5432/postgres?sslmode=disable' + - job_name: per_db_targets + collectors: [crunchy_per_db] + static_configs: + - targets: + pg1: 'pg://ccp_monitoring@127.0.0.1:5432/postgres?sslmode=disable' +# pg2: 'pg://ccp_monitoring@127.0.0.1:5432/testdb?sslmode=disable' +# - job_name: pgbouncer_targets +# collectors: [crunchy_pgbouncer] +# enable_ping: false +# static_configs: +# - targets: +# pgbouncer: 'pg://ccp_monitoring@127.0.0.1:6432/pgbouncer?sslmode=disable' + + +# Collector definition files. +# Glob patterns are supported (see for syntax). +collector_files: + - "/etc/sql_exporter/crunchy_global_collector.yml" + - "/etc/sql_exporter/crunchy_per_db_collector.yml" +# - "/etc/sql_exporter/crunchy_pgbouncer_collector.yml" + diff --git a/sql_exporter/linux/crontab.txt b/sql_exporter/linux/crontab.txt new file mode 100644 index 00000000..804b7413 --- /dev/null +++ b/sql_exporter/linux/crontab.txt @@ -0,0 +1,9 @@ +### +# +# Copyright © 2017-2024 Crunchy Data Solutions, Inc. All Rights Reserved. +# +### +# The below script must be run as a user with the pg_read_all_data role or a superuser. You may have to adjust your pg_hba.conf to allow this and/or use a .pgpass file +# By default only scans and stores statistics for objects that are at least 1GB in size (--min_size). Setting --quiet twice, as shown, suppresses all output. +# 08 03 * * 0 /usr/bin/pg_bloat_check.py --quiet --quiet -c "dbname=postgres user=ccp_monitoring" --min_size=1073741824 + diff --git a/sql_exporter/linux/crunchy-sql-exporter@.service b/sql_exporter/linux/crunchy-sql-exporter@.service new file mode 100644 index 00000000..919f3072 --- /dev/null +++ b/sql_exporter/linux/crunchy-sql-exporter@.service @@ -0,0 +1,24 @@ +### +# +# Copyright © 2017-2023 Crunchy Data Solutions, Inc. All Rights Reserved. +# +### + +[Unit] +Description=SQL Exporter for Prometheus +Documentation=https://github.com/burningalchemist/sql_exporter +Wants=network-online.target +After=network-online.target + +[Service] +User=ccp_monitoring +EnvironmentFile=/etc/sysconfig/%i +ExecStart=/usr/bin/sql_exporter $OPT +Restart=on-failure +# Reload not working as expected - https://github.com/burningalchemist/sql_exporter/issues/297 +#ExecReload=curl http://127.0.0.1:9399/reload + + + +[Install] +WantedBy=multi-user.target diff --git a/sql_exporter/linux/sql_exporter.sysconfig b/sql_exporter/linux/sql_exporter.sysconfig new file mode 100644 index 00000000..9ec5a81a --- /dev/null +++ b/sql_exporter/linux/sql_exporter.sysconfig @@ -0,0 +1,8 @@ +### +# +# Copyright © 2017-2023 Crunchy Data Solutions, Inc. All Rights Reserved. +# +### + +OPT=-config.file=/etc/sql_exporter/sql_exporter.yml -web.listen-address=0.0.0.0:9399 -log.level=info -web.enable-reload=true +