prometheus监控postgres
  TEZNKK3IfmPf 2023年11月14日 65 0

postgres镜像默认的用户名为postgres

docker run --name lys-postgres  \
-e POSTGRES_PASSWORD=123456 \
-d -p 15432:5432 postgrest/postgrest

2.postgres-exporter

docker run  -d \
-p 9187:9187 \
--name postgres_exporter \
-e DATA_SOURCE_NAME="postgresql://postgres:123456@10.6.8.184:15432/postgres?sslmode=disable" \
prometheuscommunity/postgres-exporter

3.配置验证

- job_name: 'lysPostgres'
metrics_path: /metrics
static_configs:
- targets: ['10.6.8.184:9187'] # 配置被监控的postgres_export地址

prometheus监控postgres

 

prometheus监控postgres

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月14日 0

暂无评论

推荐阅读
  TEZNKK3IfmPf   2024年04月26日   54   0   0 java数据库sql
  TEZNKK3IfmPf   2024年05月31日   26   0   0 sqlite数据库
  TEZNKK3IfmPf   2024年05月31日   29   0   0 数据库mysql
  TEZNKK3IfmPf   2024年05月31日   27   0   0 数据库mysql
TEZNKK3IfmPf