Configuration
Pigsty uses the IP address as the unique node identifier. Use the internal IP address on which the database instance listens and provides services.
This address must be a database listening address. It should not be a public IP address. Clients do not have to connect through this address. You can also manage target nodes through SSH tunnels or jump hosts.
The primary IPv4 address remains the node identifier. Check this address carefully during configuration.
In the inventory, the address is inventory_hostname. It is the key in the <cluster>.hosts object. Each node also has two optional identity parameters:
| Name | Type | Level | Necessity | Comment |
|---|---|---|---|---|
inventory_hostname | ip | - | Required | Node IP |
nodename | string | I | Optional | Node Name |
node_cluster | string | C | Optional | Node cluster name |
If nodename is unset, Pigsty uses the existing hostname. If node_cluster is unset, it uses nodes. In monitoring, the node name provides the instance identifier (ins). The cluster name provides the cluster identifier (cls).
For PGSQL nodes, Pigsty defaults to one exclusive PostgreSQL instance per node. Enable node_id_from_pg to derive node identity from pg_cluster and pg_seq. The database and node then share ins and cls labels. This lets you analyze their monitoring metrics together.
Host clusters also support other functions. For example, use HAProxy for load balancing and service exposure. You can also bind an L2 VIP to the cluster.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)