3.拷贝postgresql 监控脚本目录至 /var/lib/zabbix/ 目录下,postgresql/目录包含从postgresql获取数据库指标所需的脚本文件。 4.将template_db_postgresql.conf复制到Zabbix代理配置目录/etc/zabbix/zabbix_agentd.d/目录下 代码语言:javascript 代码运行次数:0 运行 AI代码解释 [root@postgresql-db1 ~]# cat /etc...
template_db_postgresql.conf里是通过psql去执行的, 我这里是源码安装的postgresql ,并且zabbix user 是nologin, 我不想改zabbix的环境变量,因此这里需要改成绝对路径,否则将会报错“psqlcommandnot found”
如果Zabbix agent 和 PostgreSQL 在不同机器,需要配置密码文件,需要创建.pgpass 文件,并存放在 zabbix 用户的家目录下,内容如下: <REMOTE_HOST1>:5432:postgres:zbx_monitor:<PASSWORD> 1. 配置好之后记得重启 PostgreSQL 服务 二.Zabbix 配置 1.添加主机 添加主机之后,关联系统自带的 Template DB PostgreSQL 模版...
php // Zabbix GUI configuration file global $DB; $DB['TYPE'] = 'POSTGRESQL'; $DB['SERVER'] = '127.0.0.1'; $DB['PORT'] = '5432'; $DB['DATABASE'] = 'zabbix'; $DB['USER'] = 'zabbix'; $DB['PASSWORD'] = 'zabbix'; // SCHEMA is relevant only for IBM_DB2 database $DB[...
添加主机之后,关联系统自带的 Template DB PostgreSQL 模版 配置如以下主机宏 更多宏的配置及说明请点击查看官网说明 2.配置 Agent PostgreSQL 监控需要在 Zabbix Agent 端添加脚本文件。 点击下载监控脚本 下载到 Agent 所在机器,添加 Postgresql 监控 SQL 文件 代码语言:javascript 代码运行次数:0 运行 AI代码解释...
可以看到模版 Template_Manual_PostgreSQL96.xml 主机配置模板 zabbix web 页面操作 Configuration -> Hosts 点击某台机器,进去选择 Templates, 点击Select,选中 Template DB Manual PostgreSQL96 ,点击页下面的 Select 点击Add 点击Update 稍等一会,就能看到采集到postgresql的数据了。
【Zabbix监控部署安装】一、何为模板模板(template):可以应用到主机上的实体(包括监控项、触发器、数据图、图表、监控分类、低级的自动发现规则)的集合。 虽然在Zabbix系统里可以针对主机单独配置监控项、触发器、数据图等监控属性。但是,很显然,通过模板来管理和配置这些监控属性要方便得多,效率也要好得多,特别是在...
find_dbname.sh, 用来输出PostgreSQL的所有数据库 : [root@db-172-16-3-221 pg_monz]# cat find_dbname.sh #!/bin/bash # Get list of Database Name which you want to monitor. # The default settings are excepted template databases(template0/template1). ...
Copy the template_db_postgresql.conf file, containing user parameters, to the Zabbix agent configuration directory /etc/zabbix/zabbix_agentd.d/ and restart Zabbix agent service.Note: if you want to use SSL/TLS encryption to protect communications with the remote PostgreSQL instance, you can ...
(2) 解压并安装postgresql-12 首先解压安装包: [root@host postgres]# tar -zxvf postgresql-12.10.tar.gz 进入解压后自动生成的目录,并安装依赖包: [root@host postgres]# cd /home/postgres/postgresql-12.10 [root@host postgresql-12.10]# yum install -y bison flex readline-devel zlib-devel ...