Skip to content

Не удаётся настроить сбор статистики #78

@Slavenin

Description

@Slavenin

Здравствуйте!
Помогите пожалуйста разобраться. Прикручиваю ваше решение к zabbix (который вчера увидел первый раз :) ). Вроде всё получилось, но ничего не работает. Застрял на шаге:

mamonsu bootstrap -U mamonsu -d mamonsu --host localhost

Query:

CREATE TABLE IF NOT EXISTS public.mamonsu_config (
version text,
inserted_at timestamp DEFAULT NOW()
);
error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "mamonsu"', u'auth.c', u'307', u'auth_failed', u'', u'')

вот такое мне пишет консоль.
/etc/postgresql/9.6/main/pg_hba.conf:

local   all             postgres                                md5
host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5
local    all             zabbix                                  md5
local    all             mamonsu                                 md5

/etc/mamonsu/agent.conf:

[postgres]
enabled = True
user = mamonsu
password = dbpass
database = mamonsu
host = localhost
port = 5432
application_name = mamonsu
query_timeout = 10

[system]
enabled = True

[sender]
queue = 300

[agent]
enabled = True
host = 127.0.0.1
port = 10052

[plugins]
enabled = False
directory = /etc/mamonsu/plugins

[zabbix]
enabled = True
client = postgreDb
address = 127.0.0.1
port = 10050

[metric_log]
enabled = False
directory = /var/log/mamonsu
max_size_mb = 1024

[log]
file = /var/log/mamonsu/agent.log
level = INFO
format = [%(levelname)s] %(asctime)s - %(name)s -       %(message)s

[health]
max_memory_usage = 41943040

[databases]
bloat_scale = 0.2
min_rows = 50

[pghealth]
uptime = 600
cache = 80

[xlog]
lag_more_then_in_sec = 300

[checkpoint]
max_checkpoint_by_wal_in_hour = 12

[oldest]
max_xid_age = 18000000
max_query_time = 18000

[cfs]
force_enable = False

[disksizes]
vfs_percent_free = 10
vfs_inode_percent_free = 10

[systemuptime]
uptime = 300

Настройки в zabbix

В логе /var/log/mamonsu/agent.log

INFO] 2016-11-29 10:32:25,296 - BGWRITER	-	started ...
[INFO] 2016-11-29 10:32:25,296 - CONNECTIONS	-	started ...
[INFO] 2016-11-29 10:32:25,296 - DATABASES	-	started ...
[INFO] 2016-11-29 10:32:25,297 - PGHEALTH	-	started ...
[INFO] 2016-11-29 10:32:25,297 - INSTANCE	-	started ...
[INFO] 2016-11-29 10:32:25,297 - XLOG	-	started ...
[INFO] 2016-11-29 10:32:25,297 - PGSTATSTATEMENT	-	started ...
[INFO] 2016-11-29 10:32:25,298 - PGBUFFERCACHE	-	started ...
[INFO] 2016-11-29 10:32:25,298 - PGWAITSAMPLING	-	started ...
[INFO] 2016-11-29 10:32:25,298 - CHECKPOINT	-	started ...
[INFO] 2016-11-29 10:32:25,299 - OLDEST	-	started ...
[INFO] 2016-11-29 10:32:25,299 - PGLOCKS	-	started ...
[ERROR] 2016-11-29 10:32:25,301 - BGWRITER	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,301 - BGWRITER	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,319 - CONNECTIONS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,319 - CONNECTIONS	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,329 - DATABASES	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,329 - DATABASES	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,331 - PGHEALTH	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,331 - PGHEALTH	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,340 - INSTANCE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,340 - INSTANCE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,358 - XLOG	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,358 - XLOG	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,360 - PGSTATSTATEMENT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,360 - PGSTATSTATEMENT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,370 - PGBUFFERCACHE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,370 - PGBUFFERCACHE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,379 - PGWAITSAMPLING	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,379 - PGWAITSAMPLING	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,389 - CHECKPOINT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,389 - CHECKPOINT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,398 - OLDEST	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,398 - OLDEST	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:25,407 - PGLOCKS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:25,407 - PGLOCKS	-	hint: enable debug level to full exception trace
[INFO] 2016-11-29 10:32:35,301 - BGWRITER	-	started ...
[INFO] 2016-11-29 10:32:35,301 - CONNECTIONS	-	started ...
[INFO] 2016-11-29 10:32:35,301 - DATABASES	-	started ...
[INFO] 2016-11-29 10:32:35,301 - PGHEALTH	-	started ...
[INFO] 2016-11-29 10:32:35,301 - INSTANCE	-	started ...
[INFO] 2016-11-29 10:32:35,302 - XLOG	-	started ...
[INFO] 2016-11-29 10:32:35,302 - PGSTATSTATEMENT	-	started ...
[INFO] 2016-11-29 10:32:35,302 - PGBUFFERCACHE	-	started ...
[INFO] 2016-11-29 10:32:35,302 - PGWAITSAMPLING	-	started ...
[INFO] 2016-11-29 10:32:35,303 - CHECKPOINT	-	started ...
[INFO] 2016-11-29 10:32:35,303 - OLDEST	-	started ...
[INFO] 2016-11-29 10:32:35,303 - PGLOCKS	-	started ...
[ERROR] 2016-11-29 10:32:35,308 - BGWRITER	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,308 - BGWRITER	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,318 - CONNECTIONS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,318 - CONNECTIONS	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,327 - DATABASES	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,327 - DATABASES	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,338 - PGHEALTH	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,338 - PGHEALTH	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,347 - INSTANCE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,347 - INSTANCE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,357 - XLOG	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,357 - XLOG	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,367 - PGSTATSTATEMENT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,367 - PGSTATSTATEMENT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,376 - PGBUFFERCACHE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,376 - PGBUFFERCACHE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,386 - PGWAITSAMPLING	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,386 - PGWAITSAMPLING	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,396 - CHECKPOINT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,397 - CHECKPOINT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,406 - OLDEST	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,406 - OLDEST	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:35,416 - PGLOCKS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:35,416 - PGLOCKS	-	hint: enable debug level to full exception trace
[INFO] 2016-11-29 10:32:45,305 - BGWRITER	-	started ...
[INFO] 2016-11-29 10:32:45,306 - CONNECTIONS	-	started ...
[INFO] 2016-11-29 10:32:45,306 - DATABASES	-	started ...
[INFO] 2016-11-29 10:32:45,306 - PGHEALTH	-	started ...
[INFO] 2016-11-29 10:32:45,306 - INSTANCE	-	started ...
[INFO] 2016-11-29 10:32:45,307 - XLOG	-	started ...
[INFO] 2016-11-29 10:32:45,307 - PGSTATSTATEMENT	-	started ...
[INFO] 2016-11-29 10:32:45,307 - PGBUFFERCACHE	-	started ...
[INFO] 2016-11-29 10:32:45,308 - PGWAITSAMPLING	-	started ...
[INFO] 2016-11-29 10:32:45,308 - CHECKPOINT	-	started ...
[INFO] 2016-11-29 10:32:45,308 - OLDEST	-	started ...
[INFO] 2016-11-29 10:32:45,308 - PGLOCKS	-	started ...
[ERROR] 2016-11-29 10:32:45,318 - BGWRITER	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,318 - BGWRITER	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,327 - CONNECTIONS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,328 - CONNECTIONS	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,338 - DATABASES	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,339 - DATABASES	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,348 - PGHEALTH	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,348 - PGHEALTH	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,358 - INSTANCE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,358 - INSTANCE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,368 - XLOG	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,368 - XLOG	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,387 - PGSTATSTATEMENT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,387 - PGSTATSTATEMENT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,397 - PGBUFFERCACHE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,397 - PGBUFFERCACHE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,407 - PGWAITSAMPLING	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,407 - PGWAITSAMPLING	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,417 - CHECKPOINT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,417 - CHECKPOINT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,426 - OLDEST	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,427 - OLDEST	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:45,436 - PGLOCKS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:45,436 - PGLOCKS	-	hint: enable debug level to full exception trace
[INFO] 2016-11-29 10:32:55,316 - BGWRITER	-	started ...
[INFO] 2016-11-29 10:32:55,317 - CONNECTIONS	-	started ...
[INFO] 2016-11-29 10:32:55,317 - DATABASES	-	started ...
[INFO] 2016-11-29 10:32:55,317 - PGHEALTH	-	started ...
[INFO] 2016-11-29 10:32:55,317 - INSTANCE	-	started ...
[INFO] 2016-11-29 10:32:55,318 - XLOG	-	started ...
[INFO] 2016-11-29 10:32:55,318 - PGSTATSTATEMENT	-	started ...
[INFO] 2016-11-29 10:32:55,318 - PGBUFFERCACHE	-	started ...
[INFO] 2016-11-29 10:32:55,319 - PGWAITSAMPLING	-	started ...
[INFO] 2016-11-29 10:32:55,319 - CHECKPOINT	-	started ...
[INFO] 2016-11-29 10:32:55,319 - OLDEST	-	started ...
[INFO] 2016-11-29 10:32:55,319 - PGLOCKS	-	started ...
[ERROR] 2016-11-29 10:32:55,330 - ZBX-zabbix.server.ip:10051	-	catch error: [Errno -2] Name or service not known
[INFO] 2016-11-29 10:32:55,330 - ZBX-zabbix.server.ip:10051	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,339 - BGWRITER	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,339 - BGWRITER	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,349 - CONNECTIONS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,349 - CONNECTIONS	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,359 - DATABASES	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,359 - DATABASES	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,368 - PGHEALTH	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,368 - PGHEALTH	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,378 - INSTANCE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,378 - INSTANCE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,387 - XLOG	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,387 - XLOG	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,396 - PGSTATSTATEMENT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,396 - PGSTATSTATEMENT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,405 - PGBUFFERCACHE	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,405 - PGBUFFERCACHE	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,415 - PGWAITSAMPLING	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,415 - PGWAITSAMPLING	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,425 - CHECKPOINT	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,425 - CHECKPOINT	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,434 - OLDEST	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,435 - OLDEST	-	hint: enable debug level to full exception trace
[ERROR] 2016-11-29 10:32:55,444 - PGLOCKS	-	catch error: (u'FATAL', u'FATAL', u'28P01', u'password authentication failed for user "postgres"', u'auth.c', u'307', u'auth_failed', u'', u'')
[INFO] 2016-11-29 10:32:55,445 - PGLOCKS	-	hint: enable debug level to full exception trace

Что совсем странно, так как откуда-то вылез юзер postgres.

Помогите пожалуйста разобраться.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions