infra
仅安装可观测性基础设施,不包含 PostgreSQL 与 etcd 的专用配置模板
infra 配置模板仅部署 Pigsty 的可观测性基础设施组件(VictoriaMetrics/Grafana/Loki/Nginx 等),不包含 PostgreSQL 与 etcd。
适用于需要独立监控栈的场景,例如监控外部 PostgreSQL/RDS 实例或其他数据源。
配置概览
- 配置名称:
infra - 节点数量: 单节点或多节点
- 配置说明:仅安装可观测性基础设施,不包含 PostgreSQL 与 etcd
- 适用系统:
el8,el9,el10,d12,d13,u22,u24 - 适用架构:
x86_64,aarch64 - 相关配置:
meta
启用方式:
./configure -c infra [-i <primary_ip>]
./infra.yml # 仅执行 infra 剧本
配置内容
源文件地址:pigsty/conf/infra.yml
---
#==============================================================#
# File : infra.yml
# Desc : Infra Only Config
# Ctime : 2025-12-16
# Mtime : 2025-12-28
# Docs : https://doc.pgsty.com/infra
# License : Apache-2.0 @ https://pigsty.io/docs/about/license/
# Copyright : 2018-2026 Ruohang Feng / Vonng (rh@vonng.com)
#==============================================================#
# This is the config template for deploy victoria stack alone
# tutorial: https://doc.pgsty.com/infra
#
# Usage:
# curl https://repo.pigsty.io/get | bash
# ./configure -c infra
# ./infra.yml
all:
children:
infra:
hosts:
10.10.10.10: { infra_seq: 1 }
#10.10.10.11: { infra_seq: 2 } # you can add more nodes if you want
#10.10.10.12: { infra_seq: 3 } # don't forget to assign unique infra_seq for each node
vars: # global variables
version: v4.0.0 # pigsty version string
admin_ip: 10.10.10.10 # admin node ip address
region: default # upstream mirror region: default,china,europe
node_tune: oltp # node tuning specs: oltp,olap,tiny,crit
infra_portal: # infra services exposed via portal
home : { domain: i.pigsty } # default domain name
repo_enabled: false # online installation
node_repo_modules: node,infra,pgsql # add these repos directly to the singleton node
#----------------------------------------------#
# PASSWORD : https://doc.pgsty.com/config/security
#----------------------------------------------#
grafana_admin_password: pigsty
grafana_view_password: DBUser.Viewer
pg_admin_password: DBUser.DBA
pg_monitor_password: DBUser.Monitor
pg_replication_password: DBUser.Replicator
patroni_password: Patroni.API
haproxy_admin_password: pigsty
minio_secret_key: S3User.MinIO
etcd_root_password: Etcd.Root
...配置解读
infra 模板是 Pigsty 的 纯监控栈配置,专为独立部署可观测性基础设施设计。
适用场景:
- 监控外部 PostgreSQL 实例(RDS、自建等)
- 需要独立的监控/告警平台
- 已有 PostgreSQL 集群,仅需添加监控
- 作为多集群监控的中央控制台
包含组件:
- VictoriaMetrics:时序数据库,存储监控指标
- VictoriaLogs:日志聚合系统
- VictoriaTraces:链路追踪系统
- Grafana:可视化仪表盘
- Alertmanager:告警管理
- Nginx:反向代理和 Web 入口
不包含组件:
- PostgreSQL 数据库集群
- etcd 分布式协调服务
- MinIO 对象存储
监控外部实例:
配置完成后,可通过 pgsql-monitor.yml 剧本添加外部 PostgreSQL 实例的监控:
pg_exporters:
20001: { pg_cluster: pg-foo, pg_seq: 1, pg_host: 10.10.10.100 }
20002: { pg_cluster: pg-bar, pg_seq: 1, pg_host: 10.10.10.101 }
注意事项: