> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lwops.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 8.3. Postgresql

> 8.3.1. 添加用于监控的用户 psql -U postgres #在PG所在服务器执行本地连接 CREATE USER it_monitor WITH PASSWORD 'zbx_monitor' INHERIT; GRANT EXECUTE ON FUNCTION pg_catalog....

### 8.3.1. 添加用于监控的用户

```
psql -U postgres #在PG所在服务器执行本地连接
CREATE USER it_monitor WITH PASSWORD 'zbx_monitor' INHERIT;
GRANT EXECUTE ON FUNCTION pg_catalog.pg_ls_dir(text) TO it_monitor;
GRANT EXECUTE ON FUNCTION pg_catalog.pg_stat_file(text) TO it_monitor;
GRANT EXECUTE ON FUNCTION pg_catalog.pg_ls_waldir() TO it_monitor;
GRANT SELECT ON pg_stat_database TO it_monitor;
```

### 8.3.2. 添加监控对象

![8.3. Postgresql 操作截图 1](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/postgresql/image-01.png)
