postgres_exporter SQL解析

定义变量名称

pg_stat_bgwriter

"checkpoints_timed":     {COUNTER, "Number of scheduled checkpoints that have been performed", nil, nil},
"checkpoints_req":       {COUNTER, "Number of requested checkpoints that have been performed", nil, nil},
"checkpoint_write_time": {COUNTER, "Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds", nil, nil},
"checkpoint_sync_time":  {COUNTER, "Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds", nil, nil},
"buffers_checkpoint":    {COUNTER, "Number of buffers written during checkpoints", nil, nil},
"buffers_clean":         {COUNTER, "Number of buffers written by the background writer", nil, nil},
"maxwritten_clean":      {COUNTER, "Number of times the background writer stopped a cleaning scan because it had written too many buffers", nil, nil},
"buffers_backend":       {COUNTER, "Number of buffers written directly by a backend", nil, nil},
"buffers_backend_fsync": {COUNTER, "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)", nil, nil},
"buffers_alloc":         {COUNTER, "Number of buffers allocated", nil, nil},
"stats_reset":           {COUNTER, "Time at which these statistics were last reset", nil, nil},

pg_stat_database

"datid":          {LABEL, "OID of a database", nil, nil},
"datname":        {LABEL, "Name of this database", nil, nil},
"numbackends":    {GAUGE, "Number of backends currently connected to this database. This is the only column in this view that returns a value reflecting current state; all other columns return the accumulated values since the last reset.", nil, nil},
"xact_commit":    {COUNTER, "Number of transactions in this database that have been committed", nil, nil},
"xact_rollback":  {COUNTER, "Number of transactions in this database that have been rolled back", nil, nil},
"blks_read":      {COUNTER, "Number of disk blocks read in this database", nil, nil},
"blks_hit":       {COUNTER, "Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)", nil, nil},
"tup_returned":   {COUNTER, "Number of rows returned by queries in this database", nil, nil},
"tup_fetched":    {COUNTER, "Number of rows fetched by queries in this database", nil, nil},
"tup_inserted":   {COUNTER, "Number of rows inserted by queries in this database", nil, nil},
"tup_updated":    {COUNTER, "Number of rows updated by queries in this database", nil, nil},
"tup_deleted":    {COUNTER, "Number of rows deleted by queries in this database", nil, nil},
"conflicts":      {COUNTER, "Number of queries canceled due to conflicts with recovery in this database. (Conflicts occur only on standby se
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值