Configuring the PEM agent v9
You can use an RPM package to install a PEM agent. For detailed installation information, see Installating the PEM agent.
Don't configure the PEM agent responsible for sending SNMP notifications with pgBouncer. For example, if the default PEM agent installed with PEM server is used for SNMP notifications, don't configure it with pgBouncer.
Configuring a new PEM agent (installed via RPM)
After using an RPM package to install the PEM agent, you must configure it to work against a particular PEM database server. Use the following command:
In this command, the --pem-agent-user
argument instructs the agent to create an SSL certificate and key pair for the pem_agent_user1 database user in the /root/.pem
directory.
For example:
The PEM agent uses the keys to connect to the PEM database server as pem_agent_user1. It also creates an agent configuration file named /usr/edb/pem/agent/etc/agent.cfg
.
A line mentioning the agent-user to use appears in the agent.cfg
configuration file. For example:
Configuring an existing PEM agent (installed via RPM)
If you're using an existing PEM agent, you can copy the SSL certificate and key files to the target machine and reuse the files. You must modify the files, adding a new parameter and replacing some parameters in the existing agent.cfg
file.
Add a line to use agent_user as the agent:
Update the port to specify the pgBouncer port:
Update the certificate and key path locations:
As an alternative, you can run the agent self-registration script. However, that process creates a new agent id. If run the agent self-registration script, you must replace the new agent id with the existing id and disable the entry for the new agent id in the pem.agent
table. For example:
Note
Keep a backup of the existing SSL certificate, key file, and agent configuration file.