-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
cprobe版本
$ ./cprobe --version
v0.10.2-9ddf00dd4689a730edcccef880a7810e12696bbepg rule.toml 内容如下,指定账号名为dts
# Authentication credentials
username = "dts"
password = "dts"
options = { sslmode = "disable" }
# Do not include default metrics
disable_default_metrics = false
# Do not include pg_settings metrics
disable_settings_metrics = false
enabled_collectors = [
"database",
"stat_database",
"locks",
"replication_slot",
"replication",
"stat_bgwriter",
"stat_user_tables",
"statio_user_tables",
"wal",
"long_running_transactions",
#"database_wraparound",
#"postmaster",
#"process_idle",
#"stat_activity_autovacuum",
# "stat_statements",
#"stat_wal_receiver",
#"statio_user_indexes",
#"xlog_location",
]cprobe 启动后,pq驱动启动会去找账号名对应的库导致报错
$ ./cprobe
2024-01-05T07:11:07.228Z info /home/runner/work/cprobe/cprobe/lib/logger/flag.go:12 build version: v0.10.2-9ddf00dd4689a730edcccef880a7810e12696bbe
2024-01-05T07:11:07.228Z info /home/runner/work/cprobe/cprobe/lib/logger/flag.go:13 command-line flags
2024-01-05T07:11:07.232Z info /home/runner/work/cprobe/cprobe/lib/runner/runner.go:25 hostname: centos7-3
2024-01-05T07:11:07.232Z info /home/runner/work/cprobe/cprobe/lib/runner/runner.go:26 runtime.fd_limits: (soft=65535, hard=65535)
2024-01-05T07:11:07.232Z info /home/runner/work/cprobe/cprobe/lib/runner/runner.go:27 runtime.vm_limits: (soft=unlimited, hard=unlimited)
2024-01-05T07:11:07.271Z info /home/runner/work/cprobe/cprobe/httpd/httpd.go:221 listening http on 0.0.0.0:5858
2024-01-05T07:11:08.266Z error /home/runner/work/cprobe/cprobe/plugins/postgres/exporter.go:626 Error scraping dsn "postgresql://dts:[email protected]:5432?sslmode=disable": Error opening connection to database (postgresql://dts:[email protected]:5432?sslmode=disable): pq: database "dts" does not exist
2024-01-05T07:11:08.272Z error /home/runner/work/cprobe/cprobe/plugins/postgres/collector/probe.go:62 Error opening connection to database(postgresql://dts:[email protected]:5432?sslmode=disable): error querying postgresql version: pq: database "dts" does not exist
Metadata
Metadata
Assignees
Labels
No labels