This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

参考

Pigsty配置项细节参考

This is a placeholder page that shows you how to use this template site.

If your project has an API, configuration, or other reference - anything that users need to look up that’s at an even lower level than a single task - put (or link to it) here. You can serve and link to generated reference docs created using Doxygen, Javadoc, or other doc generation tools by putting them in your static/ directory. Find out more in Adding static content. For OpenAPI reference, Docsy also provides a Swagger UI layout and shortcode that renders Swagger UI using any OpenAPI YAML or JSON file as source.

1 - 配置参数

配置参数详细介绍
---
######################################################################
# File      :   dev.yml
# Path      :   conf/dev.yml
# Desc      :   Configuration file for development (demo) environment
# Note      :   follow ansible inventory file format
# Ctime     :   2020-05-22
# Mtime     :   2020-12-22
# Copyright (C) 2019-2021 Ruohang Feng
######################################################################


######################################################################
#               Development Environment Inventory                    #
######################################################################
all: # top-level namespace, match all hosts


  #==================================================================#
  #                           Clusters                               #
  #==================================================================#
  children: # top-level groups, one group per database cluster (and special group 'meta')

    #-----------------------------
    # meta controller
    #-----------------------------
    meta: # special group 'meta' defines the main controller machine
      vars:
        meta_node: true                     # mark node as meta controller
        ansible_group_priority: 99          # meta group is top priority

      # nodes in meta group
      hosts: {10.10.10.10: {ansible_host: meta}}

    #-----------------------------
    # cluster: pg-meta
    #-----------------------------
    pg-meta:

      # - cluster members - #
      hosts:
        10.10.10.10: {pg_seq: 1, pg_role: primary, ansible_host: meta}

      # - cluster configs - #
      vars:
        pg_cluster: pg-meta                 # define actual cluster name
        pg_version: 13                      # define installed pgsql version
        node_tune: oltp                     # tune node into oltp|olap|crit|tiny mode
        pg_conf: oltp.yml                   # tune pgsql into oltp/olap/crit/tiny mode
        patroni_mode: pause                 # enter maintenance mode, {default|pause|remove}
        patroni_watchdog_mode: off          # disable watchdog (require|automatic|off)
        pg_users:                           # create a business user named 'dbuser_meta'
          - {username: dbuser_meta, password: DBUser.Meta, groups: [dbrole_readwrite]}
        pg_databases:                       # create a business database 'meta'
          - name: meta
            schemas: [meta]                 # create extra schema named 'meta'
            extensions: [{name: postgis}]   # create extra extension postgis
            parameters:                     # overwrite database meta's default search_path
              search_path: public, monitor
        pg_default_database: meta           # default database will be used as primary monitor target

        # proxy settings
        vip_enabled: true                   # enable/disable vip (require members in same LAN)
        vip_address: 10.10.10.2             # virtual ip address
        vip_cidrmask: 8                     # cidr network mask length
        vip_interface: eth1                 # interface to add virtual ip


    #-----------------------------
    # cluster: pg-test
    #-----------------------------
    pg-test: # define cluster named 'pg-test'
      # - cluster members - #
      hosts:
        10.10.10.11: {pg_seq: 1, pg_role: primary, ansible_host: node-1}
        10.10.10.12: {pg_seq: 1, pg_role: replica, ansible_host: node-2}
        10.10.10.13: {pg_seq: 1, pg_role: replica, ansible_host: node-3}
      # - cluster configs - #
      vars:
        # basic settings
        pg_cluster: pg-test                 # define actual cluster name
        pg_version: 13                      # define installed pgsql version
        node_tune: tiny                     # tune node into oltp|olap|crit|tiny mode
        pg_conf: tiny.yml                   # tune pgsql into oltp/olap/crit/tiny mode

        pg_users:
          - username: test
            password: test
            comment: default test user
            groups: [ dbrole_readwrite ]
        pg_databases:                       # create a business database 'test'
          - name: test
            extensions: [{name: postgis}]   # create extra extension postgis
            parameters:                     # overwrite database meta's default search_path
              search_path: public,monitor
        pg_default_database: test           # default database will be used as primary monitor target

        # proxy settings
        vip_enabled: true                   # enable/disable vip (require members in same LAN)
        vip_address: 10.10.10.3             # virtual ip address
        vip_cidrmask: 8                     # cidr network mask length
        vip_interface: eth1                 # interface to add virtual ip



  #==================================================================#
  #                           Globals                                #
  #==================================================================#
  vars:

    #------------------------------------------------------------------------------
    # CONNECTION PARAMETERS
    #------------------------------------------------------------------------------
    # this section defines connection parameters

    # ansible_user: vagrant             # admin user with ssh access and sudo privilege

    proxy_env: # global proxy env when downloading packages
      # http_proxy: 'http://xxxxxx'
      # https_proxy: 'http://xxxxxx'
      # all_proxy: 'http://xxxxxx'
      no_proxy: "localhost,127.0.0.1,10.0.0.0/8,192.168.0.0/16,*.pigsty,*.aliyun.com"

    #------------------------------------------------------------------------------
    # REPO PROVISION
    #------------------------------------------------------------------------------
    # this section defines how to build a local repo

    repo_enabled: true                            # build local yum repo on meta nodes?
    repo_name: pigsty                             # local repo name
    repo_address: yum.pigsty                      # repo external address (ip:port or url)
    repo_port: 80                                 # listen address, must same as repo_address
    repo_home: /www                               # default repo dir location
    repo_rebuild: false                           # force re-download packages
    repo_remove: true                             # remove existing repos

    # - where to download - #
    repo_upstreams:
      - name: base
        description: CentOS-$releasever - Base - Aliyun Mirror
        baseurl:
          - http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
          - http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
          - http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
        gpgcheck: no
        failovermethod: priority

      - name: updates
        description: CentOS-$releasever - Updates - Aliyun Mirror
        baseurl:
          - http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
          - http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
          - http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
        gpgcheck: no
        failovermethod: priority

      - name: extras
        description: CentOS-$releasever - Extras - Aliyun Mirror
        baseurl:
          - http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
          - http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
          - http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
        gpgcheck: no
        failovermethod: priority

      - name: epel
        description: CentOS $releasever - EPEL - Aliyun Mirror
        baseurl: http://mirrors.aliyun.com/epel/$releasever/$basearch
        gpgcheck: no
        failovermethod: priority

      - name: grafana
        description: Grafana - TsingHua Mirror
        gpgcheck: no
        baseurl: https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm

      - name: prometheus
        description: Prometheus and exporters
        gpgcheck: no
        baseurl: https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch

      - name: pgdg-common
        description: PostgreSQL common RPMs for RHEL/CentOS $releasever - $basearch
        gpgcheck: no
        baseurl: https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch

      - name: pgdg13
        description: PostgreSQL 13 for RHEL/CentOS $releasever - $basearch - Updates testing
        gpgcheck: no
        baseurl: https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch

      - name: centos-sclo
        description: CentOS-$releasever - SCLo
        gpgcheck: no
        mirrorlist: http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-sclo

      - name: centos-sclo-rh
        description: CentOS-$releasever - SCLo rh
        gpgcheck: no
        mirrorlist: http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh

      - name: nginx
        description: Nginx Official Yum Repo
        skip_if_unavailable: true
        gpgcheck: no
        baseurl: http://nginx.org/packages/centos/$releasever/$basearch/

      - name: haproxy
        description: Copr repo for haproxy
        skip_if_unavailable: true
        gpgcheck: no
        baseurl: https://download.copr.fedorainfracloud.org/results/roidelapluie/haproxy/epel-$releasever-$basearch/

      # for latest consul & kubernetes
      - name: harbottle
        description: Copr repo for main owned by harbottle
        skip_if_unavailable: true
        gpgcheck: no
        baseurl: https://download.copr.fedorainfracloud.org/results/harbottle/main/epel-$releasever-$basearch/


    # - what to download - #
    repo_packages:
      # repo bootstrap packages
      - epel-release nginx wget yum-utils yum createrepo                                      # bootstrap packages

      # node basic packages
      - ntp chrony uuid lz4 nc pv jq vim-enhanced make patch bash lsof wget unzip git tuned   # basic system util
      - readline zlib openssl libyaml libxml2 libxslt perl-ExtUtils-Embed ca-certificates     # basic pg dependency
      - numactl grubby sysstat dstat iotop bind-utils net-tools tcpdump socat ipvsadm telnet  # system utils

      # dcs & monitor packages
      - grafana prometheus2 pushgateway alertmanager                                          # monitor and ui
      - node_exporter postgres_exporter nginx_exporter blackbox_exporter                      # exporter
      - consul consul_exporter consul-template etcd                                           # dcs

      # python3 dependencies
      - ansible python python-pip python-psycopg2                                             # ansible & python
      - python3 python3-psycopg2 python36-requests python3-etcd python3-consul                # python3
      - python36-urllib3 python36-idna python36-pyOpenSSL python36-cryptography               # python3 patroni extra deps

      # proxy and load balancer
      - haproxy keepalived dnsmasq                                                            # proxy and dns

      # postgres common Packages
      - patroni patroni-consul patroni-etcd pgbouncer pg_cli pgbadger pg_activity               # major components
      - pgcenter boxinfo check_postgres emaj pgbconsole pg_bloat_check pgquarrel                # other common utils
      - barman barman-cli pgloader pgFormatter pitrery pspg pgxnclient PyGreSQL pgadmin4 tail_n_mail

      # postgres 13 packages
      - postgresql13* postgis31* citus_13 pgrouting_13                                          # postgres 13 and postgis 31
      - pg_repack13 pg_squeeze13                                                                # maintenance extensions
      - pg_qualstats13 pg_stat_kcache13 system_stats_13 bgw_replstatus13                        # stats extensions
      - plr13 plsh13 plpgsql_check_13 plproxy13 plr13 plsh13 plpgsql_check_13 pldebugger13      # PL extensions                                      # pl extensions
      - hdfs_fdw_13 mongo_fdw13 mysql_fdw_13 ogr_fdw13 redis_fdw_13 pgbouncer_fdw13             # FDW extensions
      - wal2json13 count_distinct13 ddlx_13 geoip13 orafce13                                    # MISC extensions
      - rum_13 hypopg_13 ip4r13 jsquery_13 logerrors_13 periods_13 pg_auto_failover_13 pg_catcheck13
      - pg_fkpart13 pg_jobmon13 pg_partman13 pg_prioritize_13 pg_track_settings13 pgaudit15_13
      - pgcryptokey13 pgexportdoc13 pgimportdoc13 pgmemcache-13 pgmp13 pgq-13
      - pguint13 pguri13 prefix13  safeupdate_13 semver13  table_version13 tdigest13


    repo_url_packages:
      - https://github.com/Vonng/pg_exporter/releases/download/v0.3.1/pg_exporter-0.3.1-1.el7.x86_64.rpm
      - https://github.com/cybertec-postgresql/vip-manager/releases/download/v0.6/vip-manager_0.6-1_amd64.rpm
      - http://guichaz.free.fr/polysh/files/polysh-0.4-1.noarch.rpm





    #------------------------------------------------------------------------------
    # NODE PROVISION
    #------------------------------------------------------------------------------
    # this section defines how to provision nodes

    # - node dns - #
    node_dns_hosts: # static dns records in /etc/hosts
      - 10.10.10.10 yum.pigsty
    node_dns_server: add                          # add (default) | none (skip) | overwrite (remove old settings)
    node_dns_servers: # dynamic nameserver in /etc/resolv.conf
      - 10.10.10.10
    node_dns_options: # dns resolv options
      - options single-request-reopen timeout:1 rotate
      - domain service.consul

    # - node repo - #
    node_repo_method: local                       # none|local|public (use local repo for production env)
    node_repo_remove: true                        # whether remove existing repo
    # local repo url (if method=local, make sure firewall is configured or disabled)
    node_local_repo_url:
      - http://yum.pigsty/pigsty.repo

    # - node packages - #
    node_packages: # common packages for all nodes
      - wget,yum-utils,ntp,chrony,tuned,uuid,lz4,vim-minimal,make,patch,bash,lsof,wget,unzip,git,readline,zlib,openssl
      - numactl,grubby,sysstat,dstat,iotop,bind-utils,net-tools,tcpdump,socat,ipvsadm,telnet,tuned,pv,jq
      - python3,python3-psycopg2,python36-requests,python3-etcd,python3-consul
      - python36-urllib3,python36-idna,python36-pyOpenSSL,python36-cryptography
      - node_exporter,consul,consul-template,etcd,haproxy,keepalived,vip-manager
    node_extra_packages: # extra packages for all nodes
      - patroni,patroni-consul,patroni-etcd,pgbouncer,pgbadger,pg_activity
    node_meta_packages: # packages for meta nodes only
      - grafana,prometheus2,alertmanager,nginx_exporter,blackbox_exporter,pushgateway
      - dnsmasq,nginx,ansible,pgbadger,polysh

    # - node features - #
    node_disable_numa: false                      # disable numa, important for production database, reboot required
    node_disable_swap: false                      # disable swap, important for production database
    node_disable_firewall: true                   # disable firewall (required if using kubernetes)
    node_disable_selinux: true                    # disable selinux  (required if using kubernetes)
    node_static_network: true                     # keep dns resolver settings after reboot
    node_disk_prefetch: false                     # setup disk prefetch on HDD to increase performance

    # - node kernel modules - #
    node_kernel_modules:
      - softdog
      - br_netfilter
      - ip_vs
      - ip_vs_rr
      - ip_vs_rr
      - ip_vs_wrr
      - ip_vs_sh
      - nf_conntrack_ipv4

    # - node tuned - #
    node_tune: tiny                               # install and activate tuned profile: none|oltp|olap|crit|tiny
    node_sysctl_params: # set additional sysctl parameters, k:v format
      net.bridge.bridge-nf-call-iptables: 1       # for kubernetes

    # - node user - #
    node_admin_setup: true                        # setup an default admin user ?
    node_admin_uid: 88                            # uid and gid for admin user
    node_admin_username: admin                    # default admin user
    node_admin_ssh_exchange: true                 # exchange ssh key among cluster ?
    node_admin_pks: # public key list that will be installed
      - 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7IMAMNavYtWwzAJajKqwdn3ar5BhvcwCnBTxxEkXhGlCO2vfgosSAQMEflfgvkiI5nM1HIFQ8KINlx1XLO7SdL5KdInG5LIJjAFh0pujS4kNCT9a5IGvSq1BrzGqhbEcwWYdju1ZPYBcJm/MG+JD0dYCh8vfrYB/cYMD0SOmNkQ== vagrant@pigsty.com'

    # - node ntp - #
    node_ntp_service: ntp                         # ntp or chrony
    node_ntp_config: true                         # overwrite existing ntp config?
    node_timezone: Asia/Shanghai                  # default node timezone
    node_ntp_servers: # default NTP servers
      - pool cn.pool.ntp.org iburst
      - pool pool.ntp.org iburst
      - pool time.pool.aliyun.com iburst
      - server 10.10.10.10 iburst


    #------------------------------------------------------------------------------
    # META PROVISION
    #------------------------------------------------------------------------------
    # - ca - #
    ca_method: create                             # create|copy|recreate
    ca_subject: "/CN=root-ca"                     # self-signed CA subject
    ca_homedir: /ca                               # ca cert directory
    ca_cert: ca.crt                               # ca public key/cert
    ca_key: ca.key                                # ca private key

    # - nginx - #
    nginx_upstream:
      - {name: home,           host: pigsty,   url: "127.0.0.1:3000"}
      - { name: consul,        host: c.pigsty, url: "127.0.0.1:8500" }
      - { name: grafana,       host: g.pigsty, url: "127.0.0.1:3000" }
      - { name: prometheus,    host: p.pigsty, url: "127.0.0.1:9090" }
      - { name: alertmanager,  host: a.pigsty, url: "127.0.0.1:9093" }

    # - nameserver - #
    dns_records: # dynamic dns record resolved by dnsmasq
      - 10.10.10.2  pg-meta                       # sandbox vip for pg-meta
      - 10.10.10.3  pg-test                       # sandbox vip for pg-test
      - 10.10.10.10 meta-1                        # sandbox node meta-1 (node-0)
      - 10.10.10.11 node-1                        # sandbox node node-1
      - 10.10.10.12 node-2                        # sandbox node node-2
      - 10.10.10.13 node-3                        # sandbox node node-3
      - 10.10.10.10 pigsty
      - 10.10.10.10 y.pigsty yum.pigsty
      - 10.10.10.10 c.pigsty consul.pigsty
      - 10.10.10.10 g.pigsty grafana.pigsty
      - 10.10.10.10 p.pigsty prometheus.pigsty
      - 10.10.10.10 a.pigsty alertmanager.pigsty
      - 10.10.10.10 n.pigsty ntp.pigsty

    # - prometheus - #
    prometheus_scrape_interval: 2s                # global scrape & evaluation interval (2s for dev, 15s for prod)
    prometheus_scrape_timeout: 1s                 # global scrape timeout (1s for dev, 1s for prod)
    prometheus_metrics_path: /metrics             # default metrics path (only affect job 'pg')
    prometheus_data_dir: /export/prometheus/data  # prometheus data dir
    prometheus_retention: 30d                     # how long to keep

    # - grafana - #
    grafana_url: http://admin:admin@10.10.10.10:3000 # grafana url
    grafana_admin_password: admin                  # default grafana admin user password
    grafana_plugin: install                        # none|install|reinstall
    grafana_cache: /www/pigsty/grafana/plugins.tar.gz # path to grafana plugins tarball
    grafana_customize: true                        # customize grafana resources
    grafana_plugins: # default grafana plugins list
      - redis-datasource
      - simpod-json-datasource
      - fifemon-graphql-datasource
      - sbueringer-consul-datasource
      - camptocamp-prometheus-alertmanager-datasource
      - ryantxu-ajax-panel
      - marcusolsson-hourly-heatmap-panel
      - michaeldmoore-multistat-panel
      - marcusolsson-treemap-panel
      - pr0ps-trackmap-panel
      - dalvany-image-panel
      - magnesium-wordcloud-panel
      - cloudspout-button-panel
      - speakyourcode-button-panel
      - jdbranham-diagram-panel
      - grafana-piechart-panel
      - snuids-radar-panel
      - digrich-bubblechart-panel
    grafana_git_plugins:
      - https://github.com/Vonng/grafana-echarts



    #------------------------------------------------------------------------------
    # DCS PROVISION
    #------------------------------------------------------------------------------
    dcs_type: consul                              # consul | etcd | both
    dcs_name: pigsty                              # consul dc name | etcd initial cluster token
    # dcs server dict in name:ip format
    dcs_servers:
      meta-1: 10.10.10.10                         # you could use existing dcs cluster
      # meta-2: 10.10.10.11                       # host which have their IP listed here will be init as server
      # meta-3: 10.10.10.12                       # 3 or 5 dcs nodes are recommend for production environment

    dcs_exists_action: skip                       # abort|skip|clean if dcs server already exists
    consul_data_dir: /var/lib/consul              # consul data dir (/var/lib/consul by default)
    etcd_data_dir: /var/lib/etcd                  # etcd data dir (/var/lib/consul by default)


    #------------------------------------------------------------------------------
    # POSTGRES INSTALLATION
    #------------------------------------------------------------------------------
    # - dbsu - #
    pg_dbsu: postgres                             # os user for database, postgres by default (change it is not recommended!)
    pg_dbsu_uid: 26                               # os dbsu uid and gid, 26 for default postgres users and groups
    pg_dbsu_sudo: limit                           # none|limit|all|nopass (Privilege for dbsu, limit is recommended)
    pg_dbsu_home: /var/lib/pgsql                  # postgresql binary
    pg_dbsu_ssh_exchange: false                   # exchange ssh key among same cluster

    # - postgres packages - #
    pg_version: 13                                # default postgresql version
    pgdg_repo: false                              # use official pgdg yum repo (disable if you have local mirror)
    pg_add_repo: false                            # add postgres related repo before install (useful if you want a simple install)
    pg_bin_dir: /usr/pgsql/bin                    # postgres binary dir
    pg_packages:
      - postgresql${pg_version}*
      - postgis31_${pg_version}*
      - pgbouncer patroni pg_exporter pgbadger
      - patroni patroni-consul patroni-etcd pgbouncer pgbadger pg_activity
      - python3 python3-psycopg2 python36-requests python3-etcd python3-consul
      - python36-urllib3 python36-idna python36-pyOpenSSL python36-cryptography

    pg_extensions:
      - pg_repack${pg_version} pg_qualstats${pg_version} pg_stat_kcache${pg_version} wal2json${pg_version}
      # - ogr_fdw${pg_version} mysql_fdw_${pg_version} redis_fdw_${pg_version} mongo_fdw${pg_version} hdfs_fdw_${pg_version}
      # - count_distinct${version}  ddlx_${version}  geoip${version}  orafce${version}                                   # popular features
      # - hypopg_${version}  ip4r${version}  jsquery_${version}  logerrors_${version}  periods_${version}  pg_auto_failover_${version}  pg_catcheck${version}
      # - pg_fkpart${version}  pg_jobmon${version}  pg_partman${version}  pg_prioritize_${version}  pg_track_settings${version}  pgaudit15_${version}
      # - pgcryptokey${version}  pgexportdoc${version}  pgimportdoc${version}  pgmemcache-${version}  pgmp${version}  pgq-${version}  pgquarrel pgrouting_${version}
      # - pguint${version}  pguri${version}  prefix${version}   safeupdate_${version}  semver${version}   table_version${version}  tdigest${version}



    #------------------------------------------------------------------------------
    # POSTGRES PROVISION
    #------------------------------------------------------------------------------
    # - identity - #
    # pg_cluster:                                 # [REQUIRED] cluster name (validated during pg_preflight)
    # pg_seq: 0                                   # [REQUIRED] instance seq (validated during pg_preflight)
    # pg_role: replica                            # [REQUIRED] service role (validated during pg_preflight)
    pg_hostname: false                            # overwrite node hostname with pg instance name
    pg_nodename: true                             # overwrite consul nodename with pg instance name

    # - retention - #
    # pg_exists_action, available options: abort|clean|skip
    #  - abort: abort entire play's execution (default)
    #  - clean: remove existing cluster (dangerous)
    #  - skip: end current play for this host
    # pg_exists: false                            # auxiliary flag variable (DO NOT SET THIS)
    pg_exists_action: clean

    # - storage - #
    pg_data: /pg/data                             # postgres data directory
    pg_fs_main: /export                           # data disk mount point     /pg -> {{ pg_fs_main }}/postgres/{{ pg_instance }}
    pg_fs_bkup: /var/backups                      # backup disk mount point   /pg/* -> {{ pg_fs_bkup }}/postgres/{{ pg_instance }}/*

    # - connection - #
    pg_listen: '0.0.0.0'                          # postgres listen address, '0.0.0.0' by default (all ipv4 addr)
    pg_port: 5432                                 # postgres port (5432 by default)

    # - patroni - #
    # patroni_mode, available options: default|pause|remove
    #   - default: default ha mode
    #   - pause:   into maintenance mode
    #   - remove:  remove patroni after bootstrap
    patroni_mode: default                         # pause|default|remove
    pg_namespace: /pg                             # top level key namespace in dcs
    patroni_port: 8008                            # default patroni port
    patroni_watchdog_mode: automatic              # watchdog mode: off|automatic|required
    pg_conf: tiny.yml                             # user provided patroni config template path

    # - pgbouncer - #
    pgbouncer_port: 6432                          # default pgbouncer port
    pgbouncer_poolmode: transaction               # default pooling mode: transaction pooling
    pgbouncer_max_db_conn: 100                    # important! do not set this larger than postgres max conn or conn limit

    # - template - #
    pg_init: pg-init                              # init script for cluster template

    # - system roles - #
    pg_replication_username: replicator           # system replication user
    pg_replication_password: DBUser.Replicator    # system replication password
    pg_monitor_username: dbuser_monitor           # system monitor user
    pg_monitor_password: DBUser.Monitor           # system monitor password
    pg_admin_username: dbuser_admin               # system admin user
    pg_admin_password: DBUser.Admin               # system admin password

    # - default roles - #
    pg_default_roles:
      - username: dbrole_readonly                 # sample user:
        options: NOLOGIN                          # role can not login
        comment: role for readonly access         # comment string

      - username: dbrole_readwrite                # sample user: one object for each user
        options: NOLOGIN
        comment: role for read-write access
        groups: [ dbrole_readonly ]               # read-write includes read-only access

      - username: dbrole_admin                    # sample user: one object for each user
        options: NOLOGIN BYPASSRLS                # admin can bypass row level security
        comment: role for object creation
        groups: [dbrole_readwrite,pg_monitor,pg_signal_backend]

      # NOTE: replicator, monitor, admin password are overwrite by separated config entry
      - username: postgres                        # reset dbsu password to NULL (if dbsu is not postgres)
        options: SUPERUSER LOGIN
        comment: system superuser

      - username: replicator
        options: REPLICATION LOGIN
        groups: [pg_monitor, dbrole_readonly]
        comment: system replicator

      - username: dbuser_monitor
        options: LOGIN CONNECTION LIMIT 10
        comment: system monitor user
        groups: [pg_monitor, dbrole_readonly]

      - username: dbuser_admin
        options: LOGIN BYPASSRLS
        comment: system admin user
        groups: [dbrole_admin]

      - username: dbuser_stats
        password: DBUser.Stats
        options: LOGIN
        comment: business read-only user for statistics
        groups: [dbrole_readonly]


    # object created by dbsu and admin will have their privileges properly set
    pg_default_privilegs:
      - GRANT USAGE                         ON SCHEMAS   TO dbrole_readonly
      - GRANT SELECT                        ON TABLES    TO dbrole_readonly
      - GRANT SELECT                        ON SEQUENCES TO dbrole_readonly
      - GRANT EXECUTE                       ON FUNCTIONS TO dbrole_readonly
      - GRANT INSERT, UPDATE, DELETE        ON TABLES    TO dbrole_readwrite
      - GRANT USAGE,  UPDATE                ON SEQUENCES TO dbrole_readwrite
      - GRANT TRUNCATE, REFERENCES, TRIGGER ON TABLES    TO dbrole_admin
      - GRANT CREATE                        ON SCHEMAS   TO dbrole_admin
      - GRANT USAGE                         ON TYPES     TO dbrole_admin

    # schemas
    pg_default_schemas: [monitor]

    # extension
    pg_default_extensions:
      - { name: 'pg_stat_statements',  schema: 'monitor' }
      - { name: 'pgstattuple',         schema: 'monitor' }
      - { name: 'pg_qualstats',        schema: 'monitor' }
      - { name: 'pg_buffercache',      schema: 'monitor' }
      - { name: 'pageinspect',         schema: 'monitor' }
      - { name: 'pg_prewarm',          schema: 'monitor' }
      - { name: 'pg_visibility',       schema: 'monitor' }
      - { name: 'pg_freespacemap',     schema: 'monitor' }
      - { name: 'pg_repack',           schema: 'monitor' }
      - name: postgres_fdw
      - name: file_fdw
      - name: btree_gist
      - name: btree_gin
      - name: pg_trgm
      - name: intagg
      - name: intarray

    # postgres host-based authentication rules
    pg_hba_rules:
      - title: allow meta node password access
        role: common
        rules:
          - host    all     all                         10.10.10.10/32      md5

      - title: allow intranet admin password access
        role: common
        rules:
          - host    all     +dbrole_admin               10.0.0.0/8          md5
          - host    all     +dbrole_admin               172.16.0.0/12       md5
          - host    all     +dbrole_admin               192.168.0.0/16      md5

      - title: allow intranet password access
        role: common
        rules:
          - host    all             all                 10.0.0.0/8          md5
          - host    all             all                 172.16.0.0/12       md5
          - host    all             all                 192.168.0.0/16      md5

      - title: allow local read-write access (local production user via pgbouncer)
        role: common
        rules:
          - local   all     +dbrole_readwrite                               md5
          - host    all     +dbrole_readwrite           127.0.0.1/32        md5

      - title: allow read-only user (stats, personal) password directly access
        role: replica
        rules:
          - local   all     +dbrole_readonly                               md5
          - host    all     +dbrole_readonly           127.0.0.1/32        md5

    # pgbouncer host-based authentication rules
    pgbouncer_hba_rules:
      - title: local password access
        role: common
        rules:
          - local  all          all                                     md5
          - host   all          all                     127.0.0.1/32    md5

      - title: intranet password access
        role: common
        rules:
          - host   all          all                     10.0.0.0/8      md5
          - host   all          all                     172.16.0.0/12   md5
          - host   all          all                     192.168.0.0/16  md5

    #------------------------------------------------------------------------------
    # MONITOR PROVISION
    #------------------------------------------------------------------------------
    # - monitor options -
    pg_exporter_config: pg_exporter-demo.yaml     # default config files for pg_exporter
    node_exporter_port: 9100                      # default port for node exporter
    pg_exporter_port: 9630                        # default port for pg exporter
    pgbouncer_exporter_port: 9631                 # default port for pgbouncer exporter
    exporter_metrics_path: /metrics               # default metric path for pg related exporter
    pg_localhost: /var/run/postgresql             # localhost unix socket path


    #------------------------------------------------------------------------------
    # PROXY PROVISION
    #------------------------------------------------------------------------------
    # - haproxy - #
    haproxy_enabled: true                         # enable haproxy among every cluster members
    haproxy_policy: leastconn                     # roundrobin, leastconn
    haproxy_admin_username: admin                 # default haproxy admin username
    haproxy_admin_password: admin                 # default haproxy admin password
    haproxy_client_timeout: 3h                    # client side connection timeout
    haproxy_server_timeout: 3h                    # server side connection timeout
    haproxy_exporter_port: 9101                   # default admin/exporter port
    haproxy_check_port: 8008                      # default health check port (patroni 8008 by default)
    haproxy_primary_port: 5433                    # default primary port 5433
    haproxy_replica_port: 5434                    # default replica port 5434
    haproxy_backend_port: 6432                    # default target port: pgbouncer:6432 postgres:5432

    # - vip - #
    # vip_enabled: true                             # level2 vip requires primary/standby under same switch
    # vip_address: 127.0.0.1                      # virtual ip address ip/cidr
    # vip_cidrmask: 32                            # virtual ip address cidr mask
    # vip_interface: eth0                         # virtual ip network interface

...

2 - 操作系统内核参数

Pigsty针对操作系统内核进行的参数调整

Database kernel optimisation

# Database kernel optimisation
fs.aio-max-nr = 1048576 # 限制并发未完成的异步请求数目,,不应小于1M
fs.file-max = 16777216  # 最大打开16M个文件

# kernel
kernel.shmmax = 485058		# 共享内存最大页面数量: $(expr $(getconf _PHYS_PAGES) / 2)
kernel.shmall = 1986797568 	# 共享内存总大小: $(expr $(getconf _PHYS_PAGES) / 2 \* $(getconf PAGE_SIZE))
kernel.shmmni = 16384 		# 系统范围内共享内存段的最大数量 4096 -> 16384
kernel.msgmni = 32768		# 系统的消息队列数目,影响可以启动的代理程序数 设为内存MB数
kernel.msgmnb = 65536		# 影响队列的大小
kernel.msgmax = 65536		# 影响队列中可以发送的消息的大小
kernel.numa_balancing = 0   # Numa禁用
kernel.sched_migration_cost_ns = 5000000 # 5ms内,调度认为进程还是Hot的。
kernel.sem = 2048 134217728 2048 65536   # 每个信号集最大信号量2048,系统总共可用信号量134217728,单次最大操作2048,信号集总数65536

# vm
vm.dirty_ratio = 80                       # 绝对限制,超过80%阻塞写请求刷盘
vm.dirty_background_bytes = 268435456     # 256MB脏数据唤醒刷盘进程
vm.dirty_expire_centisecs = 6000          # 1分钟前的数据被认为需要刷盘
vm.dirty_writeback_centisecs= 500         # 刷新进程运行间隔5秒
vm.mmap_min_addr = 65536                  # 禁止访问0x10000下的内存
vm.zone_reclaim_mode = 0                  # Numa禁用

# vm swap
vm.swappiness = 0                         # 禁用SWAP,但高水位仍会有
vm.overcommit_memory = 2                  # 允许一定程度的Overcommit
vm.overcommit_ratio = 50                  # 允许的Overcommit:$((($mem - $swap) * 100 / $mem))

# tcp memory
net.ipv4.tcp_rmem = 8192 65536 16777216		# tcp读buffer: 32M/256M/16G
net.ipv4.tcp_wmem = 8192 65536 16777216		# tcp写buffer: 32M/256M/16G
net.ipv4.tcp_mem = 131072 262144 16777216	# tcp 内存使用 512M/1G/16G
net.core.rmem_default = 262144      		# 接受缓冲区默认大小: 256K
net.core.rmem_max = 4194304         		# 接受缓冲区最大大小: 4M
net.core.wmem_default = 262144      		# 发送缓冲区默认大小: 256K
net.core.wmem_max = 4194304         		# 发送缓冲区最大大小: 4M
# tcp keepalive
net.ipv4.tcp_keepalive_intvl = 20	# 探测没有确认时,重新发送探测的频度。默认75s -> 20s
net.ipv4.tcp_keepalive_probes = 3	# 3 * 20 = 1分钟超时断开
net.ipv4.tcp_keepalive_time = 60	# 探活周期1分钟
# tcp port resure
net.ipv4.tcp_tw_reuse = 1           # 允许将TIME_WAIT socket用于新的TCP连接。默认为0
net.ipv4.tcp_tw_recycle = 0			# 快速回收,已弃用
net.ipv4.tcp_fin_timeout = 5        # 保持在FIN-WAIT-2状态的秒时间
net.ipv4.tcp_timestamps = 1
# tcp anti-flood
net.ipv4.tcp_syncookies = 1			# SYN_RECV队列满后发cookie,防止恶意攻击
net.ipv4.tcp_synack_retries = 1		# 收到不完整sync后的重试次数 5->2
net.ipv4.tcp_syn_retries = 1         #表示在内核放弃建立连接之前发送SYN包的数量。
# tcp load-balancer
net.ipv4.ip_forward = 1						# IP转发
net.ipv4.ip_nonlocal_bind = 1				# 绑定非本机地址
net.netfilter.nf_conntrack_max = 1048576	# 最大跟踪连接数
net.ipv4.ip_local_port_range = 10000 65535	# 端口范围
net.ipv4.tcp_max_tw_buckets = 262144		# 256k  TIME_WAIT
net.core.somaxconn = 65535          		# 限制LISTEN队列最大数据包量,触发重传机制。
net.ipv4.tcp_max_syn_backlog = 8192 		# SYN队列大小:1024->8192
net.core.netdev_max_backlog = 8192			# 网卡收包快于内核时,允许队列长度

3 - 监控系统可用指标清单

监控系统可用指标清单
pg_activity_count,gauge,"connection count of given (datname,state)"
pg_activity_max_conn_duration,gauge,"max backend session duration since state change among (datname, state)"
pg_activity_max_duration,gauge,"max duration since state change among (datname, state)"
pg_activity_max_tx_duration,gauge,"max transaction duration since state change among (datname, state)"
pg_backend_count,gauge,backend process count
pg_backup_time,gauge,seconds since current backup start. null if don't have one
pg_bgwriter_buffers_alloc,counter,buffers allocated
pg_bgwriter_buffers_backend,counter,buffers written directly by a backend
pg_bgwriter_buffers_backend_fsync,counter,times a backend had to execute its own fsync
pg_bgwriter_buffers_checkpoint,counter,buffers written during checkpoints
pg_bgwriter_buffers_clean,counter,buffers written by the background writer
pg_bgwriter_checkpoint_sync_time,counter,"time spending on syncing files to disk, in µs"
pg_bgwriter_checkpoint_write_time,counter,"time spending on writing files to disk, in µs"
pg_bgwriter_checkpoints_req,counter,requested checkpoints that have been performed
pg_bgwriter_checkpoints_timed,counter,scheduled checkpoints that have been performed
pg_bgwriter_maxwritten_clean,counter,times that bgwriter stopped a cleaning scan
pg_bgwriter_stats_reset,counter,time when statistics were last reset
pg_boot_time,gauge,unix timestamp when postmaster boot
pg_checkpoint_checkpoint_lsn,counter,lsn of checkpoint
pg_checkpoint_elapse,gauge,time elapsed since this checkpoint in seconds
pg_checkpoint_full_page_writes,gauge,is full page write enabled ?
pg_checkpoint_newest_commit_ts_xid,gauge,xid with newest commit ts by the checkpoint
pg_checkpoint_next_multi_offset,gauge,next multixact id offset of this checkpoint
pg_checkpoint_next_multixact_id,gauge,next multixact id of this checkpoint
pg_checkpoint_next_oid,gauge,next object id since this checkpoint
pg_checkpoint_next_xid,gauge,next xid since this checkpoint
pg_checkpoint_next_xid_epoch,gauge,next xid epoch since this checkpoint
pg_checkpoint_oldest_active_xid,gauge,oldest active xid of the checkpoint
pg_checkpoint_oldest_commit_ts_xid,gauge,xid with oldest commit ts by the checkpoint
pg_checkpoint_oldest_multi_dbid,gauge,which db contins the oldest multi xid
pg_checkpoint_oldest_multi_xid,gauge,oldest active multi xid of the checkpoint
pg_checkpoint_oldest_xid,gauge,oldest existing xid of the checkpoint
pg_checkpoint_oldest_xid_dbid,gauge,which db contains the oldest xid
pg_checkpoint_prev_tli,gauge,previous WAL timeline
pg_checkpoint_redo_lsn,counter,redo start LSN
pg_checkpoint_time,gauge,timestamp of this checkpoint
pg_checkpoint_tli,gauge,current WAL timeline
pg_class_relage,gauge,age of non-index relation
pg_class_relpages,gauge,exact page count of this relation
pg_class_relsize,gauge,size of this relation
pg_class_reltuples,gauge,estimate relation tuples
pg_conf_reload_time,gauge,seconds since last configuration reload
pg_database_age,gauge,database age calculated by age(datfrozenxid)
pg_database_allow_conn,gauge,"1 allow connection, 0 does not allow"
pg_database_conn_limit,gauge,"connection limit, -1 for no limit"
pg_database_frozen_xid,gauge,tuple with xmin below this will always be visable (until wrap around)
pg_database_is_template,gauge,"1 for template db , 0 for normal db"
pg_db_blk_read_time,counter,"Time spent reading data file blocks by backends in this database, in milliseconds"
pg_db_blk_write_time,counter,"Time spent writing data file blocks by backends in this database, in milliseconds"
pg_db_blks_access,counter,blocks read plus blocks hit
pg_db_blks_hit,counter,blocks found in pg buffer
pg_db_blks_read,counter,blocks read from disk in this database
pg_db_checksum_failures,counter,"Number of data page checksum failures detected in this database, 12+ only"
pg_db_checksum_last_failure,gauge,"Time at which the last data page checksum failure was detected, 12+ only"
pg_db_confl_bufferpin,counter,Number of queries in this database that have been canceled due to pinned buffers
pg_db_confl_deadlock,counter,Number of queries in this database that have been canceled due to deadlocks
pg_db_confl_lock,counter,Number of queries in this database that have been canceled due to lock timeouts
pg_db_confl_snapshot,counter,Number of queries in this database that have been canceled due to old snapshots
pg_db_confl_tablespace,counter,Number of queries in this database that have been canceled due to dropped tablespaces
pg_db_conflicts,counter,Number of queries canceled due to conflicts with recovery in this database. (slave only)
pg_db_deadlocks,counter,Number of deadlocks detected in this database
pg_db_numbackends,gauge,backends currently connected to this database
pg_db_stats_reset,counter,Time at which these statistics were last reset
pg_db_temp_bytes,counter,Temporary file byte count
pg_db_temp_files,counter,Number of temporary files created by queries in this database
pg_db_tup_deleted,counter,rows deleted by queries in this database
pg_db_tup_fetched,counter,rows fetched by queries in this database
pg_db_tup_inserted,counter,rows inserted by queries in this database
pg_db_tup_modified,counter,rows modified by queries in this database
pg_db_tup_returned,counter,rows returned by queries in this database
pg_db_tup_updated,counter,rows updated by queries in this database
pg_db_xact_commit,counter,transactions in this database that have been committed
pg_db_xact_rollback,counter,transactions in this database that have been rolled back
pg_db_xact_total,counter,transactions in this database that have been issued
pg_downstream_count,gauge,count of corresponding replication state
pg_exporter_last_scrape_time,gauge,seconds exporter spending on scrapping
pg_exporter_query_cache_ttl,gauge,times to live of query cache
pg_exporter_query_scrape_duration,gauge,seconds query spending on scrapping
pg_exporter_query_scrape_error_count,gauge,times the query failed
pg_exporter_query_scrape_hit_count,gauge,numbers  been scrapped from this query
pg_exporter_query_scrape_metric_count,gauge,numbers of metrics been scrapped from this query
pg_exporter_query_scrape_total_count,gauge,times exporter server was scraped for metrics
pg_exporter_scrape_duration,gauge,seconds exporter spending on scrapping
pg_exporter_scrape_error_count,counter,times exporter was scraped for metrics and failed
pg_exporter_scrape_total_count,counter,times exporter was scraped for metrics
pg_exporter_server_scrape_duration,gauge,seconds exporter server spending on scrapping
pg_exporter_server_scrape_total_count,gauge,times exporter server was scraped for metrics
pg_exporter_server_scrape_total_seconds,gauge,seconds exporter server spending on scrapping
pg_exporter_up,gauge,always be 1 if your could retrieve metrics
pg_exporter_uptime,gauge,seconds since exporter primary server inited
pg_flush_lsn,counter,"primary only, location of current wal syncing"
pg_func_calls,counter,how many times this function has been called
pg_func_self_time,counter,"how much time spent in this function itself (other func not included), in ms"
pg_func_total_time,counter,"how much time spent in this function and it's child function, in ms"
pg_in_recovery,gauge,server is in recovery mode? 1 for yes 0 for no
pg_index_idx_blks_hit,counter,blocks hit from cache of this index
pg_index_idx_blks_read,counter,blocks been read from disk of this index
pg_index_idx_scan,counter,index scans initiated on this index
pg_index_idx_tup_fetch,counter,live table rows fetched by simple index scans using this index
pg_index_idx_tup_read,counter,index entries returned by scans on this index
pg_insert_lsn,counter,"primary only, location of current wal inserting"
pg_is_in_backup,gauge,1 if backup is in progress
pg_is_in_recovery,gauge,1 if in recovery mode
pg_is_wal_replay_paused,gauge,1 if wal play paused
pg_lag,gauge,replication lag in seconds from view of standby server
pg_last_replay_time,gauge,time when last transaction been replayed
pg_lock_count,counter,Number of locks of corresponding mode
pg_lsn,counter,"log sequence number, current write location"
pg_meta_info,gauge,constant 1
pg_query_blk_io_time,counter,time spent reading/writing blocks in µs (if track_io_timing is enabled)
pg_query_calls,counter,times been executed
pg_query_max_time,gauge,"Maximum time spent in the statement, in µs"
pg_query_mean_time,gauge,"Mean time spent in the statement, in µs"
pg_query_min_time,gauge,"Minimum time spent in the statement, in µs"
pg_query_rows,counter,rows retrieved or affected by the statement
pg_query_stddev_time,gauge,"Population standard deviation of time spent in the statement, in µs"
pg_query_total_time,counter,"Total time spent in the statement, in µs"
pg_receive_lsn,counter,"standby only, location of wal synced to disk"
pg_recovery_backup_end_lsn,counter,pg control recovery backup end lsn
pg_recovery_backup_start_lsn,counter,pg control recovery backup start lsn
pg_recovery_min_lsn,counter,pg control recovery min lsn
pg_recovery_min_timeline,counter,pg control recovery min timeline
pg_recovery_require_record,gauge,do recovery need a end of backup record
pg_replay_lsn,counter,"standby only, location of wal applied"
pg_replication_backend_uptime,gauge,how long since standby connect to this server
pg_replication_backend_xmin,gauge,this standby's xmin horizon reported by hot_standby_feedback.
pg_replication_flush_diff,gauge,last log position flushed to disk by this standby server diff with current lsn
pg_replication_flush_lag,gauge,latest ACK lsn diff with flush (sync-remote-flush lag)
pg_replication_flush_lsn,counter,last log position flushed to disk by this standby server
pg_replication_lsn,counter,current log position on this server
pg_replication_replay_diff,gauge,last log position replayed into the database on this standby server diff with current lsn
pg_replication_replay_lag,gauge,latest ACK lsn diff with replay (sync-remote-apply lag)
pg_replication_replay_lsn,counter,last log position replayed into the database on this standby server
pg_replication_sent_diff,gauge,last log position sent to this standby server diff with current lsn
pg_replication_sent_lsn,counter,last log position sent to this standby server
pg_replication_sync_priority,gauge,priority of being chosen as synchronous standby
pg_replication_write_diff,gauge,last log position written to disk by this standby server diff with current lsn
pg_replication_write_lag,gauge,latest ACK lsn diff with write (sync-remote-write lag)
pg_replication_write_lsn,counter,last log position written to disk by this standby server
pg_setting_block_size,gauge,"pg page block size, 8192 by default"
pg_setting_data_checksums,gauge,"whether data checksum is enabled, 1 enabled 0 disabled"
pg_setting_max_connections,gauge,number of concurrent connections to the database server
pg_setting_max_locks_per_transaction,gauge,no more than this many distinct objects can be locked at any one time
pg_setting_max_prepared_transactions,gauge,maximum number of transactions that can be in the prepared state simultaneously
pg_setting_max_replication_slots,gauge,maximum number of replication slots
pg_setting_max_wal_senders,gauge,maximum number of concurrent connections from standby servers
pg_setting_max_worker_processes,gauge,maximum number of background processes that the system can support
pg_setting_wal_keep_segments,gauge,minimum number of past log file segments kept in the pg_wal directory
pg_setting_wal_log_hints,gauge,"whether wal_log_hints is enabled, 1 enabled 0 disabled"
pg_size_bytes,gauge,file size in bytes
pg_slot_active,gauge,whether the slot is currently being used
pg_slot_catalog_xmin,gauge,oldest txid that this slot needs the database to retain for catalog
pg_slot_confirm_lsn,counter,"lsn that confirmed by logical standby, null for physical slot"
pg_slot_restart_lsn,counter,"lsn that needs retain, wal after that will be kept"
pg_slot_retained_bytes,gauge,bytes retained for this slot
pg_slot_temporary,gauge,whether the slot is a temporary replication slot
pg_slot_xmin,gauge,oldest txid that this slot needs the database to retain
pg_sync_standby_disabled,gauge,"1 if disabled, 0 if enabled"
pg_sync_standby_enabled,gauge,"1 if enabled, 0 if disabled"
pg_table_analyze_count,counter,manual analyze count
pg_table_autoanalyze_count,counter,automatic analyze count
pg_table_autovacuum_count,counter,automatic vacuum count
pg_table_bloat_ratio,gauge,"estimated bloat ratio of this table, 0~1"
pg_table_bloat_size,gauge,total size in bytes of this table
pg_table_heap_blks_hit,counter,relation heap hit
pg_table_heap_blks_read,counter,relation heap read
pg_table_idx_blks_hit,counter,index hit
pg_table_idx_blks_read,counter,index read
pg_table_idx_scan,counter,index scans initiated on this table
pg_table_idx_tup_fetch,counter,rows fetched by index scans
pg_table_last_analyze,gauge,when table was manually analyzed last time
pg_table_last_autoanalyze,gauge,when table was automatically analyzed last time
pg_table_last_autovacuum,gauge,when table was automatically vacuumed last time
pg_table_last_vacuum,gauge,when table was manually vacuumed last time (FULL not count)
pg_table_n_dead_tup,gauge,estimated dead rows
pg_table_n_live_tup,gauge,estimated live rows
pg_table_n_mod_since_analyze,gauge,rows changed since last analyze
pg_table_n_tup_del,counter,rows deleted
pg_table_n_tup_hot_upd,counter,rows updated in HOT mode
pg_table_n_tup_ins,counter,rows inserted
pg_table_n_tup_mod,counter,rows modified (insert + update + delete)
pg_table_n_tup_upd,counter,rows updated
pg_table_seq_scan,counter,sequential scans initiated on this table
pg_table_seq_tup_read,counter,live rows fetched by sequential scans
pg_table_size_bytes,gauge,"total size of this table (including toast, index, toast index)"
pg_table_size_indexsize,gauge,size of all related indexes
pg_table_size_relsize,gauge,"size of this table itself (main, vm, fsm)"
pg_table_size_toastsize,gauge,size of corresponding toast tables
pg_table_tbl_scan,counter,total table scan = index scan + seq scan
pg_table_tidx_blks_hit,counter,toast index hit
pg_table_tidx_blks_read,counter,toast index read
pg_table_toast_blks_hit,counter,toast heap hit
pg_table_toast_blks_read,counter,toast heap read
pg_table_tup_read,counter,total tuples read = index fetch + seq read
pg_table_vacuum_count,counter,manual vacuum count (FULL not count)
pg_timestamp,gauge,database current timestamp
pg_up,gauge,"last scrape was able to connect to the server: 1 for yes, 0 for no"
pg_uptime,gauge,seconds since postmaster start
pg_version,gauge,server version number
pg_walreceiver_current_ts,gauge,current_timestamp
pg_walreceiver_init_lsn,counter,first time received lsn when WAL receiver is started
pg_walreceiver_init_tli,gauge,first time received timeline number when WAL receiver is started
pg_walreceiver_last_lsn,counter,latest lsn that already flushed to standby disk
pg_walreceiver_last_tli,gauge,latest timeline that already flushed to standby disk
pg_walreceiver_receive_ts,gauge,receipt time of last message received from origin WAL sender
pg_walreceiver_report_lsn,counter,with time zone	Time of last write-ahead log location reported to origin WAL sender
pg_walreceiver_report_ts,gauge,timestamp of last time reporting to sender
pg_walreceiver_send_ts,gauge,send time of last message received from origin WAL sender
pg_write_lsn,counter,"primary only, location of current wal writing"
pg_xact_xmax,gauge,first as-yet-unassigned txid. txid >= this are invisible.
pg_xact_xmin,gauge,earliest txid that is still active
pg_xact_xnum,gauge,current active transaction count
pgbouncer_database_current_connections,gauge,current number of connections for this database
pgbouncer_database_disabled,gauge,"1 if this database is currently disabled, else 0"
pgbouncer_database_max_connections,gauge,maximum number of allowed connections for this database
pgbouncer_database_paused,gauge,"1 if this database is currently paused, else 0"
pgbouncer_database_pool_size,counter,maximum number of server connections
pgbouncer_database_reserve_pool,gauge,maximum number of additional connections for this database
pgbouncer_exporter_last_scrape_time,gauge,seconds exporter spending on scrapping
pgbouncer_exporter_query_cache_ttl,gauge,times to live of query cache
pgbouncer_exporter_query_scrape_duration,gauge,seconds query spending on scrapping
pgbouncer_exporter_query_scrape_error_count,gauge,times the query failed
pgbouncer_exporter_query_scrape_hit_count,gauge,numbers  been scrapped from this query
pgbouncer_exporter_query_scrape_metric_count,gauge,numbers of metrics been scrapped from this query
pgbouncer_exporter_query_scrape_total_count,gauge,times exporter server was scraped for metrics
pgbouncer_exporter_scrape_duration,gauge,seconds exporter spending on scrapping
pgbouncer_exporter_scrape_error_count,counter,times exporter was scraped for metrics and failed
pgbouncer_exporter_scrape_total_count,counter,times exporter was scraped for metrics
pgbouncer_exporter_server_scrape_duration,gauge,seconds exporter server spending on scrapping
pgbouncer_exporter_server_scrape_total_count,gauge,times exporter server was scraped for metrics
pgbouncer_exporter_server_scrape_total_seconds,gauge,seconds exporter server spending on scrapping
pgbouncer_exporter_up,gauge,always be 1 if your could retrieve metrics
pgbouncer_exporter_uptime,gauge,seconds since exporter primary server inited
pgbouncer_in_recovery,gauge,server is in recovery mode? 1 for yes 0 for no
pgbouncer_list_items,gauge,count of curresponding pgbouncer object
pgbouncer_pool_active_clients,gauge,client connections that are linked to server connection and can process queries
pgbouncer_pool_active_servers,gauge,server connections that are linked to a client
pgbouncer_pool_idle_servers,gauge,server connections that are unused and immediately usable for client queries
pgbouncer_pool_login_servers,gauge,server connections currently in the process of logging in
pgbouncer_pool_maxwait,gauge,"how long the first(oldest) client in the queue has waited, in seconds, key metric"
pgbouncer_pool_maxwait_us,gauge,microsecond part of the maximum waiting time.
pgbouncer_pool_tested_servers,gauge,server connections that are currently running reset or check query
pgbouncer_pool_used_servers,gauge,server connections that have been idle for more than server_check_delay (means have to run check query)
pgbouncer_pool_waiting_clients,gauge,client connections that have sent queries but have not yet got a server connection
pgbouncer_stat_avg_query_count,gauge,how many times this function has been called
pgbouncer_stat_avg_query_time,gauge,"how much time spent in this function and it's child function, in ms"
pgbouncer_stat_avg_recv,gauge,"how much time spent in this function and it's child function, in ms"
pgbouncer_stat_avg_sent,gauge,"how much time spent in this function itself (other func not included), in ms"
pgbouncer_stat_avg_wait_time,gauge,"how much time spent in this function itself (other func not included), in ms"
pgbouncer_stat_avg_xact_count,gauge,"how much time spent in this function itself (other func not included), in ms"
pgbouncer_stat_avg_xact_time,gauge,how many times this function has been called
pgbouncer_stat_total_query_count,gauge,relation name of this relation
node_arp_entries,gauge,ARP entries by device
node_boot_time_seconds,gauge,"Node boot time, in unixtime."
node_context_switches_total,counter,Total number of context switches.
node_cooling_device_cur_state,gauge,Current throttle state of the cooling device
node_cooling_device_max_state,gauge,Maximum throttle state of the cooling device
node_cpu_guest_seconds_total,counter,Seconds the cpus spent in guests (VMs) for each mode.
node_cpu_seconds_total,counter,Seconds the cpus spent in each mode.
node_disk_discard_time_seconds_total,counter,This is the total number of seconds spent by all discards.
node_disk_discarded_sectors_total,counter,The total number of sectors discarded successfully.
node_disk_discards_completed_total,counter,The total number of discards completed successfully.
node_disk_discards_merged_total,counter,The total number of discards merged.
node_disk_io_now,gauge,The number of I/Os currently in progress.
node_disk_io_time_seconds_total,counter,Total seconds spent doing I/Os.
node_disk_io_time_weighted_seconds_total,counter,The weighted # of seconds spent doing I/Os.
node_disk_read_bytes_total,counter,The total number of bytes read successfully.
node_disk_read_time_seconds_total,counter,The total number of seconds spent by all reads.
node_disk_reads_completed_total,counter,The total number of reads completed successfully.
node_disk_reads_merged_total,counter,The total number of reads merged.
node_disk_write_time_seconds_total,counter,This is the total number of seconds spent by all writes.
node_disk_writes_completed_total,counter,The total number of writes completed successfully.
node_disk_writes_merged_total,counter,The number of writes merged.
node_disk_written_bytes_total,counter,The total number of bytes written successfully.
node_entropy_available_bits,gauge,Bits of available entropy.
node_exporter_build_info,gauge,"A metric with a constant '1' value labeled by version, revision, branch, and goversion from which node_exporter was built."
node_filefd_allocated,gauge,File descriptor statistics: allocated.
node_filefd_maximum,gauge,File descriptor statistics: maximum.
node_filesystem_avail_bytes,gauge,Filesystem space available to non-root users in bytes.
node_filesystem_device_error,gauge,Whether an error occurred while getting statistics for the given device.
node_filesystem_files,gauge,Filesystem total file nodes.
node_filesystem_files_free,gauge,Filesystem total free file nodes.
node_filesystem_free_bytes,gauge,Filesystem free space in bytes.
node_filesystem_readonly,gauge,Filesystem read-only status.
node_filesystem_size_bytes,gauge,Filesystem size in bytes.
node_forks_total,counter,Total number of forks.
node_intr_total,counter,Total number of interrupts serviced.
node_ipvs_connections_total,counter,The total number of connections made.
node_ipvs_incoming_bytes_total,counter,The total amount of incoming data.
node_ipvs_incoming_packets_total,counter,The total number of incoming packets.
node_ipvs_outgoing_bytes_total,counter,The total amount of outgoing data.
node_ipvs_outgoing_packets_total,counter,The total number of outgoing packets.
node_load1,gauge,1m load average.
node_load15,gauge,15m load average.
node_load5,gauge,5m load average.
node_memory_Active_anon_bytes,gauge,Memory information field Active_anon_bytes.
node_memory_Active_bytes,gauge,Memory information field Active_bytes.
node_memory_Active_file_bytes,gauge,Memory information field Active_file_bytes.
node_memory_AnonHugePages_bytes,gauge,Memory information field AnonHugePages_bytes.
node_memory_AnonPages_bytes,gauge,Memory information field AnonPages_bytes.
node_memory_Bounce_bytes,gauge,Memory information field Bounce_bytes.
node_memory_Buffers_bytes,gauge,Memory information field Buffers_bytes.
node_memory_Cached_bytes,gauge,Memory information field Cached_bytes.
node_memory_CmaFree_bytes,gauge,Memory information field CmaFree_bytes.
node_memory_CmaTotal_bytes,gauge,Memory information field CmaTotal_bytes.
node_memory_CommitLimit_bytes,gauge,Memory information field CommitLimit_bytes.
node_memory_Committed_AS_bytes,gauge,Memory information field Committed_AS_bytes.
node_memory_DirectMap1G_bytes,gauge,Memory information field DirectMap1G_bytes.
node_memory_DirectMap2M_bytes,gauge,Memory information field DirectMap2M_bytes.
node_memory_DirectMap4k_bytes,gauge,Memory information field DirectMap4k_bytes.
node_memory_Dirty_bytes,gauge,Memory information field Dirty_bytes.
node_memory_HardwareCorrupted_bytes,gauge,Memory information field HardwareCorrupted_bytes.
node_memory_HugePages_Free,gauge,Memory information field HugePages_Free.
node_memory_HugePages_Rsvd,gauge,Memory information field HugePages_Rsvd.
node_memory_HugePages_Surp,gauge,Memory information field HugePages_Surp.
node_memory_HugePages_Total,gauge,Memory information field HugePages_Total.
node_memory_Hugepagesize_bytes,gauge,Memory information field Hugepagesize_bytes.
node_memory_Hugetlb_bytes,gauge,Memory information field Hugetlb_bytes.
node_memory_Inactive_anon_bytes,gauge,Memory information field Inactive_anon_bytes.
node_memory_Inactive_bytes,gauge,Memory information field Inactive_bytes.
node_memory_Inactive_file_bytes,gauge,Memory information field Inactive_file_bytes.
node_memory_KernelStack_bytes,gauge,Memory information field KernelStack_bytes.
node_memory_Mapped_bytes,gauge,Memory information field Mapped_bytes.
node_memory_MemAvailable_bytes,gauge,Memory information field MemAvailable_bytes.
node_memory_MemFree_bytes,gauge,Memory information field MemFree_bytes.
node_memory_MemTotal_bytes,gauge,Memory information field MemTotal_bytes.
node_memory_Mlocked_bytes,gauge,Memory information field Mlocked_bytes.
node_memory_NFS_Unstable_bytes,gauge,Memory information field NFS_Unstable_bytes.
node_memory_PageTables_bytes,gauge,Memory information field PageTables_bytes.
node_memory_Percpu_bytes,gauge,Memory information field Percpu_bytes.
node_memory_SReclaimable_bytes,gauge,Memory information field SReclaimable_bytes.
node_memory_SUnreclaim_bytes,gauge,Memory information field SUnreclaim_bytes.
node_memory_ShmemHugePages_bytes,gauge,Memory information field ShmemHugePages_bytes.
node_memory_ShmemPmdMapped_bytes,gauge,Memory information field ShmemPmdMapped_bytes.
node_memory_Shmem_bytes,gauge,Memory information field Shmem_bytes.
node_memory_Slab_bytes,gauge,Memory information field Slab_bytes.
node_memory_SwapCached_bytes,gauge,Memory information field SwapCached_bytes.
node_memory_SwapFree_bytes,gauge,Memory information field SwapFree_bytes.
node_memory_SwapTotal_bytes,gauge,Memory information field SwapTotal_bytes.
node_memory_Unevictable_bytes,gauge,Memory information field Unevictable_bytes.
node_memory_VmallocChunk_bytes,gauge,Memory information field VmallocChunk_bytes.
node_memory_VmallocTotal_bytes,gauge,Memory information field VmallocTotal_bytes.
node_memory_VmallocUsed_bytes,gauge,Memory information field VmallocUsed_bytes.
node_memory_WritebackTmp_bytes,gauge,Memory information field WritebackTmp_bytes.
node_memory_Writeback_bytes,gauge,Memory information field Writeback_bytes.
node_netstat_Icmp6_InErrors,unknown,Statistic Icmp6InErrors.
node_netstat_Icmp6_InMsgs,unknown,Statistic Icmp6InMsgs.
node_netstat_Icmp6_OutMsgs,unknown,Statistic Icmp6OutMsgs.
node_netstat_Icmp_InErrors,unknown,Statistic IcmpInErrors.
node_netstat_Icmp_InMsgs,unknown,Statistic IcmpInMsgs.
node_netstat_Icmp_OutMsgs,unknown,Statistic IcmpOutMsgs.
node_netstat_Ip6_InOctets,unknown,Statistic Ip6InOctets.
node_netstat_Ip6_OutOctets,unknown,Statistic Ip6OutOctets.
node_netstat_IpExt_InOctets,unknown,Statistic IpExtInOctets.
node_netstat_IpExt_OutOctets,unknown,Statistic IpExtOutOctets.
node_netstat_Ip_Forwarding,unknown,Statistic IpForwarding.
node_netstat_TcpExt_ListenDrops,unknown,Statistic TcpExtListenDrops.
node_netstat_TcpExt_ListenOverflows,unknown,Statistic TcpExtListenOverflows.
node_netstat_TcpExt_SyncookiesFailed,unknown,Statistic TcpExtSyncookiesFailed.
node_netstat_TcpExt_SyncookiesRecv,unknown,Statistic TcpExtSyncookiesRecv.
node_netstat_TcpExt_SyncookiesSent,unknown,Statistic TcpExtSyncookiesSent.
node_netstat_TcpExt_TCPSynRetrans,unknown,Statistic TcpExtTCPSynRetrans.
node_netstat_Tcp_ActiveOpens,unknown,Statistic TcpActiveOpens.
node_netstat_Tcp_CurrEstab,unknown,Statistic TcpCurrEstab.
node_netstat_Tcp_InErrs,unknown,Statistic TcpInErrs.
node_netstat_Tcp_InSegs,unknown,Statistic TcpInSegs.
node_netstat_Tcp_OutSegs,unknown,Statistic TcpOutSegs.
node_netstat_Tcp_PassiveOpens,unknown,Statistic TcpPassiveOpens.
node_netstat_Tcp_RetransSegs,unknown,Statistic TcpRetransSegs.
node_netstat_Udp6_InDatagrams,unknown,Statistic Udp6InDatagrams.
node_netstat_Udp6_InErrors,unknown,Statistic Udp6InErrors.
node_netstat_Udp6_NoPorts,unknown,Statistic Udp6NoPorts.
node_netstat_Udp6_OutDatagrams,unknown,Statistic Udp6OutDatagrams.
node_netstat_Udp6_RcvbufErrors,unknown,Statistic Udp6RcvbufErrors.
node_netstat_Udp6_SndbufErrors,unknown,Statistic Udp6SndbufErrors.
node_netstat_UdpLite6_InErrors,unknown,Statistic UdpLite6InErrors.
node_netstat_UdpLite_InErrors,unknown,Statistic UdpLiteInErrors.
node_netstat_Udp_InDatagrams,unknown,Statistic UdpInDatagrams.
node_netstat_Udp_InErrors,unknown,Statistic UdpInErrors.
node_netstat_Udp_NoPorts,unknown,Statistic UdpNoPorts.
node_netstat_Udp_OutDatagrams,unknown,Statistic UdpOutDatagrams.
node_netstat_Udp_RcvbufErrors,unknown,Statistic UdpRcvbufErrors.
node_netstat_Udp_SndbufErrors,unknown,Statistic UdpSndbufErrors.
node_network_address_assign_type,gauge,address_assign_type value of /sys/class/net/<iface>.
node_network_carrier,gauge,carrier value of /sys/class/net/<iface>.
node_network_carrier_changes_total,counter,carrier_changes_total value of /sys/class/net/<iface>.
node_network_carrier_down_changes_total,counter,carrier_down_changes_total value of /sys/class/net/<iface>.
node_network_carrier_up_changes_total,counter,carrier_up_changes_total value of /sys/class/net/<iface>.
node_network_device_id,gauge,device_id value of /sys/class/net/<iface>.
node_network_dormant,gauge,dormant value of /sys/class/net/<iface>.
node_network_flags,gauge,flags value of /sys/class/net/<iface>.
node_network_iface_id,gauge,iface_id value of /sys/class/net/<iface>.
node_network_iface_link,gauge,iface_link value of /sys/class/net/<iface>.
node_network_iface_link_mode,gauge,iface_link_mode value of /sys/class/net/<iface>.
node_network_info,gauge,"Non-numeric data from /sys/class/net/<iface>, value is always 1."
node_network_mtu_bytes,gauge,mtu_bytes value of /sys/class/net/<iface>.
node_network_net_dev_group,gauge,net_dev_group value of /sys/class/net/<iface>.
node_network_protocol_type,gauge,protocol_type value of /sys/class/net/<iface>.
node_network_receive_bytes_total,counter,Network device statistic receive_bytes.
node_network_receive_compressed_total,counter,Network device statistic receive_compressed.
node_network_receive_drop_total,counter,Network device statistic receive_drop.
node_network_receive_errs_total,counter,Network device statistic receive_errs.
node_network_receive_fifo_total,counter,Network device statistic receive_fifo.
node_network_receive_frame_total,counter,Network device statistic receive_frame.
node_network_receive_multicast_total,counter,Network device statistic receive_multicast.
node_network_receive_packets_total,counter,Network device statistic receive_packets.
node_network_speed_bytes,gauge,speed_bytes value of /sys/class/net/<iface>.
node_network_transmit_bytes_total,counter,Network device statistic transmit_bytes.
node_network_transmit_carrier_total,counter,Network device statistic transmit_carrier.
node_network_transmit_colls_total,counter,Network device statistic transmit_colls.
node_network_transmit_compressed_total,counter,Network device statistic transmit_compressed.
node_network_transmit_drop_total,counter,Network device statistic transmit_drop.
node_network_transmit_errs_total,counter,Network device statistic transmit_errs.
node_network_transmit_fifo_total,counter,Network device statistic transmit_fifo.
node_network_transmit_packets_total,counter,Network device statistic transmit_packets.
node_network_transmit_queue_length,gauge,transmit_queue_length value of /sys/class/net/<iface>.
node_network_up,gauge,"Value is 1 if operstate is 'up', 0 otherwise."
node_nf_conntrack_entries,gauge,Number of currently allocated flow entries for connection tracking.
node_nf_conntrack_entries_limit,gauge,Maximum size of connection tracking table.
node_ntp_leap,gauge,"NTPD leap second indicator, 2 bits."
node_ntp_offset_seconds,gauge,ClockOffset between NTP and local clock.
node_ntp_reference_timestamp_seconds,gauge,"NTPD ReferenceTime, UNIX timestamp."
node_ntp_root_delay_seconds,gauge,NTPD RootDelay.
node_ntp_root_dispersion_seconds,gauge,NTPD RootDispersion.
node_ntp_rtt_seconds,gauge,RTT to NTPD.
node_ntp_sanity,gauge,NTPD sanity according to RFC5905 heuristics and configured limits.
node_ntp_stratum,gauge,NTPD stratum.
node_processes_max_processes,gauge,Number of max PIDs limit
node_processes_max_threads,gauge,Limit of threads in the system
node_processes_pids,gauge,Number of PIDs
node_processes_state,gauge,Number of processes in each state.
node_processes_threads,gauge,Allocated threads in system
node_procs_blocked,gauge,Number of processes blocked waiting for I/O to complete.
node_procs_running,gauge,Number of processes in runnable state.
node_schedstat_running_seconds_total,counter,Number of seconds CPU spent running a process.
node_schedstat_timeslices_total,counter,Number of timeslices executed by CPU.
node_schedstat_waiting_seconds_total,counter,Number of seconds spent by processing waiting for this CPU.
node_scrape_collector_duration_seconds,gauge,node_exporter: Duration of a collector scrape.
node_scrape_collector_success,gauge,node_exporter: Whether a collector succeeded.
node_sockstat_FRAG6_inuse,gauge,Number of FRAG6 sockets in state inuse.
node_sockstat_FRAG6_memory,gauge,Number of FRAG6 sockets in state memory.
node_sockstat_FRAG_inuse,gauge,Number of FRAG sockets in state inuse.
node_sockstat_FRAG_memory,gauge,Number of FRAG sockets in state memory.
node_sockstat_RAW6_inuse,gauge,Number of RAW6 sockets in state inuse.
node_sockstat_RAW_inuse,gauge,Number of RAW sockets in state inuse.
node_sockstat_TCP6_inuse,gauge,Number of TCP6 sockets in state inuse.
node_sockstat_TCP_alloc,gauge,Number of TCP sockets in state alloc.
node_sockstat_TCP_inuse,gauge,Number of TCP sockets in state inuse.
node_sockstat_TCP_mem,gauge,Number of TCP sockets in state mem.
node_sockstat_TCP_mem_bytes,gauge,Number of TCP sockets in state mem_bytes.
node_sockstat_TCP_orphan,gauge,Number of TCP sockets in state orphan.
node_sockstat_TCP_tw,gauge,Number of TCP sockets in state tw.
node_sockstat_UDP6_inuse,gauge,Number of UDP6 sockets in state inuse.
node_sockstat_UDPLITE6_inuse,gauge,Number of UDPLITE6 sockets in state inuse.
node_sockstat_UDPLITE_inuse,gauge,Number of UDPLITE sockets in state inuse.
node_sockstat_UDP_inuse,gauge,Number of UDP sockets in state inuse.
node_sockstat_UDP_mem,gauge,Number of UDP sockets in state mem.
node_sockstat_UDP_mem_bytes,gauge,Number of UDP sockets in state mem_bytes.
node_sockstat_sockets_used,gauge,Number of IPv4 sockets in use.
node_systemd_socket_accepted_connections_total,counter,Total number of accepted socket connections
node_systemd_socket_current_connections,gauge,Current number of socket connections
node_systemd_system_running,gauge,Whether the system is operational (see 'systemctl is-system-running')
node_systemd_timer_last_trigger_seconds,gauge,Seconds since epoch of last trigger.
node_systemd_unit_state,gauge,Systemd unit
node_systemd_units,gauge,Summary of systemd unit states
node_systemd_version,gauge,Detected systemd version
node_tcp_connection_states,gauge,Number of connection states.
node_textfile_scrape_error,gauge,"1 if there was an error opening or reading a file, 0 otherwise"
node_time_seconds,gauge,System time in seconds since epoch (1970).
node_timex_estimated_error_seconds,gauge,Estimated error in seconds.
node_timex_frequency_adjustment_ratio,gauge,Local clock frequency adjustment.
node_timex_loop_time_constant,gauge,Phase-locked loop time constant.
node_timex_maxerror_seconds,gauge,Maximum error in seconds.
node_timex_offset_seconds,gauge,Time offset in between local system and reference clock.
node_timex_pps_calibration_total,counter,Pulse per second count of calibration intervals.
node_timex_pps_error_total,counter,Pulse per second count of calibration errors.
node_timex_pps_frequency_hertz,gauge,Pulse per second frequency.
node_timex_pps_jitter_seconds,gauge,Pulse per second jitter.
node_timex_pps_jitter_total,counter,Pulse per second count of jitter limit exceeded events.
node_timex_pps_shift_seconds,gauge,Pulse per second interval duration.
node_timex_pps_stability_exceeded_total,counter,Pulse per second count of stability limit exceeded events.
node_timex_pps_stability_hertz,gauge,"Pulse per second stability, average of recent frequency changes."
node_timex_status,gauge,Value of the status array bits.
node_timex_sync_status,gauge,"Is clock synchronized to a reliable server (1 = yes, 0 = no)."
node_timex_tai_offset_seconds,gauge,International Atomic Time (TAI) offset.
node_timex_tick_seconds,gauge,Seconds between clock ticks.
node_udp_queues,gauge,Number of allocated memory in the kernel for UDP datagrams in bytes.
node_uname_info,gauge,Labeled system information as provided by the uname system call.
node_vmstat_oom_kill,unknown,/proc/vmstat information field oom_kill.
node_vmstat_pgfault,unknown,/proc/vmstat information field pgfault.
node_vmstat_pgmajfault,unknown,/proc/vmstat information field pgmajfault.
node_vmstat_pgpgin,unknown,/proc/vmstat information field pgpgin.
node_vmstat_pgpgout,unknown,/proc/vmstat information field pgpgout.
node_vmstat_pswpin,unknown,/proc/vmstat information field pswpin.
node_vmstat_pswpout,unknown,/proc/vmstat information field pswpout.
node_xfs_allocation_btree_compares_total,counter,Number of allocation B-tree compares for a filesystem.
node_xfs_allocation_btree_lookups_total,counter,Number of allocation B-tree lookups for a filesystem.
node_xfs_allocation_btree_records_deleted_total,counter,Number of allocation B-tree records deleted for a filesystem.
node_xfs_allocation_btree_records_inserted_total,counter,Number of allocation B-tree records inserted for a filesystem.
node_xfs_block_map_btree_compares_total,counter,Number of block map B-tree compares for a filesystem.
node_xfs_block_map_btree_lookups_total,counter,Number of block map B-tree lookups for a filesystem.
node_xfs_block_map_btree_records_deleted_total,counter,Number of block map B-tree records deleted for a filesystem.
node_xfs_block_map_btree_records_inserted_total,counter,Number of block map B-tree records inserted for a filesystem.
node_xfs_block_mapping_extent_list_compares_total,counter,Number of extent list compares for a filesystem.
node_xfs_block_mapping_extent_list_deletions_total,counter,Number of extent list deletions for a filesystem.
node_xfs_block_mapping_extent_list_insertions_total,counter,Number of extent list insertions for a filesystem.
node_xfs_block_mapping_extent_list_lookups_total,counter,Number of extent list lookups for a filesystem.
node_xfs_block_mapping_reads_total,counter,Number of block map for read operations for a filesystem.
node_xfs_block_mapping_unmaps_total,counter,Number of block unmaps (deletes) for a filesystem.
node_xfs_block_mapping_writes_total,counter,Number of block map for write operations for a filesystem.
node_xfs_directory_operation_create_total,counter,Number of times a new directory entry was created for a filesystem.
node_xfs_directory_operation_getdents_total,counter,Number of times the directory getdents operation was performed for a filesystem.
node_xfs_directory_operation_lookup_total,counter,Number of file name directory lookups which miss the operating systems directory name lookup cache.
node_xfs_directory_operation_remove_total,counter,Number of times an existing directory entry was created for a filesystem.
node_xfs_extent_allocation_blocks_allocated_total,counter,Number of blocks allocated for a filesystem.
node_xfs_extent_allocation_blocks_freed_total,counter,Number of blocks freed for a filesystem.
node_xfs_extent_allocation_extents_allocated_total,counter,Number of extents allocated for a filesystem.
node_xfs_extent_allocation_extents_freed_total,counter,Number of extents freed for a filesystem.
node_xfs_read_calls_total,counter,Number of read(2) system calls made to files in a filesystem.
node_xfs_vnode_active_total,counter,Number of vnodes not on free lists for a filesystem.
node_xfs_vnode_allocate_total,counter,Number of times vn_alloc called for a filesystem.
node_xfs_vnode_get_total,counter,Number of times vn_get called for a filesystem.
node_xfs_vnode_hold_total,counter,Number of times vn_hold called for a filesystem.
node_xfs_vnode_reclaim_total,counter,Number of times vn_reclaim called for a filesystem.
node_xfs_vnode_release_total,counter,Number of times vn_rele called for a filesystem.
node_xfs_vnode_remove_total,counter,Number of times vn_remove called for a filesystem.
node_xfs_write_calls_total,counter,Number of write(2) system calls made to files in a filesystem.