{"id":359261,"date":"2024-05-21T00:28:54","date_gmt":"2024-05-21T00:28:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=359261"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=359261","title":{"rendered":"<span>Zabbix, PostgreSQL \u0438 pg_stat_statements<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Zabbix \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e PostgreSQL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 pg_stat_statements.<\/p>\n<h2>pg_stat_statements<\/h2>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Zabbix, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u044f \u0434\u0443\u043c\u0430\u044e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0440\u0430\u0437 \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u0448\u043b\u0438 \u0432 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u041f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043f\u0440\u043e pg_stat_statements. \u042d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 (extension) PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 contrib (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, postgresql14-contrib) \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f PostgreSQL. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 shared_preload_libraries, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 (\u043c\u0435\u0442\u0440\u0438\u043a\u0438), \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c (query). \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u0430: \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a SELECT, UPDATE, INSERT \u0438 DELETE \u043e\u043d \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c: \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u043d\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0442\u043e\u043c \u0438\u0449\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.<\/p>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u043b\u0433\u043e\u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u043f\u043e\u0438\u0441\u043a \u043f\u043e <code>max_exec_time<\/code>); \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043f\u043e\u0438\u0441\u043a \u043f\u043e <code>total_exec_time<\/code>); \u0430 \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (EXPLAIN ANALYZE \u0438\u043b\u0438 auto_explain) \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>shared_blks_*<\/code>, \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 <code>shared_buffers<\/code> \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f. \u041c\u0435\u0442\u0440\u0438\u043a\u0438 <code>local_blks_*<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 <code>temp_buffers<\/code>, \u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>temp_blks_*<\/code> \u2014 \u043e\u043f\u0446\u0438\u0438 <code>work_mem<\/code>. \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f, \u0442\u043e\u0436\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0430\u044f \u0437\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438, <code>maintenance_work_mem<\/code>, \u043d\u043e \u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0435\u0451 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c <code>pg_stat_statements<\/code>, \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0435 <code>shared_buffers<\/code> (\u043a\u044d\u0448 \u041e\u0417\u0423) \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0432 <code>pg_stat_database<\/code>. \u0412 <code>pg_statio_user_tables<\/code>, <code>pg_statio_user_indexes<\/code> \u0438 <code>pg_statio_user_sequences<\/code> \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u044d\u0448\u0430 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446, \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u042d\u0442\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0443\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 PostgreSQL \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 Zabbix. <code>Pg_stat_statements<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e <code>shared_buffers<\/code> \u0434\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e <code>temp_buffers<\/code> \u0438 <code>work_mem<\/code>. \u0410 \u0435\u0449\u0451 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442 Zabbix.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c, \u043d\u0443\u0436\u043d\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <code>pg_stat_statements<\/code> (\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u0439), \u0442\u043e\u0433\u0434\u0430 \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f view <code>pg_stat_statements<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435, \u043d\u0443\u0436\u0435\u043d \u043b\u0438\u0431\u043e \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043b\u0438\u0431\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 10-\u0433\u043e PostgreSQL, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0440\u043e\u043b\u0438 <code>pg_read_all_stats<\/code> \u0438\u043b\u0438 <code>pg_monitor<\/code>.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0440\u0430\u0434\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c Zabbix. \u041f\u0435\u0440\u0432\u0430\u044f: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b (\u0440\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c DBA). \u0410 \u0443 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a SQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u043e\u0434\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Zabbix \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u0430\u0442\u044c \u0438\u043c <strong>\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439<\/strong> \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0431\u0435\u0437 \u043f\u0440\u044f\u043c\u043e\u0433\u043e SQL-\u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>pg_stat_statements<\/code> \u00ab\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u00bb \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a\u00a0\u043d\u0435\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u0432\u00a0\u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u00ab\u0430\u0445\u0442\u0443\u043d\u0433\u00bb, \u0442\u043e \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u044b. \u0422\u0430\u043c \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e \u0432\u0441\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0437\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u0418 \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435, \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u044b\u043b\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437 \u0432 \u0441\u0443\u0442\u043a\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u0447\u044c. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0437\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0443\u0442\u043a\u0438, \u0441\u043a\u0430\u0436\u0435\u043c, \u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0434\u0435\u043b\u0438. \u0410 \u0442\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0440\u043e\u0447\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>pg_stat_statements<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0434\u0435\u043d\u044c. \u0418 \u0442\u0443\u0442 \u0442\u043e\u0436\u0435 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 Zabbix: \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432 \u043f\u043e\u043b\u043d\u043e\u0447\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c (reset) \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 pg_stat_statements<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 PostgreSQL \u0432\u0435\u0440\u0441\u0438\u0439 10-16 (\u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0430 16 \u0435\u0449\u0451 \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 9.5 \u0438 9.6 c \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0430\u043c\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u0430\u043a \u043d\u0430\u0448\u0430, \u0442\u0430\u043a\u0438\u0435 \u0434\u0440\u0435\u0432\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043d\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0445, \u00ab\u043f\u043b\u043e\u0445\u0438\u0445\u00bb \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0432 13-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL. \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 (\u0434\u043e 13-\u0439) \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u043b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>max_time<\/code>, \u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 13-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>max_plan_time<\/code> \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u00a0\u2014 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>max_exec_time<\/code>. \u041f\u0440\u0438\u0447\u0451\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f (\u0432\u0441\u0435\u0433\u0434\u0430 0). \u0427\u0442\u043e\u0431\u044b \u0435\u0451 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e <code>pg_stat_statements.track_planning<\/code>. \u0414\u043b\u044f \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f 13-\u0439 (\u0438 \u0441\u0442\u0430\u0440\u0448\u0435) \u0438 \u0434\u043b\u044f 12-\u0439 (\u0438 \u043c\u043b\u0430\u0434\u0448\u0435) \u0432\u0435\u0440\u0441\u0438\u0439.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0435\u0451 \u0443\u0447\u0435\u0441\u0442\u044c. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>pg_stat_statements_reset<\/code>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 12-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043e 12-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0440\u0430\u0437\u0443. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 13-\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043f\u043e-\u0441\u0442\u0430\u0440\u0438\u043d\u043a\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>pg_stat_statements_reset()<\/code> \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u041d\u043e \u0434\u043b\u044f Zabbix \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 <code>pg_state_statements<\/code> \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (item) Zabbix, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418 \u043f\u043e\u0442\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0442\u044c \u043a \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 12-\u0433\u043e PostgreSQL \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 Zabbix \u043b\u0435\u0433\u043a\u043e: \u0435\u0434\u0438\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0448\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0448\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0410 \u0434\u043e 12-\u0433\u043e \u0432\u0441\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0440\u0430\u0437\u0443 \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0410 \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0427\u0442\u043e \u0441 9.5 \u0438 9.6? \u0422\u0430\u043c \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u043e\u043b\u0438 \u043a\u0430\u043a <code>pg_monitor<\/code> \u0438\u043b\u0438 <code>pg_read_all_stats<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Zabbix \u043f\u043e\u0434 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c: \u043b\u0438\u0431\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u044f \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f <code>zbx_monitor<\/code>, \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f Zabbix \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0430 \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 postgres. <\/p>\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c Zabbix \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0433\u0435\u043d\u0442. \u0418 \u043f\u043e\u0434 \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 PostgreSQL \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 (\u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430), \u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u0442 \u0432 prepared statement, \u0447\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u043e. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043d\u0430 Go, \u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043b\u044e\u0434\u0438 \u043e\u043d\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u0438\u0439\u043d\u044b\u0435 \u0438 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0435, \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 libpq, \u0430 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451. \u0418 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f: \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PostgreSQL &lt;10. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u043e\u0433 \u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u043e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u043d\u044c\u0448\u0435 10. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0430\u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 psql (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 libpq), \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d, \u0442\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043d\u043e. \u041f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0437\u0430 \u0434\u0435\u043d\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0430 \u0441\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 9.5-9.6 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d. \u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 9.5-9.6, \u0442\u043e \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 psql. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e\u0442 \u0436\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0433\u0435\u043d\u0442, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. <\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b, \u0442\u043e URI \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0430 Go \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libpq (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f psql). \u0412 libpq \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 URI \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0430 \u0434\u043b\u044f Go \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a \u044d\u0442\u043e\u043c\u0443  \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u043a\u0435\u0442\u0443. \u0412\u043e\u043f\u0440\u043e\u0441 \u00ab\u0427\u0442\u043e \u043b\u0443\u0447\u0448\u0435?\u00bb, \u0431\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442, \u0441\u043f\u043e\u0440\u043d\u044b\u0439 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u043e \u0442\u0430\u043a\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. \u0418 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 URI: \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 psql, \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d \u043e\u0442 Zabbix.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 9.5-9.6 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0435\u0441\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e, \u0442\u043e \u043f\u043e\u0434 \u043d\u0438\u0445 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 PostgreSQL<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0441\u0435\u0440\u0432\u0435\u0440\u044b PostgreSQL \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0440\u0443\u0442\u0438\u043d\u044b \u0434\u043b\u044f Zabbix-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430: \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0432\u0435\u0434\u0451\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Zabbix, \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e <code>zbx_monitor<\/code>, \u0438 \u0435\u043c\u0443 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0430\u043d\u044b \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430, \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0440\u043e\u043b\u044c <code>pg_monitor<\/code>.<\/p>\n<p><code>GRANT pg_monitor TO zbx_monitor;<\/code><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b <code>pg_stat_statements<\/code>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e <code>shared_preload_libraries<\/code> (\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430). \u0418 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u0431\u0430\u0437\u0435 <code>postgres<\/code>.<\/p>\n<p><code>CREATE EXTENSION pg_stat_statements;<\/code><\/p>\n<p>\u0411\u0430\u0437\u0430 <code>postgres<\/code> \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0432\u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442. \u0412 \u043d\u0435\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>pg_stat_statements_reset<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0430\u0433\u0435\u043d\u0442 Zabbix \u0434\u043b\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<p><code>GRANT EXECUTE ON FUNCTION pg_stat_statements_reset TO zbx_monitor;<\/code><\/p>\n<p>\u041a\u0430\u043a \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c Zabbix \u0432 PostgreSQL? \u0421\u0430\u043c\u044b\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0435\u0441\u043b\u0438 \u0430\u0433\u0435\u043d\u0442 Zabbix \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u0434\u0435\u043b\u0430\u044e\u0442. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e Linux-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>zabbix<\/code> \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 PostgreSQL \u043f\u043e\u0434 SQL-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c <code>zbx_monitor<\/code> \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u0432 pg_hba.conf \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435:<\/p>\n<p><code>local   all   zbx_monitor               peer map=zbx_monitor<\/code><\/p>\n<p>\u0418 \u0432 \u0444\u0430\u0439\u043b pg_ident.conf:<\/p>\n<p><code>zbx_monitor     zabbix                  zbx_monitor<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u043e\u043a \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c restart, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e reload. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u00ab\u043f\u043b\u043e\u0445\u0438\u0445\u00bb \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445 \u0442\u0430\u043a \u043d\u0435\u00a0\u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043f\u0438\u0448\u0443\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u00abtrust\u00bb \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041a\u043e\u0433\u0434\u0430 \u044f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 PostgreSQL \u0432 1999 \u0433\u043e\u0434\u0443, \u0443\u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u0438 \u043f\u043b\u043e\u0445\u0438\u043c \u0442\u043e\u043d\u043e\u043c. \u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<h2>\u041d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (Low Level Discovery)<\/h2>\n<p>\u0420\u0435\u0447\u044c \u0442\u0443\u0442 \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0442\u0430\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 Zabbix \u043a\u0430\u043a <a href=\"https:\/\/www.zabbix.com\/documentation\/6.0\/ru\/manual\/discovery\/low_level_discovery\">\u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (LLD, Low Level Discovery)<\/a>. \u0421\u0443\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c. \u0412 Zabbix \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f <a href=\"https:\/\/www.zabbix.com\/documentation\/6.0\/ru\/manual\/discovery\/low_level_discovery\/custom_rules\">\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Linux \u0438 \u0438\u0449\u0435\u0442 \u0432 \u043d\u0451\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0414\u043b\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 (prototype item) \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (item), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u0422\u0430\u043a \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043c\u043e\u043d\u0438\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD (discovery rule) \u0438 \u0443 PostgreSQL \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Zabbix.<\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD \u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430 Linux-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 PostgreSQL. \u041e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (instance). \u0415\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c URI \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043f\u043e\u0442\u043e\u043c \u043e\u043d \u0442\u0443\u0434\u0430 \u0437\u0430\u0445\u043e\u0434\u0438\u0442, \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u0430\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a. \u0412\u0441\u0451 \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e PostgreSQL \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043c\u0435\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c Linux-\u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0410 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432, \u044f \u043f\u043e\u043c\u043d\u044e, \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432 Debian, \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0432\u043d\u043e. \u041d\u0435 \u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u0447\u043d\u043e, \u043a\u043e\u0433\u0434\u0430, \u044f \u0442\u043e\u0433\u0434\u0430 \u0435\u0449\u0451 \u043c\u043e\u043b\u043e\u0434\u044b\u043c \u0431\u044b\u043b.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u0444\u0438\u0440\u043c\u0435 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u0438\u043c\u0435\u0442\u044c \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e PostgreSQL \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c Linux \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412 \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u043e\u0432\u0441\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435 \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0418 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044b Zabbix \u044d\u0442\u043e \u043d\u0435 \u0443\u0447\u043b\u0438, \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u0430. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u043d\u0438 \u0438 system load \u0434\u0435\u043b\u044f\u0442 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440 \u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u0430\u043a\u2011\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0438\u0436\u0435. \u041e\u0434\u0438\u043d \u0438\u0437\u00a0\u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043a\u0430\u043a\u00a0\u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u00a0Zabbix \u00ab\u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0435 \u0445\u043e\u0441\u0442\u044b\u00bb \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 PostgreSQL, \u0438 \u0442\u0430\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u0443 PostgreSQL \u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 URI \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043b\u0435\u043f\u043e, \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u044e\u0442 \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0445, \u00ab\u043f\u043b\u043e\u0445\u0438\u0445\u00bb \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445, \u0432 \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u043a \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0441\u0451 \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435, \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 PostgreSQL, \u043b\u0438\u0448\u0451\u043d\u043d\u043e\u0435 \u0442\u0430\u043a\u0438\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432. \u0418 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0422\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 LLD \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 (template), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443 \u0432 Zabbix \u043f\u0440\u044f\u043c\u043e \u0438\u043b\u0438 \u043e\u043f\u043e\u0441\u0440\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u043e (\u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432). \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0432\u0441\u0435\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u0442\u0430\u043c \u043d\u0430\u0439\u0434\u0451\u0442.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0443 \u0448\u0430\u0431\u043b\u043e\u043d \u0438 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b. \u041f\u0440\u0430\u0432\u0438\u043b\u043e LLD \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u0433\u0435\u043d\u0442\u0430 Zabbix \u043a\u0430\u043a <code>UserParameter<\/code>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432 Zabbix \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u0441\u0442\u0440\u043e\u043a \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0433\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0432\u043e \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u044f \u043e\u0442\u0441\u044b\u043b\u0430\u044e \u043a \u0444\u0430\u0439\u043b\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 <code>\/etc\/zabbix\/zabbix_agent2.d\/odsamoylov.conf<\/code>.<\/p>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u043e LLD Pg_srv<\/h4>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u043e LLD <code>Pg_srv<\/code> \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 <code>UserParameter<\/code> \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>pg.servers<\/code> (\u0432 \u0444\u0430\u0439\u043b\u0435 <code>odsamoylov.conf)<\/code>. \u042d\u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, shell-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b PostgreSQL \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/var\/run\/postgresql\/, \u0438 \u0434\u043b\u044f \u0442\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 PostgreSQL, \u0447\u0442\u043e \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u0441\u044b LLD, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0430 \u043d\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 WAL \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438. \u0422\u0430\u043a \u0443\u0436 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435  RedHat \u0438 Debian \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0444\u0430\u0439\u043b\u044b PostgreSQL \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c. \u0410 \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0434\u043a\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u0438 \u0432 RedHat, \u0438 \u0432 Debian \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b \u043b\u0435\u0436\u0430\u0442 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0438 \u0442\u0430\u043c, \u0438 \u0442\u0430\u043c.<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 LLD \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u043d\u0430\u0447\u0430\u0442:<\/p>\n<ul>\n<li>\n<p><code>{#POSTGRESQL_URI}<\/code>. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 URI \u0434\u043b\u044f PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 libpq, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 psql. \u0412\u0438\u0434: <code>postgresql:\/\/hostname:5432<\/code>. \u041c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0418 \u043f\u043e\u0442\u043e\u043c \u043a \u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u044d\u0442\u043e\u0442 URI \u043a \u0441\u0435\u0431\u0435 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 psql. \u041c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a \u044d\u0442\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 \u043f\u0438\u043d\u0433\u0430, \u0435\u0441\u043b\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0431\u0430\u0437\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p><code>{#URI}<\/code>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 URI (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0448\u0435) \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438 \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 Zabbix. \u041d\u043e \u043f\u043e\u0442\u043e\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0443 Zabbix \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e \u043c\u0435\u0441\u0442\u0430, \u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u00ab\u0443\u043a\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0439\u00bb URI \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0411\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a <code>:5432\/<\/code>. \u041d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p><code>{#PG.URI}<\/code>. \u042d\u0442\u043e\u0442 URI \u0434\u043b\u044f Zabbix \u043f\u043b\u0430\u0433\u0438\u043d\u0430 postgresql. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u043a\u0435\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p><code>{#PG.SERVER_VERSION_NUM}<\/code>. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 LLD \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0435\u0448\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL, \u0441\u044e\u0434\u0430 \u044f \u0437\u0430\u043d\u043e\u0448\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0432\u0438\u0434\u0435 <code>show server_version_num;<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>{#HOSTNAME}<\/code>. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 bash-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>$HOSTNAME<\/code>, \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0432 Linux. \u0415\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0432 Zabbix, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043c \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439, \u043a\u0430\u043a \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 Zabbix. \u0414\u043b\u044f \u043c\u043e\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 Linux hostname \u0431\u044b\u043b \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f, \u043f\u0440\u0430\u0432\u0434\u0430, \u0443\u0434\u0430\u043b\u0438\u043b&#8230; \u0421\u043a\u0430\u0436\u0443 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443: \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><code>{#PG.PORT}<\/code>. \u041f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f PostgreSQL-\u0441\u0435\u0440\u0432\u0435\u0440. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Zabbix \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u043e\u043a\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>UserParameter<\/code> \u0438 psql.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u043e LLD Pg_db<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e \u0435\u0451 \u0440\u0430\u0437\u043c\u0435\u0440. \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Pg_db<\/code>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 <code>UserParameter<\/code> \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>pg.databases<\/code>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432 Zabbix \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a. \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e LLD. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e \u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0412\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 LLD \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u043d\u0438\u0445 \u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442. \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. <code>{#POSTGRESQL_URI}<\/code>, <code>{#URI}<\/code>, <code>{#PG.URI}<\/code>, <code>{#PG.PORT}<\/code>, <code>{#PG.SERVER_VERSION_NUM}<\/code> \u0442\u0430\u043a\u0438\u0435 \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043a URI \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0418 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f <code>{#PG.DATABASE}<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041c\u0430\u043a\u0440\u043e\u0441\u044b LLD \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0437 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e <code>pg_stat_statements<\/code> \u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 PostgreSQL \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 9.5 \u0438 9.6 \u044f \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b, \u0434\u0430 \u0438\u0445 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 PostgreSQL \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442. \u0425\u043e\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0438 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0438\u0441\u0430\u043d\u0438\u043d\u044b \u0438 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u043e\u0432. \u0410 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441 10 \u043f\u043e 16 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 (\u0441 13 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435) \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b \u0442\u0435\u043c \u0447\u0442\u043e \u0442\u0430\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0421\u0442\u043e\u043b\u0431\u0446\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0442\u0435\u043a\u0441\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u0431\u044b\u043b\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u0442\u043e \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f. <\/p>\n<\/li>\n<li>\n<p>\u0410 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0441 10 \u043f\u043e 12 \u0432\u0435\u0440\u0441\u0438\u044e \u043e\u0431\u0449\u0430\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0441\u0442\u043e\u043b\u0431\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0418 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u043e \u0435\u0441\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0432\u0441\u044e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0451 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <br \/><code>{#URI}->pgstmts.day.rows.v13<\/code>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0434\u0451\u0442 <code>{#URI}<\/code>\u00a0\u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 LLD, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c LLD, \u043f\u043e \u0441\u0443\u0442\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0441\u043b\u0435 <code>-><\/code> \u0438\u0434\u0451\u0442 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 <code>pgstmts<\/code>, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 <code>pg_stat_statements<\/code>, \u044f \u0441\u0438\u043b\u044c\u043d\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u043b\u044e \u043c\u0435\u0441\u0442\u043e. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435\u00a0\u2014\u00a0\u043b\u0438\u0431\u043e <code>day<\/code>, \u043b\u0438\u0431\u043e <code>sec<\/code>. <code>Day<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f, \u0430 <code>sec<\/code>\u00a0\u2014 \u0435\u0436\u0435\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f, \u043f\u043e \u0441\u0443\u0442\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u0430\u044f \u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0443. \u0422\u0430\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044f \u043f\u043e\u044f\u0441\u043d\u044e \u043f\u043e\u0437\u0436\u0435. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>rows<\/code>. \u0410 \u0437\u0430\u0442\u0435\u043c \u0438\u0434\u0451\u0442 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435, \u043a \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f: <code>v13<\/code>\u00a0\u2014 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 PostgreSQL 13 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435, <code>v12<\/code>\u00a0\u2014 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 10-12. \u0422\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <br \/><code>:5432\/database->pgstmts.day.rows.v13<\/code> (\u0433\u0434\u0435 <code>database<\/code>\u00a0\u2014 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c Zabbix \u043a\u0430\u043a <a href=\"https:\/\/www.zabbix.com\/documentation\/6.0\/ru\/manual\/discovery\/low_level_discovery#%D0%B7%D0%B0%D0%BC%D0%B5%D1%89%D0%B5%D0%BD%D0%B8%D1%8F\">\u0437\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u044f (overrides)<\/a> \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 LLD. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0442\u0430\u043a, \u0447\u0442\u043e \u0443 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u0441 <code>v13<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0444\u043b\u0430\u0433 \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 (Discover), \u0442\u043e \u0435\u0441\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0410 \u0443 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u0441 <code>v12<\/code> \u0444\u043b\u0430\u0433 \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f (Discover) \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0431\u0440\u0430\u043d, \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443\u0442. \u0417\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>pgstmts.*.v13<\/code> \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u043b\u0430\u0433 \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 <code>v13<\/code>, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f PostgreSQL \u043c\u0435\u043d\u044c\u0448\u0435 13. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u0430 \u0447\u0435\u0440\u0435\u0437 regexp, \u043d\u043e \u0441\u043c\u044b\u0441\u043b \u0442\u043e\u0442 \u0436\u0435. \u0410 \u0417\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>pgstmts.*.v12<\/code> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u0441 <code>v12<\/code>, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f PostgreSQL \u0431\u0443\u0434\u0435\u0442 10-12. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u043b\u0438\u0431\u043e <code>v12<\/code>, \u043b\u0438\u0431\u043e <code>v13<\/code>, \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0443\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 (day)<\/h2>\n<p>\u0414\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 13 \u0438 \u0432\u044b\u0448\u0435. \u0420\u0430\u0437 \u0432 \u0441\u0443\u0442\u043a\u0438 (\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 00:00) \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0438\u0437 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 LLD Pg_db (\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445) \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>{#URI}->pgstmts.day.json.v13<\/code> (\u0442\u0443\u0442 \u0432 URI \u0432\u0445\u043e\u0434\u0438\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445). \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443 \u0432\u0441\u0435\u0445 \u0431\u0443\u0434\u0435\u0442 \u0440\u043e\u0432\u043d\u043e 00:00, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043d\u0430\u043c \u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435. \u042d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <code>UserParameter<\/code> \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>pgstmts.day.json.v13[port,database]<\/code>. \u0410 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 <code>pg_stat_statements<\/code> \u043f\u043e \u0442\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f postgresql \u043e\u0442 Zabbix \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c <code>CustomQueries<\/code> \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>CustomQueries<\/code> \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 PREPARED STATEMENT. \u0414\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0443\u0434\u0430 \u043d\u0435 \u0443\u043f\u0430\u043a\u0443\u0435\u0448\u044c. \u0412\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 JSON \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 Zabbix \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e JSON \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u0442\u0435\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 10-12 \u0440\u0430\u0437 \u0432 \u0441\u0443\u0442\u043a\u0438, \u0442\u0430\u043a\u0436\u0435 \u0432 00:00, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 LLD Pg_srv (\u043e\u0434\u0438\u043d \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440) \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>{#URI}->pgstmts.day.json.v12<\/code>, \u0432\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 URI \u0438\u043c\u0435\u043d\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442. \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 <code>:5432\/->pgstmts.day.json.v12<\/code>. \u0422\u0443\u0434\u0430 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 UserParameter <code>pgstmts.day.json.v12[port]<\/code>. \u042d\u0442\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432 JSON \u0432\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0440\u0430\u0437\u0443, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0423 Zabbix \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0418 \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 <code>pg_stat_statements<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0447\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b  (\u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 ORM), \u0434\u0430 \u0435\u0449\u0451 \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 (\u0442\u0430\u043a \u0431\u044b\u043b\u043e) \u0438 \u043d\u0438\u043a\u0430\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0411\u0414 (\u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 13 \u0438 \u0432\u044b\u0448\u0435). \u042d\u0442\u043e\u0442 JSON \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 Zabbix 4 \u0447\u0430\u0441\u0430.<\/p>\n<p>\u0412 \u0434\u0432\u0430 \u0447\u0430\u0441\u0430 \u043d\u043e\u0447\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0436\u0435 \u0438\u0437 Pg_db, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u043c\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430, <code>{#URI}->pgstmts.day.json.v12<\/code>, \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0442\u0430\u043a\u043e\u0435 \u0436\u0435, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0432 URI \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0436\u0435 \u0432\u0445\u043e\u0434\u0438\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>:5432\/database->pgstmts.day.json.v12<\/code>. \u042d\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 (calculated). \u041e\u043d\u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u044e\u0442 JSON, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0430\u0431\u0437\u0430\u0446\u0435, \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (Preprocessing) \u0431\u0435\u0440\u0443\u0442 \u043e\u0442\u0442\u0443\u0434\u0430 \u0440\u0430\u0437\u0434\u0435\u043b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0439\u0441\u044f \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 JSON \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 13, \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 Zabbix \u0438 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0420\u0435\u043c\u0430\u0440\u043a\u0430 \u043f\u0440\u043e \u043a\u0438\u0431\u0435\u0440\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, <code>pg_stat_statements<\/code> \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0442\u0438\u043f\u0430 SELECT, UPDATE, INSERT, DELETE. \u041d\u043e \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0442\u0438\u043f\u0430 <code>ALTER USER username WITH PASSWORD 'password'<\/code>. \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0441 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0432 Zabbix \u0437\u0430\u0441\u0432\u0435\u0442\u0438\u043b\u0441\u044f \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0435\u0442\u044c \u0431\u044b \u043d\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u044f \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b, \u044d\u0442\u043e \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 <code>pg_stat_statements<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f postgres. \u0414\u0440\u0443\u0433\u043e\u0439 \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u00a0\u2014 <code>zbx_monitor<\/code>: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 Zabbix \u043e\u0434\u043d\u0438 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445, \u0430 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b. \u0414\u0430 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0438 \u043a \u0447\u0435\u043c\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 <code>UserParameter<\/code> \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0437\u0430\u0431\u0438\u0440\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 <code>pg_stat_statements<\/code>, \u044f \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 (postgres, zbx_monitor, pgbouncer).<\/p>\n<p>\u042f \u0434\u0443\u043c\u0430\u043b \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041d\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Zabbix, \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0430\u0447\u043d\u0451\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u043a\u043e\u0434\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432 <code>UserParameter<\/code>, \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (\u043e\u0431\u044b\u0447\u043d\u043e root) \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 (item) \u0442\u0438\u043f\u0430 JSON, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u043c\u044f \u0438 \u043a\u043b\u044e\u0447 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043d\u0430 <code>v13<\/code>, \u043b\u0438\u0431\u043e \u043d\u0430 <code>v12<\/code>, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0415\u0441\u043b\u0438 \u0431\u044b Zabbix \u0431\u044b\u043b \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043b\u0435\u0433\u043a\u043e \u0432\u0435\u0441\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434, \u043e\u0431\u044a\u0435\u043a\u0442\u044b (items, \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0438 \u0442. \u0434.) \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, Zabbix \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 JSON-\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 <code>v12<\/code> \u0438\u043b\u0438 <code>v13<\/code>, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0434\u043b\u044f <code>v13<\/code> \u0438 \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0430 <code>v12<\/code>. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0435\u0442, \u043a\u0430\u043a \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u041f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0441\u0430\u043c\u0438 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Zabbix v6.0 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u0440\u0430\u0441\u043f\u0438\u0448\u0443, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f v12 \u0438 v13 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442.<\/p>\n<ul>\n<li>\n<p><code>top_max_time<\/code>\u00a0\u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0442\u043e\u043f-5\u00a0\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u00a0\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code>top_total_time<\/code>\u00a0\u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0442\u043e\u043f-5\u00a0\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u00a0\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u0430\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430\u00a0\u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p><code>max_time<\/code>\u00a0\u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0438\u0437\u00a0\u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0437\u0430\u00a0\u043f\u0435\u0440\u0438\u043e\u0434 \u0441\u00a0\u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0441\u0431\u0440\u043e\u0441\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u0423\u00a0\u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0441\u0443\u0442\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><code>mean_time<\/code>\u00a0\u2014 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0422\u043e\u043b\u043a\u0443 \u043e\u0442\u00a0\u044d\u0442\u043e\u0433\u043e \u043c\u0430\u043b\u043e, \u043d\u043e\u00a0\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u00a0\u043a\u0430\u043a\u0438\u0445\u2011\u0442\u043e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p><code>min_time<\/code>\u00a0\u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0438\u0437\u00a0\u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>calls<\/code>\u00a0\u2014 \u0442\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u00a0<code>pg_stat_statements<\/code>, \u0442\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u00a0\u0441\u0443\u0442\u043a\u0438. \u0420\u0435\u0437\u043a\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u00a0\u0447\u0442\u043e\u2011\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435\u00a0\u0442\u0430\u043a.<\/p>\n<\/li>\n<li>\n<p><code>rows<\/code>\u00a0\u2014 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0432\u00a0\u0441\u0443\u0442\u043a\u0438. \u041d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u00a0\u043a\u0430\u043a\u0438\u0435\u2011\u0442\u043e \u0443\u043c\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438, \u0447\u0442\u043e\u00a0\u0441\u00a0\u0431\u0430\u0437\u043e\u0439 \u043d\u0435\u00a0\u0442\u0430\u043a.<\/p>\n<\/li>\n<li>\n<p><code>shared_blks_miss<\/code>\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u043c\u0438\u043c\u043e \u043a\u044d\u0448\u0430 <code>shared_buffers<\/code>, \u0432\u00a0\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><code>local_blks_miss<\/code>\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u043c\u0438\u043c\u043e \u043a\u044d\u0448\u0430 <code>temp_buffers<\/code>, \u0432\u00a0\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445. <\/p>\n<\/li>\n<li>\n<p><code>temp_blks_read<\/code>\u00a0\u2014 \u0442\u0443\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u0432\u00a0\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043d\u0435\u00a0\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0448\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0413\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>work_mem<\/code> \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u0435\u043d \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 PostgreSQL \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u00a0\u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u043b\u043e\u043a\u043e\u0432, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0442\u043e \u0432\u0441\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0441 \u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440\u0430 \u0447\u0442\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043a \u0431\u0430\u0437\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 JSON, \u0442\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u043e.<\/p>\n<h2>\u041f\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 (sec)<\/h2>\n<p>\u0412 Zabbix \u0435\u0441\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u044b <a href=\"https:\/\/www.zabbix.com\/documentation\/6.0\/ru\/manual\/config\/items\/history_and_trends\">\u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430<\/a> (<a href=\"https:\/\/www.zabbix.com\/documentation\/6.0\/en\/manual\/config\/items\/history_and_trends?hl=History%2Cand%2Chistory\">history \u0438 trends<\/a>). \u0412 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043a\u0430\u043a \u043e\u043d\u0430 \u0435\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443. \u0412 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e \u0441\u0443\u0442\u043a\u0430\u043c, \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435. \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0414\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u0445\u043e\u0440\u043e\u0448\u0430 \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0439, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0440\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0430\u0437\u0432\u0430\u043b \u00ab\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f\u00bb \u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437 \u0432\u00a0\u0441\u0443\u0442\u043a\u0438, \u044d\u0442\u043e \u043a\u0430\u043a\u00a0\u0431\u044b \u00ab\u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430\u00bb \u0432\u00a0\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 Zabbix. \u041d\u043e\u00a0\u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0431\u044b \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0438 \u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u0435\u0451 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c. \u041d\u0435 \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u0437 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 <code>top_total_time<\/code>, <code>max_total_time<\/code> (\u0442\u043e\u043f \u0441\u043f\u0438\u0441\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432), <code>mean_time<\/code> (\u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f) \u0438 \u0442. \u0434., \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443. \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438, \u0442\u043e\u043b\u043a\u0443 \u043c\u0430\u043b\u043e. \u041d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>total_time<\/code>\u00a0\u2014 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. Zabbix \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u0430\u044f \u0437\u0430 \u043c\u0438\u043d\u0443\u0442\u0443 (\u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443). \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0445\u043e\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443 \u0431\u0435\u0437 \u0441\u0431\u0440\u043e\u0441\u0430 <code>pg_stat_statements<\/code>. \u0418 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u043e\u0431\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0441\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a? \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0430\u0447\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0448\u044c. \u041e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u043f \u043f\u044f\u0442\u044c \u0441\u0430\u043c\u044b\u0445 \u0434\u043e\u043b\u0433\u043e\u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0421\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a \u0438 \u043d\u0430\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0415\u0449\u0451 \u043e\u043d\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0443\u0437\u043a\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043e\u0434\u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e (\u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443) \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u0431\u0440\u043e\u0441\u0430, \u0442\u043e \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c PostgreSQL \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043e\u0442 Zabbix \u043a\u0430\u043a <code>CustomQueries<\/code>. \u042d\u0442\u043e \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 <code>UserParameter<\/code>, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0443\u0442 \u0432\u043c\u0435\u0441\u0442\u043e shell-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e SQL-\u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0435\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 psql, \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a \u0411\u0414 \u0438 \u0442. \u0434. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0438 \u0432 \u043d\u0451\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 PREPARED STATEMENT. \u041d\u0443\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043b\u0435\u0436\u0430\u0442 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 pgstmts.sec.json.v12.sql \u0438 pgstmts.sec.json.v13.sql. \u0412\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <code>{#URI}->pgstmts.sec.json.v12<\/code> \u0438 <code>{#URI}->pgstmts.sec.json.v13,<\/code> \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0435 LLD Pg_db, \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443. \u041f\u043e\u0442\u043e\u043c \u044d\u0442\u043e\u0442 JSON \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u0438, \u043f\u0440\u0438\u0447\u0451\u043c \u0443 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p><code>calls<\/code>\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u00a0\u0441\u0435\u043a\u0443\u043d\u0434\u0443;<\/p>\n<\/li>\n<li>\n<p><code>load<\/code>\u00a0\u2014 \u0430\u043d\u0430\u043b\u043e\u0433 system load, \u043e\u0431\u00a0\u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435;<\/p>\n<\/li>\n<li>\n<p><code>row<\/code>\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0432\u00a0\u0441\u0435\u043a\u0443\u043d\u0434\u0443;<\/p>\n<\/li>\n<li>\n<p><code>local_blks_hit<\/code> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0432\u00a0\u043a\u044d\u0448 <code>temp_buffers<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>local_blks_read<\/code> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0442\u0435\u043d\u0438\u0439 \u043c\u0438\u043c\u043e \u043a\u044d\u0448\u0430 <code>temp_buffers<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>shared_blks_hit<\/code> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0432\u00a0\u043a\u044d\u0448 <code>shared_buffers<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>shared_blks_read<\/code> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0442\u0435\u043d\u0438\u0439 \u043c\u0438\u043c\u043e \u043a\u044d\u0448\u0430 <code>shared_buffers<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>temp_blks_read<\/code>\u00a0\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0442\u0435\u043d\u0438\u0439 \u043c\u0438\u043c\u043e <code>work_mem<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u043e\u0442\u043c\u0435\u0447\u0430\u043b, \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0443 \u0434\u043e\u043b\u0438 \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u043c\u0438\u043c\u043e \u043a\u044d\u0448\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0447\u0442\u0435\u043d\u0438\u0439 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438\u0437 \u043a\u044d\u0448\u0430 \u0438 \u043c\u0438\u043c\u043e \u043d\u0435\u0433\u043e, \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0448\u044c. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u043c\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0434\u0432\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442 \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u0440\u043e\u043c\u0430\u0445\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445.<\/p>\n<ul>\n<li>\n<p><code>local_blks_miss<\/code>\u00a0\u2014 \u0434\u043e\u043b\u044f \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u0434\u043b\u044f\u00a0<code>temp_buffers<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>shared_blks_miss<\/code>\u00a0\u2014 \u0434\u043e\u043b\u044f \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u0434\u043b\u044f\u00a0<code>shared_buffers<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>load<\/code>.<\/p>\n<h2>Load<\/h2>\n<p>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0440\u0435\u043c\u0430\u0440\u043a\u0430 \u043e\u0431 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u044d\u0442\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. Load, \u043e\u043d\u0430 \u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u044d\u0442\u043e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u0430\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043e\u0446\u0435\u043d\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Linux \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043d\u0435\u0437\u0430\u043f\u0430\u043c\u044f\u0442\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d. \u0423 \u043d\u0435\u0451 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043c\u044b\u0441\u043b: \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 <code>load<\/code> \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u00a0\u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u00a0\u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c \u00ab\u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0\u043f\u0430\u043c\u044f\u0442\u0438\u00bb \u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u0438 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0\u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440\u0430 \u0432\u00a0\u041e\u0417\u0423 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0442\u043e\u043c\u0443\u00a0\u0436\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443. \u0410 \u0432\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043e\u0436\u0438\u0434\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0435\u0442\u0438, \u0432 <code>load<\/code> \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442. \u0422\u0430\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u0433\u0434\u0435-\u0442\u043e \u0442\u0443\u0442 \u0441\u043c\u043e\u0433 \u0438 \u043d\u0430\u043f\u0443\u0442\u0430\u0442\u044c, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0435\u0433\u043a\u0430, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0434\u0443\u0449, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0421\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 <code>load<\/code> \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0451 \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430 \u043e\u0434\u043d\u0443, \u043f\u044f\u0442\u044c \u0438 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043c\u0438\u043d\u0443\u0442. \u0427\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u043e, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0442\u0440\u0438 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u043d\u044f\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0438\u043a\u043e\u0432\u043e\u0439 \u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>uptime<\/code>, <code>top<\/code> \u0438\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \/proc\/loadavg. \u0422\u0430\u043c \u043e\u043d\u0430 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a <code>load average<\/code>, \u043d\u043e \u0442\u0430\u043a \u0435\u0451 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u043b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>average<\/code>, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0438\u043c\u0435\u043d\u0438, \u0430 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>load<\/code> \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0430. \u0413\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043a\u0430\u043a\u043e\u0439 \u043b\u043e\u0430\u0434?\u00bb \u0438\u043b\u0438 \u00ab\u043a\u0430\u043a\u043e\u0439\u00a0\u0431\u044b\u043b \u043b\u043e\u0430\u0434?\u00bb \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a <code>load<\/code> \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0442\u043e \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u0442\u043e\u0440\u0430\u044f \u0437\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f\u00a0\u2014 <code>CPU Load<\/code>. \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u043b\u0430\u0441\u044c \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445. \u0418 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0440\u043e\u0439 \u0434\u043e\u0431\u0440\u043e\u0439 <code>load<\/code> \u0438 <code>CPU Load<\/code> \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u0432\u044f\u0437\u044c. \u0415\u0441\u043b\u0438 <code>load<\/code> \u0440\u0430\u0432\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 3, \u0442\u043e <code>CPU Load<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0440\u0451\u0445 \u044f\u0434\u0440\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0435\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 CPU, \u0442\u043e \u043f\u0440\u0438 <code>load<\/code> 3 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e <code>CPU Load<\/code> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 100 % \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0440\u043e\u0432\u043d\u043e \u0442\u0440\u0451\u0445 \u044f\u0434\u0440\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0434\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043a\u0443\u043f\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435), \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u044f \u043f\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u0430 \u043d\u0451\u043c \u0437\u0430\u0434\u0430\u0447\u043a\u0443 \u0438\u0437 \u0442\u0435\u043e\u0440\u0444\u0438\u0437\u0438\u043a\u0438, \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e \u043c\u0435\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u043e\u0434\u043e\u0440\u043e\u0434. \u0422\u043e\u0433\u0434\u0430 \u0434\u0430, \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0431\u044b\u043b\u0438 \u043d\u0430 100 % \u0438 <code>load<\/code> \u0431\u044b\u043b \u0440\u043e\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0434\u0435\u0440 \u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430.<\/p>\n<p>\u041d\u043e \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043b\u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u0438\u043b\u0438 \u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440. <code>CPU Load<\/code> \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0438\u0437\u043a\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u044f\u0434\u0440\u043e, \u043f\u0440\u0438 \u0442\u043e\u043c \u0447\u0442\u043e <code>load<\/code> \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c. \u042d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442 \u0438 &#171;\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f&#187;, \u0440\u043e\u0432\u043d\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442: \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0435\u0441\u0442\u044c, \u0438 \u043b\u0438\u0431\u043e \u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440, \u043b\u0438\u0431\u043e \u041e\u0417\u0423 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0432\u043e\u043f\u0438\u0442 \u0441\u0432\u043e\u044e \u043f\u0430\u043c\u044f\u0442\u044c, \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u044d\u0448 \u0438 \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441 \u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440\u0430. \u0418 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0438\u0442\u044c <code>load<\/code> \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u00a0\u2014 \u043d\u0435\u0441\u0443\u0441\u0432\u0435\u0442\u043d\u0430\u044f \u0433\u043b\u0443\u043f\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0432 Zabbix. \u0415\u0441\u043b\u0438 \u0443 <code>load<\/code> \u0435\u0441\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0447\u0451\u0442\u043a\u0438\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b (\u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435), \u0442\u043e \u0443 \u043f\u043e\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0447\u0438\u0441\u043b\u043e \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435\u0442. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043b\u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0442\u043e \u0435\u0441\u0442\u044c <code>load<\/code> 1 \u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u044f\u0434\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e \u043d\u0430 100 %, \u043a\u0430\u043a\u043e\u0439 \u0441\u043c\u044b\u0441\u043b \u0431\u0443\u0434\u0435\u0442 \u0443 \u043f\u043e\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e <code>load<\/code>, \u0440\u0430\u0432\u043d\u043e\u0433\u043e 0,041666666666667?<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f <code>CPU Load<\/code>, \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0430 \u043d\u0435\u0442 \u043b\u0438 \u0443 <code>load<\/code> (\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e load average \u0438\u043b\u0438 LA) \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f? \u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, average \u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, <code>CPU Load<\/code> \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u0436\u0435 \u043a\u0430\u043a-\u0442\u043e \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c\u0441\u044f, \u043d\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0436\u0435 \u0435\u0433\u043e <code>CPU Load average<\/code>? \u0418 \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u044f \u043d\u0430\u0448\u0451\u043b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: <code>System Load<\/code>, \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d\u043e \u0442\u0430\u043a \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0431\u044b\u043b\u043e, \u0442\u043e \u0441\u043b\u043e\u0432\u043e system \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u0430\u043b\u043e, \u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438.<\/p>\n<p><code>System Load<\/code>\u00a0\u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c <code>CPU Load<\/code>, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u043e\u0433, \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0442\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0434\u0432\u0438\u0441\u0430\u0442\u044c, \u043b\u0430\u0433\u0430\u0442\u044c, \u0430 \u043f\u043e\u0440\u043e\u0439 \u0438 \u0432\u043e\u0432\u0441\u0435 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0425\u043e\u0442\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0440\u043e\u0433 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0432\u043e\u0439, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u043e\u0442\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c \u0441\u0432\u043e\u043f\u043e\u043c \u0438 \u043d\u0430 \u0442\u0432\u0435\u0440\u0434\u043e\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0438\u043d\u0447\u0435\u0441\u0442\u0435\u0440\u0430\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>System Load<\/code>, \u043f\u043e\u0434\u0432\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u043e\u0437\u0436\u0435. \u0418 \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433 \u044d\u0442\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043d\u043e \u0434\u043b\u044f \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0432\u043a\u043b\u0430\u0434 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u043d\u043e\u0441\u0438\u0442 \u0432 <code>System Load<\/code>.<\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0430 <code>{#URI}->pgstmts.sec.load.v13<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u0441\u0443\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043f\u043e\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438. \u042d\u0442\u0430\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 <code>System Load average 1 min<\/code> \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 <code>pg_stat_statements<\/code>. \u041d\u0435 \u0431\u0435\u0437 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432: \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0438\u043d\u0443\u0442\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u043c\u0438\u043d\u0443\u0442\u0443, \u0442\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u043f\u0438\u043a\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u042d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u0445\u043e\u0442\u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u0430 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c: \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0439 \u043c\u0438\u043d\u0443\u0442\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u043d\u0435 \u0441\u0442\u0430\u043b \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u042d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u0434\u043d\u044f\u0442\u0430 \u0432 \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u043e\u0432\u0441\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a <code>load<\/code> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0442\u0430\u043c \u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043e\u0442\u043d\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a17\/bc4\/4ea\/a17bc44eac12854ecc394fae76860530.png\" alt=\"Load \u0432 \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u043e\u0432\u0441\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435.\" title=\"Load \u0432 \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u043e\u0432\u0441\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435.\" width=\"2583\" height=\"573\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a17\/bc4\/4ea\/a17bc44eac12854ecc394fae76860530.png\"\/><\/p>\n<div><figcaption>Load \u0432 \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u043e\u0432\u0441\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0411\u0414, \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0438 \u0431\u0430\u0437\u044b. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0445\u0432\u0430\u043b\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044d\u0442\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043e\u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043c\u043e\u043b\u043e\u0434\u0446\u044b, \u0440\u0430\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043a\u0440\u0435\u0441\u0442\u0438 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b), \u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u043e. \u042d\u0442\u0438 \u0431\u0430\u0437\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0442\u043e\u0439, \u0447\u0442\u043e \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u0442\u0451\u043c\u043d\u043e-\u0441\u0438\u043d\u0435\u0439, \u0431\u044b\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0432\u0430\u0440\u043d\u0430\u044f \u00ab\u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u00bb \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 12-\u0439 PostgreSQL, \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0432\u0430\u0440\u043d\u0430\u044f, \u0447\u0442\u043e\u00a0\u043e\u043d\u0430 \u0434\u0430\u0436\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u00a0\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u043a\u0430\u043a \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c. \u041f\u0440\u043e \u043d\u0435\u0451 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u041e\u043b\u0435\u0433 \u0411\u0430\u0440\u0442\u0443\u043d\u043e\u0432 \u0432 \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u043e CTE \u0432 12-\u043c PostgreSQL.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/65448c23627c4d30971299b7\" data-style=\"\" id=\"65448c23627c4d30971299b7\" width=\"\"><\/div>\n<p>\u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u0430 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e \u0431\u0430\u0437\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u0430 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0431\u043b\u0435\u0434\u043d\u043e-\u0433\u043e\u043b\u0443\u0431\u044b\u043c. \u0412\u043e\u0442 \u0435\u0451 \u0433\u0440\u0430\u0444\u0438\u043a \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/254\/326\/e65\/254326e650b52f229e3c6054d85084cd.png\" alt=\"\u0414\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.\" title=\"\u0414\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.\" width=\"2612\" height=\"565\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/254\/326\/e65\/254326e650b52f229e3c6054d85084cd.png\"\/><\/p>\n<div><figcaption>\u0414\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0448\u043b\u0430 \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u0443. \u0422\u0430\u043a \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430. \u0421\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0442\u0430\u043a\u0430\u044f \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u043d\u043e\u043c\u0443 \u043f\u0430\u0434\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/domclick\/articles\/701012\/\">\u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0435 \u043c\u0435\u0440\u044b \u0434\u0430\u043b\u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h2>\u0411\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u044b<\/h2>\n<p>\u041a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d <a href=\"https:\/\/www.zabbix.com\/integrations\/postgresql#postgresql_agent2\">PostgreSQL by Zabbix agent 2<\/a>. \u041a\u043b\u044e\u0447:<\/p>\n<pre><code>pgsql.queries[\"{$PG.CONNSTRING}\",\"{$PG.USER}\",\"{$PG.PASSWORD}\",\"{$PG.DATABASE}\",\"{$PG.QUERY_ETIME.MAX.WARN}\"]<\/code><\/pre>\n<p>\u0421 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0431\u044b\u043b\u043e \u043d\u0435 \u0433\u0443\u0441\u0442\u043e, <a href=\"https:\/\/git.zabbix.com\/projects\/ZT\/repos\/rsm-scripts\/browse\/templates\/db\/postgresql\/postgresql\/pgsql.query.time.sql\">\u043f\u043e\u043b\u0435\u0437 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0440\u0441\u044b<\/a>. \u042d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447 \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 <code>pg_stat_activity<\/code> \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a \u0431\u0430\u0437\u0435. \u0418 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u041d\u0430\u0434\u043e \u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u043d\u0435\u043a\u0442 \u043f\u0440\u043e\u0441\u0442\u0430\u0438\u0432\u0430\u0435\u0442), \u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0438 \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e Zabbix. \u0410 \u0442\u0430 \u0447\u0442\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0439.<\/p>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0446\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0436\u0430\u043b\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0437-\u0437\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u0433\u0434\u0430 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Zabbix, \u0442\u043e \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0437\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441, \u0431\u044b\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434. \u0418 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u0438 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0438 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 \u0432\u0440\u0435\u043c\u0451\u043d \u0438 \u043d\u0430\u0440\u043e\u0434\u043e\u0432: \u00ab\u041d\u0435 \u0432\u0438\u0436\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u00bb. \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432\u0441\u0435\u0445 \u0432\u0440\u0435\u043c\u0451\u043d \u0438 \u043d\u0430\u0440\u043e\u0434\u043e\u0432 \u0443 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u043e\u0432: \u00ab\u0423 \u043c\u0435\u043d\u044f \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u00bb. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0430 \u044d\u0442\u0443 \u0431\u0430\u0437\u0443 <code>pg_stat_statements<\/code> \u0438 \u043f\u043e\u043a\u0430 \u0435\u0449\u0451 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0442\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443, \u0442\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438 \u043f\u043e 40 \u043c\u0438\u043d\u0443\u0442. \u0410 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d Zabbix, \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u043e, \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u0441\u0442\u0432\u0443 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f, \u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0438\u043b\u043b\u044e\u0437\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b, \u0438 \u0438\u043b\u043b\u044e\u0437\u0438\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Zabbix \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code>pg_stat_statements<\/code>.<\/p>\n<h2>PS v.2<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431, \u0447\u0442\u043e\u0431\u044b \u0442\u0435 \u0431\u0430\u0437\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u044b\u0447\u043d\u043e postgres) \u043d\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0438 \u0431\u044b unsupported \u0438 \u043e\u0448\u0438\u0431\u043a\u0438. \u0418 \u044d\u0442\u043e \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0443 zabbix \u0435\u0441\u0442\u044c  \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0433\u0434\u0435 \u043d\u0430\u0439\u0442\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0435\u0441\u043b\u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 zabbix \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f (\u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0431\u0430\u0437\u044b \u043c\u0435\u0441\u0442\u043e \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442), \u043d\u043e \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f, \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u043a\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u043e \u0438\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 Preprocessing \u0443 item prototype (\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u043c) Zabbix 6.0 \u043d\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 item \u0438 \u043e\u043d \u0438\u0445 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u0438 discovery. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 item \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 pgstmts (\u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430) \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 host \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 Configuration\/Hosts \u0438 \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u0432 (Execute now) discovery Pg_srv \u0438 Pg_db. \u041b\u0438\u0431\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u043c\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u043e\u0439 \u0438 \u043f\u043e\u0442\u043e\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e. \u0428\u0430\u0431\u043b\u043e\u043d \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0430\u0439\u043b\u044b<\/summary>\n<div class=\"spoiler__content\">\n<h4>pgstmts.sec.json.v12.sql<\/h4>\n<pre><code class=\"pgsql\">WITH su AS (         SELECT usesysid FROM pg_user         WHERE usename IN ('postgres', 'zbx_monitor', 'pgbouncer')) SELECT jsonb_build_object(                 'temp_blks_read', sum(temp_blks_read),                 'shared_blks_read', sum(shared_blks_read),                 'shared_blks_hit', sum(shared_blks_hit),                 'local_blks_read', sum(local_blks_read),                 'local_blks_hit', sum(local_blks_hit),                 'total_time', sum(total_time),                 'calls', sum(calls),                 'rows', sum(rows)         ) AS \"json\" FROM pg_stat_statements(false) WHERE (SELECT pgd.oid FROM pg_database AS pgd WHERE datname=$1) = dbid         AND userid NOT IN (TABLE su);<\/code><\/pre>\n<h4>pgstmts.sec.json.v13.sql<\/h4>\n<pre><code class=\"pgsql\">WITH su AS (         SELECT usesysid FROM pg_user         WHERE usename IN ('postgres', 'zbx_monitor', 'pgbouncer')) SELECT jsonb_build_object(                 'temp_blks_read', sum(temp_blks_read),                 'shared_blks_read', sum(shared_blks_read),                 'shared_blks_hit', sum(shared_blks_hit),                 'local_blks_read', sum(local_blks_read),                 'local_blks_hit', sum(local_blks_hit),                 'total_time', sum(total_exec_time + total_plan_time),                 'calls', sum(calls),                 'rows', sum(rows)         ) AS \"json\" FROM pg_stat_statements(false) WHERE (SELECT pgd.oid FROM pg_database AS pgd WHERE datname=$1) = dbid         AND userid NOT IN (TABLE su);<\/code><\/pre>\n<h4>odsamoylov.conf<\/h4>\n<pre><code class=\"bash\"># discover PostgreSQL servers accessible by file sockets UserParameter=pg.servers, echo '['; delimiter=''; for f in \/var\/run\/postgresql\/.s.PGSQL.*; do if [ -S \"$f\" ]; then p=\"${f#\/var\/run\/postgresql\/.s.PGSQL.}\"; svn=\"$(psql --no-psqlrc --set=ON_ERROR_STOP=on --no-password --no-readline --tuples-only --no-align --user='zbx_monitor' --port=\"$p\" --dbname='postgres' --command=\"show server_version_num;\")\"; echo \"${delimiter}{ \\\"{#URI}\\\":\\\":$p\/\\\", \\\"{#POSTGRESQL_URI}\\\":\\\"postgresql:\/\/$HOSTNAME:$p\\\", \\\"{#PG.URI}\\\":\\\"$f\\\", \\\"{#PG.SERVER_VERSION_NUM}\\\":$svn, \\\"{#HOSTNAME}\\\":\\\"$HOSTNAME\\\", \\\"{#PG.PORT}\\\":$p }\"; delimiter=', '; fi; done; echo ']'  # discover PostgreSQL databases accessible by file sockets UserParameter=pg.databases,echo '['; delimiter='';for f in \/var\/run\/postgresql\/.s.PGSQL.*; do if [ -S \"$f\" ]; then p=\"${f#\/var\/run\/postgresql\/.s.PGSQL.}\"; svn=\"$(psql --no-psqlrc --set=ON_ERROR_STOP=on --no-password --no-readline --tuples-only --no-align --user='zbx_monitor' --port=\"$p\" --dbname='postgres' --command=\"show server_version_num;\")\"; for d in $(psql --no-psqlrc --set=ON_ERROR_STOP=on --no-password --no-readline --tuples-only --no-align --user='zbx_monitor' --port=\"$p\" --dbname='postgres' --command=\"SELECT datname FROM pg_database WHERE NOT datistemplate AND datallowconn;\"); do echo \"${delimiter}{ \\\"{#URI}\\\":\\\":$p\/$d\\\", \\\"{#POSTGRESQL_URI}\\\":\\\"postgresql:\/\/$HOSTNAME:$p\/$d\\\", \\\"{#PG.URI}\\\":\\\"$f\\\", \\\"{#PG.PORT}\\\":$p, \\\"{#PG.DATABASE}\\\":\\\"$d\\\", \\\"{#PG.SERVER_VERSION_NUM}\\\":$svn }\"; delimiter=', '; done; fi; done; echo ']'  # get pg_stat_statements per databases # \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0435\u0441\u043b\u0438 zbx_moniotor \u0434\u0430\u0442\u044c grant \u043d\u0430 pg_stat_statements_reset() \u0438 \u0440\u043e\u043b\u044c pg_read_all_stats \u0438\u043b\u0438 pg_monitor, # \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434 zbx_monitor # \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430 \u043a\u043b\u044e\u0447\u0430 # pgstmts \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 pg_stat_statements # day \u0441\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0431\u044b\u0432\u0430\u044e\u0442 \u0435\u0449\u0435 \u043f\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u044b\u0435) # \u0432\u0441\u0435 \u0433\u0440\u0435\u0431\u0443 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 json, \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u0433\u0440\u0435\u0431\u0430\u044e # v13 -> postgresql >=13 # pgstmts.day.json.v13[port,database] UserParameter=pgstmts.day.json.v13[*], psql --no-psqlrc --set=ON_ERROR_STOP=on --no-password --no-readline --tuples-only --quiet --no-align --user='zbx_monitor' --port='$1' --dbname='postgres' --command=\"WITH su AS (SELECT usesysid FROM pg_user WHERE usename IN ('postgres', 'zbx_monitor', 'pgbouncer')) SELECT jsonb_build_object( 'top_total_time', (SELECT jsonb_agg(stat.*) FROM (SELECT * FROM pg_stat_statements(true) WHERE dbid=pgd.oid AND userid NOT IN (TABLE su) ORDER BY total_exec_time + total_plan_time DESC LIMIT 5) AS stat), 'top_max_time', (SELECT jsonb_agg(stat.*) FROM (SELECT * FROM pg_stat_statements(true) WHERE dbid=pgd.oid AND userid NOT IN (TABLE su) ORDER BY max_exec_time + max_plan_time DESC LIMIT 5) AS stat)) || (SELECT jsonb_build_object( 'temp_blks_read', sum(temp_blks_read), 'shared_blks_miss', CASE WHEN sum(shared_blks_read)=0 THEN 0 ELSE 100.*sum(shared_blks_read)\/sum(shared_blks_hit+shared_blks_read) END, 'local_blks_miss', CASE WHEN sum(local_blks_read)=0 THEN 0 ELSE 100.*sum(local_blks_read)\/sum(local_blks_hit+local_blks_read) END, 'max_time', max(max_exec_time + max_plan_time), 'min_time', min(min_exec_time + min_plan_time), 'mean_time', avg(mean_exec_time + mean_plan_time), 'total_time', sum(total_exec_time + total_plan_time), 'calls', sum(calls), 'rows', sum(rows) ) FROM pg_stat_statements(false) WHERE dbid=pgd.oid AND userid NOT IN (TABLE su) ) FROM pg_database AS pgd WHERE datname='$2';\" --command \"DO \\$DO\\$ BEGIN PERFORM pg_stat_statements_reset(0,pgd.oid,0) FROM pg_database AS pgd WHERE datname='$2'; END \\$DO\\$;\"  # get pg_stat_statements per instance # \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430 \u043a\u043b\u044e\u0447\u0430 # pgstmts \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 pg_stat_statements # day \u0441\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0431\u044b\u0432\u0430\u044e\u0442 \u0435\u0449\u0435 \u043f\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u044b\u0435) # \u0432\u0441\u0435 \u0433\u0440\u0435\u0431\u0443 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 json, \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u0433\u0440\u0435\u0431\u0430\u044e # v12 -> 10&lt;= postgresql &lt;=12 # pgstmts.day.json.v12[port] UserParameter=pgstmts.day.json.v12[*], psql --no-psqlrc --set=ON_ERROR_STOP=on --no-password --no-readline --tuples-only --quiet --no-align --user='zbx_monitor' --port='$1' --dbname='postgres' --command=\"WITH su AS (SELECT usesysid FROM pg_user WHERE usename IN ('postgres', 'zbx_monitor', 'pgbouncer')) SELECT jsonb_object_agg( pgd.datname, jsonb_build_object( 'top_total_time', (SELECT jsonb_agg(stat.*) FROM (SELECT * FROM pg_stat_statements(true) WHERE dbid=pgd.oid AND userid NOT IN (TABLE su) ORDER BY total_time DESC LIMIT 5) AS stat), 'top_max_time', (SELECT jsonb_agg(stat.*) FROM (SELECT * FROM pg_stat_statements(true) WHERE dbid=pgd.oid AND userid NOT IN (TABLE su) ORDER BY max_time DESC LIMIT 5) AS stat)) || (SELECT jsonb_build_object( 'temp_blks_read', sum(temp_blks_read), 'shared_blks_miss', CASE WHEN sum(shared_blks_read)=0 THEN 0 ELSE 100.*sum(shared_blks_read)\/sum(shared_blks_hit+shared_blks_read) END, 'local_blks_miss', CASE WHEN sum(local_blks_read)=0 THEN 0 ELSE 100.*sum(local_blks_read)\/sum(local_blks_hit+local_blks_read) END, 'max_time', max(max_time), 'min_time', min(min_time), 'mean_time', avg(mean_time), 'total_time', sum(total_time), 'calls', sum(calls), 'rows', sum(rows) ) FROM pg_stat_statements(false) WHERE dbid=pgd.oid AND userid NOT IN (TABLE su)) ) FROM pg_database AS pgd WHERE NOT datistemplate AND datallowconn;\" --command=\"DO \\$DO\\$ BEGIN PERFORM pg_stat_statements_reset(); END \\$DO\\$;\"<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b odsamoylov.conf \u0434\u043e\u043b\u0436\u0435\u043d \u043b\u0435\u0436\u0430\u0442\u044c \u0442\u0430\u043c, \u043a\u0443\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u044f <code>Include=\/etc\/zabbix\/zabbix_agent2.d\/*.conf<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/zabbix\/zabbix_agent2.conf<\/code>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/etc\/zabbix\/zabbix_agent2.d\/.<\/code> \u0410 \u0444\u0430\u0439\u043b\u044b pgstmts.sec.json.v*.sql \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043a\u0443\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0446\u0438\u044f <code>Plugins.PostgreSQL.CustomQueriesPath<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/zabbix\/zabbix_agent2.d\/plugins.d\/postgresql.conf<\/code>. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u043d\u0430 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 (\u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043f\u0446\u0438\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430), \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u0441\u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0443\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>\/etc\/zabbix\/postgresql<\/code>.<\/p>\n<h4>zbx_export_templates.yaml<\/h4>\n<p>\u0410 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 Zabbix \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/www.zabbix.com\/documentation\/6.0\/ru\/manual\/xml_export_import\/templates#%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82\">\u0418\u043c\u043f\u043e\u0440\u0442, \u0440\u0430\u0437\u0434\u0435\u043b \u0428\u0430\u0431\u043b\u043e\u043d\u044b<\/a>, \u043a\u043d\u043e\u043f\u043a\u0430 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443. \u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f.<\/p>\n<pre><code class=\"yaml\">zabbix_export:   version: '6.0'   date: '2023-12-05T16:03:58Z'   groups:     - uuid: 748ad4d098d447d492bb935c907f652f       name: Templates\/Databases   templates:     - uuid: 11887f960b8945fd8405569f6d5cc4ab       template: odsamoylov       name: 'ODSamoylov PostgresQL discovery'       description: 'Discover working PostgreSQL servers from existing socket files. v.2'       groups:         - name: Templates\/Databases       items:         - uuid: 9843942f673540f8b61b7983761cdbd7           name: 'System Load (avg 1 min)'           key: 'system.cpu.load[all, avg1]'           value_type: FLOAT           description: 'System load, 1min average.'       discovery_rules:         - uuid: 2d573742e4e64329a9d02d4165902df7           name: Pg_db           key: pg.databases           delay: 1d           lifetime: 1d           item_prototypes:             - uuid: deccbd857fba47b7be99646694c4032b               name: '{#URI}->pgstmts.sec.json.v12'               key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'               history: '0'               trends: '0'               discover: NO_DISCOVER               value_type: TEXT               description: |                 \u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 pg_stat_statements, \u0431\u0435\u0437 reset.                 \u0414\u043b\u044f postgresql &lt;13               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[0][\"json\"]'             - uuid: 60ab8bb11ea84732b2e28470e9e729ef               name: '{#URI}->pgstmts.sec.json.v13'               key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'               history: '0'               trends: '0'               value_type: TEXT               description: |                 \u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 pg_stat_statements, \u0431\u0435\u0437 reset.                 \u0414\u043b\u044f postgresql >=13                 \u0415\u0441\u043b\u0438 \u0434\u043b\u044f zbx_monitor \u0432\u044b\u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u043c\u0438\u0448\u0435\u043d\u0441\u044b, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0442 \u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438.               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[0][\"json\"]'             - uuid: d51ce3c027194c03ac9b9fad60954f62               name: '{#URI}->pgstmts.day.calls.v12'               type: DEPENDENT               key: 'pgstmts.day.calls.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"calls\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 9a5c104842d543f3bbcbe03108a1dbfa               name: '{#URI}->pgstmts.day.calls.v13'               type: DEPENDENT               key: 'pgstmts.day.calls.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"calls\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 1817cd7081194d8cb91a584d3d497b13               name: '{#URI}->pgstmts.day.json.v12'               type: CALCULATED               key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'               delay: 0;h2               history: '0'               trends: '0'               discover: NO_DISCOVER               value_type: TEXT               params: 'first(\/\/pgstmts.day.json.v12[\"{#PG.PORT}\"], 4h)'               description: 'Parse databases stats. 9.5 &lt;= postgresql &lt;=12.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"{#PG.DATABASE}\"]'             - uuid: 7c5e2872b3124158b315baf92547e292               name: '{#URI}->pgstmts.day.json.v13'               key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'               delay: 0;h0               history: '0'               trends: '0'               value_type: TEXT               description: 'Get pg_stat_statements and reset statistics, need postgresql >=13'             - uuid: 6e9f27eb89704487b57e4fed2000d7db               name: '{#URI}->pgstmts.day.local_blks_miss.v12'               type: DEPENDENT               key: 'pgstmts.day.local_blks_miss.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               value_type: FLOAT               units: '%'               description: 'Need to increase temp_buffers PostgresQL config option.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"local_blks_miss\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: ce749edb579b4d498fabb5879b812bc9               name: '{#URI}->pgstmts.day.local_blks_miss.v13'               type: DEPENDENT               key: 'pgstmts.day.local_blks_miss.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               value_type: FLOAT               units: '%'               description: 'Need to increase temp_buffers PostgresQL config option.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"local_blks_miss\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 19569e8199f94a5f98531a996b062028               name: '{#URI}->pgstmts.day.max_time.v12'               type: DEPENDENT               key: 'pgstmts.day.max_time.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"max_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: c989cf9537d14064b88302f92bc6cbc3               name: '{#URI}->pgstmts.day.max_time.v13'               type: DEPENDENT               key: 'pgstmts.day.max_time.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"max_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 76b7a5b9f6604920babcf5cac5f54b97               name: '{#URI}->pgstmts.day.mean_time.v12'               type: DEPENDENT               key: 'pgstmts.day.mean_time.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"mean_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 56c7a1339c8f45fb86a37fbf7ffdfe3c               name: '{#URI}->pgstmts.day.mean_time.v13'               type: DEPENDENT               key: 'pgstmts.day.mean_time.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"mean_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 690c0ddf1d864d29a9482d59b46e7db3               name: '{#URI}->pgstmts.day.min_time.v12'               type: DEPENDENT               key: 'pgstmts.day.min_time.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"min_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 55d279ff6943492d96cc6f23ace8aa86               name: '{#URI}->pgstmts.day.min_time.v13'               type: DEPENDENT               key: 'pgstmts.day.min_time.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"min_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: df66165ed81142129de2cbdf5e8b59d7               name: '{#URI}->pgstmts.day.rows.v12'               type: DEPENDENT               key: 'pgstmts.day.rows.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"rows\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 4d2dbd01aea2455ab58dccfdf13dd7bf               name: '{#URI}->pgstmts.day.rows.v13'               type: DEPENDENT               key: 'pgstmts.day.rows.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"rows\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: a2ffb06cc87a4d19bda568497ec92743               name: '{#URI}->pgstmts.day.shared_blks_miss.v12'               type: DEPENDENT               key: 'pgstmts.day.shared_blks_miss.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               value_type: FLOAT               units: '%'               description: 'Need to increase shared_buffers PostgresQL config option.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"shared_blks_miss\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 6e41b880cdd243d89f5556c94d31c569               name: '{#URI}->pgstmts.day.shared_blks_miss.v13'               type: DEPENDENT               key: 'pgstmts.day.shared_blks_miss.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               value_type: FLOAT               units: '%'               description: 'Need to increase shared_buffers PostgresQL config option.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"shared_blks_miss\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: e29562671e1a4e88b29637b5a018f4a3               name: '{#URI}->pgstmts.day.temp_blks_read.v12'               type: DEPENDENT               key: 'pgstmts.day.temp_blks_read.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               description: 'Need to increase work_mem PostgresQL config option.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"temp_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: f26de5990a8d434a8d2ef3c401d66c44               name: '{#URI}->pgstmts.day.temp_blks_read.v13'               type: DEPENDENT               key: 'pgstmts.day.temp_blks_read.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               description: 'Need to increase work_mem PostgresQL config option.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"temp_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 243a966177c944adbbeddb07af730b06               name: '{#URI}->pgstmts.day.top_max_time.v12'               type: DEPENDENT               key: 'pgstmts.day.top_max_time.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               trends: '0'               discover: NO_DISCOVER               value_type: TEXT               description: 'Top queries for max_time.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"top_max_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: JAVASCRIPT                   parameters:                     - 'return JSON.stringify(JSON.parse(value),null,\" \")'                 - type: STR_REPLACE                   parameters:                     - \\\\n                     - \\n               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 88daedcf4efb4645aa418e555b83e83b               name: '{#URI}->pgstmts.day.top_max_time.v13'               type: DEPENDENT               key: 'pgstmts.day.top_max_time.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               trends: '0'               value_type: TEXT               description: 'Top queries for max_exec_time'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"top_max_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: JAVASCRIPT                   parameters:                     - 'return JSON.stringify(JSON.parse(value),null,\" \")'                 - type: STR_REPLACE                   parameters:                     - \\\\n                     - \\n               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: ae1e10422cd0469faec4550bd9da3da0               name: '{#URI}->pgstmts.day.top_total_time.v12'               type: DEPENDENT               key: 'pgstmts.day.top_total_time.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               trends: '0'               discover: NO_DISCOVER               value_type: TEXT               description: 'Top queries for total_time.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"top_total_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: JAVASCRIPT                   parameters:                     - 'return JSON.stringify(JSON.parse(value),null,\" \")'                 - type: STR_REPLACE                   parameters:                     - \\\\n                     - \\n               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 8a195b984ac24a6c8ff7a9da0ca673ce               name: '{#URI}->pgstmts.day.top_total_time.v13'               type: DEPENDENT               key: 'pgstmts.day.top_total_time.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               trends: '0'               value_type: TEXT               description: 'Top queries for total_exec_time.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"top_total_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: JAVASCRIPT                   parameters:                     - 'return JSON.stringify(JSON.parse(value),null,\" \")'                 - type: STR_REPLACE                   parameters:                     - \\\\n                     - \\n               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 2e9b82cb015a41e6ac34dc7abc50da13               name: '{#URI}->pgstmts.day.total_time.v12'               type: DEPENDENT               key: 'pgstmts.day.total_time.v12[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               discover: NO_DISCOVER               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"total_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v12[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: 501c9852f74147228960eabc2137b9c3               name: '{#URI}->pgstmts.day.total_time.v13'               type: DEPENDENT               key: 'pgstmts.day.total_time.v13[\"{#PG.URI}\",\"{#PG.DATABASE}\"]'               delay: '0'               history: 1w               value_type: FLOAT               units: ms               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"total_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE               master_item:                 key: 'pgstmts.day.json.v13[\"{#PG.PORT}\",\"{#PG.DATABASE}\"]'             - uuid: a79a9d0c0e944d5792f1a8e061dc7ea4               name: '{#URI}->pgstmts.sec.calls.v12'               type: DEPENDENT               key: 'pgstmts.sec.calls.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               description: 'Queries calls per second.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"calls\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: 6a0e03a545644a82b0240f51ffd803d3               name: '{#URI}->pgstmts.sec.calls.v13'               type: DEPENDENT               key: 'pgstmts.sec.calls.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               description: 'Queries calls per second.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"calls\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: eb5775d274ae4b45a400b8eb5b676c93               name: '{#URI}->pgstmts.sec.load.v12'               type: DEPENDENT               key: 'pgstmts.sec.load.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               value_type: FLOAT               description: '\u0410\u043d\u0430\u043b\u043e\u0433 system load, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 pg_stat_statements. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"total_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: MULTIPLIER                   parameters:                     - '0.001'                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: 3ab68c00d288440b8fe576905b1787a4               name: '{#URI}->pgstmts.sec.load.v13'               type: DEPENDENT               key: 'pgstmts.sec.load.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               value_type: FLOAT               description: '\u0410\u043d\u0430\u043b\u043e\u0433 system load, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 pg_stat_statements. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"total_time\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: MULTIPLIER                   parameters:                     - '0.001'                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: 9062ad5dad914883a02db6c42e0841f3               name: '{#URI}->pgstmts.sec.local_blks_hit.v12'               type: DEPENDENT               key: 'pgstmts.sec.local_blks_hit.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"local_blks_hit\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: a2e6e98edcbb4ff5a87be6539b10ebd9               name: '{#URI}->pgstmts.sec.local_blks_hit.v13'               type: DEPENDENT               key: 'pgstmts.sec.local_blks_hit.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"local_blks_hit\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: f1c46395b722427eb3abe1952bd64b70               name: '{#URI}->pgstmts.sec.local_blks_miss.v12'               type: CALCULATED               key: 'pgstmts.sec.local_blks_miss.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               trends: '0'               discover: NO_DISCOVER               value_type: FLOAT               units: '%'               params: '100*last(\/\/pgstmts.sec.local_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])\/(last(\/\/pgstmts.sec.local_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+last(\/\/pgstmts.sec.local_blks_hit.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+0.00001)'               preprocessing:                 - type: CHECK_NOT_SUPPORTED                   parameters:                     - ''             - uuid: 5ac87f478a1349f4b4b1fd6200d94763               name: '{#URI}->pgstmts.sec.local_blks_miss.v13'               type: CALCULATED               key: 'pgstmts.sec.local_blks_miss.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               trends: '0'               value_type: FLOAT               units: '%'               params: '100*last(\/\/pgstmts.sec.local_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])\/(last(\/\/pgstmts.sec.local_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+last(\/\/pgstmts.sec.local_blks_hit.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+0.00001)'               preprocessing:                 - type: CHECK_NOT_SUPPORTED                   parameters:                     - ''             - uuid: 51baf10158164b0cb5470bb4743ddc53               name: '{#URI}->pgstmts.sec.local_blks_read.v12'               type: DEPENDENT               key: 'pgstmts.sec.local_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"local_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: c1eb2c53db3d48f698650822662d2c67               name: '{#URI}->pgstmts.sec.local_blks_read.v13'               type: DEPENDENT               key: 'pgstmts.sec.local_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"local_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: d8687f228a724f3a96036d520adc0d7c               name: '{#URI}->pgstmts.sec.rows.v12'               type: DEPENDENT               key: 'pgstmts.sec.rows.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"rows\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: 46c7fff000d944cc81792141877e30b3               name: '{#URI}->pgstmts.sec.rows.v13'               type: DEPENDENT               key: 'pgstmts.sec.rows.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"rows\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: 645e9467a9a04e86b4f7b29edca134b9               name: '{#URI}->pgstmts.sec.shared_blks_hit.v12'               type: DEPENDENT               key: 'pgstmts.sec.shared_blks_hit.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"shared_blks_hit\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: 3697b2fc1c3e40a18ede6998ec6915cf               name: '{#URI}->pgstmts.sec.shared_blks_hit.v13'               type: DEPENDENT               key: 'pgstmts.sec.shared_blks_hit.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"shared_blks_hit\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: b8a03880ab72460f84108b56215fafd9               name: '{#URI}->pgstmts.sec.shared_blks_miss.v12'               type: CALCULATED               key: 'pgstmts.sec.shared_blks_miss.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               trends: '0'               discover: NO_DISCOVER               value_type: FLOAT               units: '%'               params: '100*last(\/\/pgstmts.sec.shared_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])\/(last(\/\/pgstmts.sec.shared_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+last(\/\/pgstmts.sec.shared_blks_hit.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+0.00001)'               preprocessing:                 - type: CHECK_NOT_SUPPORTED                   parameters:                     - ''             - uuid: 969c9423e22344d0beb86aed847e2c9f               name: '{#URI}->pgstmts.sec.shared_blks_miss.v13'               type: CALCULATED               key: 'pgstmts.sec.shared_blks_miss.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               trends: '0'               value_type: FLOAT               units: '%'               params: '100*last(\/\/pgstmts.sec.shared_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])\/(last(\/\/pgstmts.sec.shared_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+last(\/\/pgstmts.sec.shared_blks_hit.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"])+0.00001)'               preprocessing:                 - type: CHECK_NOT_SUPPORTED                   parameters:                     - ''             - uuid: 325fc8eacfeb4719b3634409a5151025               name: '{#URI}->pgstmts.sec.shared_blks_read.v12'               type: DEPENDENT               key: 'pgstmts.sec.shared_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"shared_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: aa15364ef029496fa5b9ab4cd24dad0e               name: '{#URI}->pgstmts.sec.shared_blks_read.v13'               type: DEPENDENT               key: 'pgstmts.sec.shared_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"shared_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'             - uuid: 10020da9cc0e4363bb68d4f8b4d1eb41               name: '{#URI}->pgstmts.sec.temp_blks_read.v12'               type: DEPENDENT               key: 'pgstmts.sec.temp_blks_read.v12[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               discover: NO_DISCOVER               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"temp_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v12\", \"{#PG.DATABASE}\"]'             - uuid: d7585acf54144ba9b9e2427c4aaaf3fc               name: '{#URI}->pgstmts.sec.temp_blks_read.v13'               type: DEPENDENT               key: 'pgstmts.sec.temp_blks_read.v13[\"{#PG.URI}\",,,\"{#PG.DATABASE}\"]'               delay: '0'               trends: '0'               preprocessing:                 - type: JSONPATH                   parameters:                     - '$[\"temp_blks_read\"]'                 - type: NOT_MATCHES_REGEX                   parameters:                     - ^null$                   error_handler: DISCARD_VALUE                 - type: CHANGE_PER_SECOND                   parameters:                     - ''               master_item:                 key: 'pgsql.custom.query[\"{#PG.URI}\",,,\"postgres\",\"pgstmts.sec.json.v13\", \"{#PG.DATABASE}\"]'           overrides:             - name: 'pgstmts.*.v13'               step: '1'               filter:                 conditions:                   - macro: '{#PG.SERVER_VERSION_NUM}'                     value: '^(1[0-2]....|.....)$'                     formulaid: A               operations:                 - operationobject: ITEM_PROTOTYPE                   operator: REGEXP                   value: '->pgstmts\\..*\\.v13$'                   discover: NO_DISCOVER             - name: 'pgstmts.*.v12'               step: '2'               filter:                 conditions:                   - macro: '{#PG.SERVER_VERSION_NUM}'                     value: '^(1[0-2]....)$'                     formulaid: A               operations:                 - operationobject: ITEM_PROTOTYPE                   operator: REGEXP                   value: '->pgstmts\\..*\\.v12$'                   discover: DISCOVER         - uuid: f56274e9f87e42bb8122559c13c7ea5d           name: Pg_srv           key: pg.servers           delay: 1d           lifetime: 1d           description: 'Discover PostgreSQL servers by looking for unix sockets.'           item_prototypes:             - uuid: cb751a1fe02f463da409a158375570b1               name: '{#URI}->pgstmts.day.json.v12'               key: 'pgstmts.day.json.v12[\"{#PG.PORT}\"]'               delay: 0;h0               history: 4h               trends: '0'               discover: NO_DISCOVER               value_type: TEXT               description: |                 Get pg_stat_statements and reset statistics, need 9.5 &lt;= postgresql &lt;=12.                 Works per instances,           overrides:             - name: 'pgstmts.*.v12'               step: '1'               filter:                 conditions:                   - macro: '{#PG.SERVER_VERSION_NUM}'                     value: '^(1[0-2]....)$'                     formulaid: A               operations:                 - operationobject: ITEM_PROTOTYPE                   operator: REGEXP                   value: '\/->pgstmts\\..*\\.v12$'                   discover: DISCOVER<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/771712\/\"> https:\/\/habr.com\/ru\/articles\/771712\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Zabbix \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e PostgreSQL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 pg_stat_statements.<\/p>\n<h2>pg_stat_statements<\/h2>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Zabbix, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u044f \u0434\u0443\u043c\u0430\u044e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0440\u0430\u0437 \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u0448\u043b\u0438 \u0432 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u041f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043f\u0440\u043e pg_stat_statements. \u042d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 (extension) PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 contrib (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, postgresql14-contrib) \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f PostgreSQL. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 shared_preload_libraries, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 (\u043c\u0435\u0442\u0440\u0438\u043a\u0438), \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c (query). \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u0430: \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a SELECT, UPDATE, INSERT \u0438 DELETE \u043e\u043d \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c: \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u043d\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0442\u043e\u043c \u0438\u0449\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.<\/p>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u043b\u0433\u043e\u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u043f\u043e\u0438\u0441\u043a \u043f\u043e <code>max_exec_time<\/code>); \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043f\u043e\u0438\u0441\u043a \u043f\u043e <code>total_exec_time<\/code>); \u0430 \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (EXPLAIN ANALYZE \u0438\u043b\u0438 auto_explain) \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>shared_blks_*<\/code>, \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 <code>shared_buffers<\/code> \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f. \u041c\u0435\u0442\u0440\u0438\u043a\u0438 <code>local_blks_*<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 <code>temp_buffers<\/code>, \u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>temp_blks_*<\/code> \u2014 \u043e\u043f\u0446\u0438\u0438 <code>work_mem<\/code>. \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f, \u0442\u043e\u0436\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0430\u044f \u0437\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438, <code>maintenance_work_mem<\/code>, \u043d\u043e \u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0435\u0451 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c <code>pg_stat_statements<\/code>, \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043f\u043e \u043a\u0430\u043a\u0438\u043c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0435 <code>shared_buffers<\/code> (\u043a\u044d\u0448 \u041e\u0417\u0423) \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0432 <code>pg_stat_database<\/code>. \u0412 <code>pg_statio_user_tables<\/code>, <code>pg_statio_user_indexes<\/code> \u0438 <code>pg_statio_user_sequences<\/code> \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u044d\u0448\u0430 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446, \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u042d\u0442\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0443\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 PostgreSQL \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 Zabbix. <code>Pg_stat_statements<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e <code>shared_buffers<\/code> \u0434\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e <code>temp_buffers<\/code> \u0438 <code>work_mem<\/code>. \u0410 \u0435\u0449\u0451 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442 Zabbix.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c, \u043d\u0443\u0436\u043d\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <code>pg_stat_statements<\/code> (\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u0439), \u0442\u043e\u0433\u0434\u0430 \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f view <code>pg_stat_statements<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435, \u043d\u0443\u0436\u0435\u043d \u043b\u0438\u0431\u043e \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043b\u0438\u0431\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 10-\u0433\u043e PostgreSQL, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0440\u043e\u043b\u0438 <code>pg_read_all_stats<\/code> \u0438\u043b\u0438 <code>pg_monitor<\/code>.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0440\u0430\u0434\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c Zabbix. \u041f\u0435\u0440\u0432\u0430\u044f: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b (\u0440\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c DBA). \u0410 \u0443 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a SQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u043e\u0434\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Zabbix \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u0430\u0442\u044c \u0438\u043c <strong>\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439<\/strong> \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0431\u0435\u0437 \u043f\u0440\u044f\u043c\u043e\u0433\u043e SQL-\u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <code>pg_stat_statements<\/code> \u00ab\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u00bb \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a\u00a0\u043d\u0435\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u0432\u00a0\u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043a\u0430\u043a\u043e\u0439\u2011\u0442\u043e \u00ab\u0430\u0445\u0442\u0443\u043d\u0433\u00bb, \u0442\u043e \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u044b. \u0422\u0430\u043c \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e \u0432\u0441\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0437\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u0418 \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435, \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u044b\u043b\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437 \u0432 \u0441\u0443\u0442\u043a\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u0447\u044c. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0437\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0443\u0442\u043a\u0438, \u0441\u043a\u0430\u0436\u0435\u043c, \u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0434\u0435\u043b\u0438. \u0410 \u0442\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0440\u043e\u0447\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>pg_stat_statements<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0434\u0435\u043d\u044c. \u0418 \u0442\u0443\u0442 \u0442\u043e\u0436\u0435 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 Zabbix: \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432 \u043f\u043e\u043b\u043d\u043e\u0447\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c (reset) \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 pg_stat_statements<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 PostgreSQL \u0432\u0435\u0440\u0441\u0438\u0439 10-16 (\u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0430 16 \u0435\u0449\u0451 \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 9.5 \u0438 9.6 c \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0430\u043c\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u0430\u043a \u043d\u0430\u0448\u0430, \u0442\u0430\u043a\u0438\u0435 \u0434\u0440\u0435\u0432\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043d\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0445, \u00ab\u043f\u043b\u043e\u0445\u0438\u0445\u00bb \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0432 13-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL. \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 (\u0434\u043e 13-\u0439) \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u043b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>max_time<\/code>, \u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 13-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>max_plan_time<\/code> \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u00a0\u2014 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>max_exec_time<\/code>. \u041f\u0440\u0438\u0447\u0451\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f (\u0432\u0441\u0435\u0433\u0434\u0430 0). \u0427\u0442\u043e\u0431\u044b \u0435\u0451 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e <code>pg_stat_statements.track_planning<\/code>. \u0414\u043b\u044f \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f 13-\u0439 (\u0438 \u0441\u0442\u0430\u0440\u0448\u0435) \u0438 \u0434\u043b\u044f 12-\u0439 (\u0438 \u043c\u043b\u0430\u0434\u0448\u0435) \u0432\u0435\u0440\u0441\u0438\u0439.<\/p>\n<p>\u0412\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0435\u0451 \u0443\u0447\u0435\u0441\u0442\u044c. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>pg_stat_statements_reset<\/code>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 12-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043e 12-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0440\u0430\u0437\u0443. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 13-\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043f\u043e-\u0441\u0442\u0430\u0440\u0438\u043d\u043a\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>pg_stat_statements_reset()<\/code> \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u041d\u043e \u0434\u043b\u044f Zabbix \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 <code>pg_state_statements<\/code> \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (item) Zabbix, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418 \u043f\u043e\u0442\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0442\u044c \u043a \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 12-\u0433\u043e PostgreSQL \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 Zabbix \u043b\u0435\u0433\u043a\u043e: \u0435\u0434\u0438\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0448\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0448\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0410 \u0434\u043e 12-\u0433\u043e \u0432\u0441\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0440\u0430\u0437\u0443 \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0410 \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0427\u0442\u043e \u0441 9.5 \u0438 9.6? \u0422\u0430\u043c \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u043e\u043b\u0438 \u043a\u0430\u043a <code>pg_monitor<\/code> \u0438\u043b\u0438 <code>pg_read_all_stats<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Zabbix \u043f\u043e\u0434 \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c: \u043b\u0438\u0431\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u044f \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f <code>zbx_monitor<\/code>, \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f Zabbix \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0430 \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 postgres. <\/p>\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c Zabbix \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0433\u0435\u043d\u0442. \u0418 \u043f\u043e\u0434 \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 PostgreSQL \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 (\u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430), \u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u0442 \u0432 prepared statement, \u0447\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u043e. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043d\u0430 Go, \u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043b\u044e\u0434\u0438 \u043e\u043d\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u0438\u0439\u043d\u044b\u0435 \u0438 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0435, \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 libpq, \u0430 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451. \u0418 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f: \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PostgreSQL &lt;10. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u043e\u0433 \u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u043e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u043d\u044c\u0448\u0435 10. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0430\u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 psql (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 libpq), \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d, \u0442\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043d\u043e. \u041f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0437\u0430 \u0434\u0435\u043d\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0430 \u0441\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 9.5-9.6 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d. \u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 9.5-9.6, \u0442\u043e \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 psql. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e\u0442 \u0436\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0433\u0435\u043d\u0442, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. <\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b, \u0442\u043e URI \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0430 Go \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libpq (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f psql). \u0412 libpq \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u043e\u043a\u0435\u0442\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 URI \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0430 \u0434\u043b\u044f Go \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a \u044d\u0442\u043e\u043c\u0443  \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u043e\u043a\u0435\u0442\u0443. \u0412\u043e\u043f\u0440\u043e\u0441 \u00ab\u0427\u0442\u043e \u043b\u0443\u0447\u0448\u0435?\u00bb, \u0431\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442, \u0441\u043f\u043e\u0440\u043d\u044b\u0439 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u043e \u0442\u0430\u043a\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. \u0418 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 URI: \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 psql, \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d \u043e\u0442 Zabbix.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 9.5-9.6 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0435\u0441\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e, \u0442\u043e \u043f\u043e\u0434 \u043d\u0438\u0445 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 PostgreSQL<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0441\u0435\u0440\u0432\u0435\u0440\u044b PostgreSQL \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0440\u0443\u0442\u0438\u043d\u044b \u0434\u043b\u044f Zabbix-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430: \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0432\u0435\u0434\u0451\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Zabbix, \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e <code>zbx_monitor<\/code>, \u0438 \u0435\u043c\u0443 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0430\u043d\u044b \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430, \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0440\u043e\u043b\u044c <code>pg_monitor<\/code>.<\/p>\n<p><code>GRANT pg_monitor TO zbx_monitor;<\/code><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b <code>pg_stat_statements<\/code>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e <code>shared_preload_libraries<\/code> (\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430). \u0418 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u0431\u0430\u0437\u0435 <code>postgres<\/code>.<\/p>\n<p><code>CREATE EXTENSION pg_stat_statements;<\/code><\/p>\n<p>\u0411\u0430\u0437\u0430 <code>postgres<\/code> \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0432\u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442. \u0412 \u043d\u0435\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>pg_stat_statements_reset<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0430\u0433\u0435\u043d\u0442 Zabbix \u0434\u043b\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<p><code>GRANT EXECUTE ON FUNCTION pg_stat_statements_reset TO zbx_monitor;<\/code><\/p>\n<p>\u041a\u0430\u043a \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c Zabbix \u0432 PostgreSQL? \u0421\u0430\u043c\u044b\u0439<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-359261","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=359261"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359261\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}