Installing Postgres Enterprise Manager agent on Windows v9

The PEM agent graphical installer for Windows installs and registers the PEM agent.

To invoke the PEM agent installer, assume administrator privileges and navigate to the directory that contains the installer. Then, invoke the installer:

  1. The Setup screen opens, welcoming you to the PEM agent installer. Select Next.

  2. Review the license agreement before selecting the appropriate radio button and accepting the agreement. Select Next.

  3. By default, the PEM agent is installed in the C:\Program Files (x86)\edb\pem directory. You can accept the default installation directory. Or you can 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. Select Show advanced options to include a dialog box in the installation process that allows you to specify an alternate path for the certificate file.

    • Select Register now? to register the newly installed PEM agent with the PEM server.

    • Select Next.

  4. Enter the connection details for the PEM server in the PEM Server Installation Details dialog box.

    • Specify the name or IP address of the system where the PEM database server resides in the Host field. 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.
  5. Select Next to continue to pemAgent Service Account. The installer attempts to connect to the server to verify that the details are correct.


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

  6. Provide the password for the edb account for the pemAgent service to run under. The agent certificate and key files are created in the C:\Users\edb\AppData\Roaming\pem directory. Select Next.

  7. The tree 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. Select Next.

  8. If you selected Show advanced options, the Advanced Options dialog box opens. 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 select Next.

  9. The wizard is ready to install the PEM agent. Select Next.

  10. On the Ready to Install dialog box, select Next. The installer copies files to the system and registers the agent on the PEM server.

    When the installation completes, the PEM agent is running and reporting operating system and host data to the PEM server. To start monitoring Postgres instances on the host of the PEM agent, add them to PEM’s enterprise directory and bound them to the agent.

Invoking the agent installer from the command ine

The command line options of the PEM Agent installers offer functionality in situations where a graphical installation might 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 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. The system where you're 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 need administrator privileges to install the PEM Agent. Use the following command to invoke the PEM agent installer in unattended mode:

pem-agent-9.<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>


  • 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.

When configuring a shell/batch script run by a Windows agent, set the AllowBatchJobSteps parameter to True in the agent.cfg file. The PEM agent doesn't execute any batch/shell script by default.