Telegraf的PGBouncer统计收集器
telegraf-pgbouncer的Python项目详细描述
轮询pgBouncer以获取要提交的统计信息 Telegraf使用 Exec Input Plugin。
用法
该应用程序将通过exec输入插件使用
Telegraf配置示例
[[inputs.exec]] ## Commands array commands = [ "telegraf-pgbouncer -h localhost -p 6432 -U monitor all" ] timeout = "5s" name_suffix = "_pgbouncer" data_format = "json"
cli用法
$ telegraf-pgbouncer --help usage: pgBouncer Stats Collector for Telegraf positional arguments: COMMAND The SHOW command to run for extracting stats. Choices: all, lists, databases, mem, pools, stats optional arguments: -h HOST, --host HOST database server host or socket directory (default: localhost) -p PORT, --port PORT database server port number (default: 5432) -U USERNAME, --username USERNAME The PostgreSQL username to operate as (default: pgbouncer) -W, --password Force password prompt (should happen automatically) (default: False) -v, --version output version information, then exit -?, --help show this help, then exit
认证
在.pgpass文件中指定密码 以便应用程序在不指定密码的情况下正确连接。