Добрый день!
Подскажите пожалуйста по связке Zabbix Proxy + PostgreSQL:
Версии ПО
zabbix-proxy-pgsql.x86_64 3.2.6-1.el7
postgresql96-server.x86_64 9.6.3-1PGDG.rhel7
конфиг PG
Активность zabbix-proxy в PG
Логи zabbix
Почему zabbix не закрывает соединения? Какую БД вы используете для zabbix-proxy?
Подскажите пожалуйста по связке Zabbix Proxy + PostgreSQL:
Версии ПО
zabbix-proxy-pgsql.x86_64 3.2.6-1.el7
postgresql96-server.x86_64 9.6.3-1PGDG.rhel7
конфиг PG
Code:
listen_addresses = '*' # what IP address(es) to listen on; port = 5432 # (change requires restart) max_connections = 100 # (change requires restart) shared_buffers = 128MB # min 128kB dynamic_shared_memory_type = posix # the default is the first option log_destination = 'stderr' # Valid values are combinations of logging_collector = on # Enable capturing of stderr and csvlog log_directory = 'pg_log' # directory where log files are written, log_filename = 'postgresql-%a.log' # log file name pattern, log_truncate_on_rotation = on # If on, an existing log file with the log_rotation_age = 1d # Automatic rotation of logfiles will log_rotation_size = 0 # Automatic rotation of logfiles will log_line_prefix = '< %m > ' # special values: log_timezone = 'W-SU' autovacuum = off # Enable autovacuum subprocess? 'on' datestyle = 'iso, mdy' timezone = 'W-SU' lc_messages = 'en_US.UTF-8' # locale for system error message lc_monetary = 'en_US.UTF-8' # locale for monetary formatting lc_numeric = 'en_US.UTF-8' # locale for number formatting lc_time = 'en_US.UTF-8' # locale for time formatting default_text_search_config = 'pg_catalog.english'
Code:
# :activity
count | datname | usename | query | state | client_addr
-------+----------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------+--------+-------------
45 | zabbix | zabbix | commit; | idle | ::1
5 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10282 | idle | ::1
3 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10294 | idle | ::1
3 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10253 | idle | ::1
3 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10292 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10261 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10254 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10302 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10257 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10248 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10259 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10286 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10288 | idle | ::1
2 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10289 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10285 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10287 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10290 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10291 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10293 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10301 | idle | ::1
1 | postgres | postgres | select count(*), datname, usename, query, state, client_addr from pg_stat_activity group by datname, usename, query, state, client_addr order by count .| active |
| | |.desc; | |
1 | zabbix | zabbix | select min(t.nextcheck) from httptest t,hosts h where t.hostid=h.hostid and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.statu.| idle | ::1
| | |.s=0 and (h.maintenance_status=0 or h.maintenance_type=0) | |
1 | zabbix | zabbix | select count(*),min(nextcheck) from drules where status=0 and mod(druleid,1)=0 | idle | ::1
1 | zabbix | zabbix | select groupid,name from groups | idle | ::1
1 | zabbix | zabbix | select id,clock,host,listen_ip,listen_dns,listen_port,host_metadata from proxy_autoreg_host where id>145386 order by id limit 1000 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10247 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10249 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10251 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10252 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10256 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10260 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10263 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10281 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10283 | idle | ::1
1 | zabbix | zabbix | select itemid from items where type=7 and flags<>2 and hostid=10284 | idle | ::1
Code:
# :conninfo
count | datname | usename | state | client_addr
-------+----------+----------+--------+-------------
97 | zabbix | zabbix | idle | ::1
1 | postgres | postgres | active |
Code:
24642:20170713:093501.604 database is down: reconnecting in 10 seconds 24626:20170713:093501.604 [Z3001] connection to database 'zabbix' failed: [0] FATAL: remaining connection slots are reserved for non-replication superuser connections
Code:
< 2017-07-13 09:36:19.785 MSK > FATAL: remaining connection slots are reserved for non-replication superuser connections < 2017-07-13 09:36:20.027 MSK > FATAL: remaining connection slots are reserved for non-replication superuser connections
Почему zabbix не закрывает соединения? Какую БД вы используете для zabbix-proxy?
Comment