postgresql_exporter:一个用于某些postgresql指标的Prometheus导出器

时间:2021-02-03 03:29:17
【文件属性】:
文件名称:postgresql_exporter:一个用于某些postgresql指标的Prometheus导出器
文件大小:66KB
文件格式:ZIP
更新时间:2021-02-03 03:29:17
golang monitoring metrics postgresql prometheus postgresql_exporter 一个Prometheus导出程序,用于某些postgresql指标。 入门 您可以根据需要向config.yml文件中添加任意数量的数据库连接,并使用以下命令运行它: ./postgresql_exporter -config=my/config.yml 然后,您可以将主机名:9111添加到prometheus scrapes配置中: - job_name : ' postgresql ' static_configs : - targets : ['localhost:9111'] 而且,指标应该存在,并且您应该能够查询,绘制图形并对其发出警报。 设置受限的监控用户 默认情况下,某些统计视图(例如pg_stat_statements和pg_stat_activity)不允许查看其他用户运行的查询,除非您是数据库超级用户。 由于您可能不希望监视以超级用户身份运行,因此可以这样设置一个单独的监视用户: CREATE EXTENSION IF NOT EXISTS pg_stat_statements; CREATE EXTE
【文件预览】:
postgresql_exporter-master
----go.mod(348B)
----main.go(5KB)
----go.sum(71KB)
----Dockerfile(295B)
----config.yml(451B)
----.travis.yml(625B)
----config()
--------testdata()
--------config_test.go(2KB)
--------config.go(2KB)
----README.md(4KB)
----gauges()
--------vacuum.go(3KB)
--------basics.go(2KB)
--------deadtuples_test.go(933B)
--------tables_test.go(1KB)
--------transactions.go(418B)
--------slow_queries_test.go(1KB)
--------gauge_test.go(3KB)
--------locks.go(2KB)
--------logical_replication.go(2KB)
--------deadtuples.go(2KB)
--------heap.go(708B)
--------read_throughput.go(1KB)
--------table_sizes.go(2KB)
--------read_throughput_test.go(315B)
--------heap_test.go(589B)
--------basics_test.go(1KB)
--------bgwriter.go(3KB)
--------write_throughput.go(1KB)
--------write_throughput_test.go(315B)
--------backends_test.go(2KB)
--------tables.go(8KB)
--------transactions_test.go(335B)
--------vacuum_test.go(1KB)
--------table_sizes_test.go(426B)
--------indexes.go(8KB)
--------logical_replication_test.go(1KB)
--------gauge.go(3KB)
--------slow_queries.go(1KB)
--------table_rows.go(3KB)
--------replication.go(2KB)
--------replication_test.go(1KB)
--------backends.go(5KB)
--------table_rows_test.go(1KB)
--------indexes_test.go(2KB)
--------locks_test.go(822B)
--------bgwriter_test.go(1KB)
----Makefile(230B)
----.goreleaser.yml(707B)
----.gitignore(61B)
----postgres()
--------version_test.go(1KB)
--------version.go(2KB)

网友评论