Installing a PEM Agent on Windows

To invoke the PEM agent installer, assume Administrative privileges and navigate into the directory that contains the installer. Then, invoke the installer with the command:

pem_agent-7.<x>.<x>-<x>-platform.exe

The Setup… page opens, welcoming you to the PEM Agent installer.

The PEM Agent Installer's Welcome dialog

PEM Agent Wizard - Welcome dialog

Click Next to continue to the License Agreement.

The PEM License Agreement

PEM Agent Wizard - License Agreement dialog

Carefully review the license agreement before highlighting the appropriate radio button and accepting the agreement; click Next to continue to the Installation Directory dialog.

The PEM Agent Installer's Welcome dialog

PEM Agent Wizard - Installation Directory dialog

By default, the PEM agent is installed in the C:\Program Files (x86)\edb\pem directory.You can accept the default installation directory, or modify the contents of the Installation Directory field, specifying an alternate installation directory for the PEM agent.

By default, the PEM agent installer places a certificate in the Administrator’s %APPDATA%\pem directory. Check the Show advanced options box to indicate that you would like the PEM agent installer to include a dialog that allows you to specify an alternate path for the certificate file.

Check the box next to Register now? to instruct the installer to register the newly installed PEM agent with the PEM server.

Click Next to continue to the PEM Server Installation Details dialog.

Provide PEM server installation details

PEM Agent Wizard - PEM Server Installation details dialog

Enter the connection details for the PEM server on the PEM server installation details dialog:

  • Specify the name or IP address of the system on which the PEM database server resides in the Host field. Please note: If the PEM-HTTPD web server and PEM database are hosted on different systems, you must specify the host of the PEM database.
  • Specify the name of the database superuser in the User Name field.
  • Specify the password associated with the database superuser in the Password field.
  • Specify the port that PostgreSQL is monitoring in the Port field.

Click Next to continue to pemAgent Service Account. The installer will attempt to connect to the server to verify that the details are correct.

Note

The PEM server must allow connections from the PEM agent installer. If you encounter a connection error, confirm the connection properties specified on the PEM Server Installation Details dialog are correct, and confirm that the pg_hba.conf file (on the PEM server) will allow a connection to the server described in the error message.

pemAgent Service Account password

PEM Agent Wizard - pemAgent Service Account password dialog

Provide the password for the edb account under which the pemAgent service will run. The agent certificate and key files will be created in C:\Users\edb\AppData\Roaming\pem directory. Click Next to continue to Agent Details dialog.

Specify a descriptive name for the PEM agent

PEM Agent Wizard - Naming PEM agent dialog

The tree control displayed in the Browser panel of the PEM web interface displays the value entered in the Description field to identify the PEM agent. Specify a descriptive name for the agent, such as the hostname of the machine the agent is installed on, or a name that reflects the host’s functionality.

Provide a descriptive name, or accept the default provided by the PEM agent host, and click Next to continue.

If you checked the Show advanced options checkbox, the Advanced options dialog opens.

Provide the certificate path

PEM Agent Wizard - Advanced Options - Certificate Path dialog

By default, the PEM agent installer places the certificate in the C:\Program Files (x86)\edb\pem directory. Specify an alternate path for the certificate or accept the default and click Next.

The wizard is now ready to install the PEM agent; click Back to amend the installation directory, or Next to continue.

The PEM Agent installation is ready to begin

PEM Agent Wizard - Ready to install

Click Next on the Ready to Install dialog to instruct the installer to copy files to the system and register the agent on the PEM server.

Progress bars mark the installation's progress

PEM Agent Wizard - Installation in progress

The PEM agent installer displays progress bars to mark the PEM agent’s installation progress.

The PEM Agent installation is complete

PEM Agent Wizard - Finish Installation dialog

When the installation has completed, the PEM agent will be running and reporting operating system and host data to the PEM server. To start monitoring Postgres instances on the host of the PEM agent, they must now be added to PEM’s enterprise directory and bound to the agent.

Invoking the Agent Installer from the Command Line

The command line options of the PEM agent installers offer functionality in situations where a graphical installation may not work because of limited resources or system configuration. You can:

  • Include the --mode unattended option when invoking the installer to perform an installation without additional user input.

Not all command line options are suitable for all platforms. For a complete reference guide to the command line options, include the --help option when you invoke the installer.

Invoking the PEM Agent Installer in Unattended Mode

You can perform an unattended PEM server installation by providing installation preferences on the command line when invoking the installer. Please note that the system on which you are installing the PEM server must have internet access.

Before invoking the PEM agent installer in unattended mode, you must:

  • install the PEM server; the pg_hba.conf file of the PEM server must allow connections from the host of the PEM agent.
  • ensure that the monitored Postgres database has SSL enabled, and is accepting connections.

You must have Administrator privileges to install the PEM agent. Use the following command to invoke the PEM agent installer in unattended mode:

pem-agent-7.<x>.<x>-windows-x64.exe --mode unattended
--pghost <pem_server_host_address> --pgport <pem_server_port>
--pguser postgres --pgpassword <pguser_password>
--agent_description <agent_name>

Where:

pem_server_host_address specifies the IP address of the host of the PEM server.

pem_server_port specifies the port used by the backing PEM database; by default, the database uses port 5432.

pguser_password specifies the password associated with the PEM database superuser.

agent_name specifies a descriptive name for the PEM agent.

EnterpriseDB is the leading provider of value-added products and services for the Postgres community.
Please visit our website at www.enterprisedb.com.

Note

When configuring a shell/batch script run by a Windows agent that has PEM 7.11 or later version installed, the AllowBatchJobSteps parameter must be set to True in the agent.cfg file. The PEM agent will not execute any batch/shell script by default.