适用openGauss系列数据库的监控指标列表说明

每个数据库都有一套自己的监控指标列表,OG系列数据库也不例外,针对与数据库监控安装部署可以直接参考监控合集,此合集文章基本够用,如果不足欢迎留言。

OG exporter下地地址为:https://gitee.com/opengauss/opengauss-prometheus-exporter ,此exporter目前主要由恩墨刘斌同学维护。

default_all.yaml
grafana dashboard

配置说明

这里以查看数据库配置信息为例,对监控指标的关键字段进行解读,方便用户自定义监控指标。

pg_database: name: pg_database desc: openGauss Database size query: - name: pg_database sql: |- SELECT datname, pg_database_size(pg_database.datname) as size_bytes, age(datfrozenxid64) AS age, datistemplate AS is_template, datallowconn AS allow_conn, datconnlimit AS conn_limit, datfrozenxid::TEXT::BIGINT as frozen_xid FROM pg_database where datname NOT IN ('template0','template1'); version: '>=0.0.0' timeout: 1 ttl: 60 status: enable dbRole: "" metrics: - name: datname description: Name of this database usage: LABEL - name: size_bytes description: Disk space used by the database usage: GAUGE - name: age description: database age calculated by age(datfrozenxid64) usage: GAUGE - name: is_template description: 1 for template db and 0 for normal db usage: GAUGE - name: allow_conn description: 1 allow connection and 0 does not allow usage: GAUGE - name: conn_limit description: connection limit, -1 for no limit usage: GAUGE - name: frozen_xid description: tuple with xmin below this will always be visable (until wrap around) usage: GAUGE public: true