PEM Agent Configuration Parameters

A number of user-configurable parameters and registry entries control the behavior of the PEM Agent. With the exception of the PEM_MAXCONN (or pem_maxconn) parameter, we strongly recommend against modifying any of the configuration parameters or registry entries listed below without first consulting EnterpriseDB support experts.

  • On 32 bit Windows systems, PEM registry entries are located in HKEY_LOCAL_MACHINE\Software\EnterpriseDB\PEM\agent
  • On 64 bit Windows systems, PEM registry entries are located in HKEY_LOCAL_MACHINE\Software\Wow6432Node\EnterpriseDB\PEM\agent
  • On Linux systems, PEM configuration options are stored in the agent.cfg file, located (by default) in /opt/PEM/agent/etc
Parameter Name Description Value (if applicable)
PEM_HOST (on Windows) or pem_host (on Linux) The IP address or hostname of the PEM server. By default, set to 127.0.0.1.
PEM_PORT (on Windows) or pem_port (on Linux) The database server port to which the agent connects to communicate with the PEM server. By default, the PEM server monitors port 5432.
AgentID (on Windows) or agent_id (on Linux) A unique identifier assigned to the PEM agent. The first agent is assigned an identifier of ‘1’, the second agent is assigned an identifier of ‘2’, and so on.
AgentUser (on Windows) or agent_user (on Linux) User to connect the PEM database server If present, and not set to empty string, it will be used to connect the PEM database server.
AgentCrtPath (on Windows) or agent_ssl_crt (on Linux) The complete path to the PEM agent’s certificate file.
By default, on Windows,
C:\Users\user_name\AppData\Roaming\pem/agent.crt
By default on Linux,
/root/.pem/agent.crt
AgentKeyPath (on Windows) or agent_ssl_key (on Linux) The complete path to the PEM agent’s key file.
By default, on Windows,
C:\Users\user_name\AppData\Roaming\pem/agent.key
By default on Linux,
/root/.pem/agent.key
AgentFlagDir (on Windows) or agent_flag_dir (on Linux) Used for HA support. Specifies the directory path checked for requests to take over monitoring another server. Requests are made in the form of a file in the specified flag directory. Not set by default. This option allows you to override the hard-coded default.
LogLevel (on Windows) or log_level (on Linux) Log level specifies the type of event that will be written to the PEM log files. Log level may be set to: error, debug1, debug2, or warning By default, log level is set to warning
log_location (on Linux only) Specifies the location of the PEM worker log file. On Linux, /var/log/pem/worker.log On Windows, Logs & errors will be reported in the Application event log.
agent_log_location (on Linux only) Specifies the location of the PEM agent log file. On Linux, /var/log/pem/agent.log On Windows, Logs & errors will be reported in the Application event log.
ShortWait (on Windows) or short_wait (on Linux) The minimum length of time (in seconds) that the PEM agent will wait before checking which probes are next in the queue (waiting to run). By default, 10 seconds.
LongWait (on Windows) or long_wait (on Linux) The maximum length of time (in seconds) that the PEM agent will wait before attempting to connect to the PEM server if an initial connection attempt fails. By default, 30 seconds.
AlertThreads (on Windows) or alert_threads (on Linux) The number of alert threads to be spawned by the agent. Set to 1 for the agent that resides on the host of the PEM server; should be set to 0 for all other agents.
EnableSMTP (on Windows) or enable_smtp (on Linux) When set to true, the SMTP email feature is enabled. By default, set to true for the agent that resides on the host of the PEM server; false for all other agents.
EnableSNMP (on Windows) or enable_snmp (on Linux) When set to true, the SNMP trap feature is enabled. By default, set to true for the agent that resides on the host of the PEM server; false for all other agents.
enable_nagios (on Linux only) When set to true, Nagios alerting is enabled. By default, set to true for the agent that resides on the host of the PEM server; false for all other agents.
ConnectTimeout (on Windows) or connect_timeout (on Linux) The maximum length of time (in seconds, written as a decimal integer string) that the agent will wait for a connection. Not set by default. If set to 0, the agent will wait indefinitely.
AllowServerRestart (on Windows) or allow_server_restart (on Linux) If set to TRUE, the agent can restart the database server that it monitors. Some PEM features may be enabled/disabled, depending on the value of this parameter. By default, set to TRUE.
AllowPackageManagement (on Windows) or allow_package_management (on Linux) If set to TRUE, the Update Monitor and Package Management features are enabled. By default, set to FALSE.
MaxConnections (on Windows) or max_connections (on Linux) The maximum number of probe connections used by the connection throttler. By default, set to 0 (an unlimited number of connections).
ConnectionLifetime (on Windows) or connection_lifetime (on Linux) Use ConnectionLifetime (or connection_lifetime) to specify the the minimum number of seconds an open but idle connection is retained. This parameter is ignored if the value specified in MaxConnections is reached and a new connection (to a different database) is required to satisfy a waiting request. By default, set to 0 (a connection is dropped when the connection is idle after the agent’s processing loop completes a cycle in which the connection has not been used).
HeartbeatConnection (on Windows) or heartbeat_connection (on Linux) When set to TRUE, a dedicated connection used for sending the heartbeats. By default, set to FALSE.
AllowStreamingReplication (on Windows) or allow_streaming_replication (on Linux) If set to TRUE, the user will be able to configure and setup streaming replication. By default, set to FALSE.
AllowBatchProbes (on Windows) or allow_batch_probes (on Linux) If set to TRUE, the user will be able to create batch probes using custom probes feature. By default, set to FALSE.
BatchScriptDir (on Windows) or batch_script_dir (on Linux) Provide the path where script file (for alerting) will be stored.

On Windows, C:Usersuser_nameAppDataLocalTemp

On Linux, set to /tmp.

ConnectionCustomSetup (on Windows) or connection_custom_setup (on Linux) Use this parameter to provide SQL code that will be invoked each time a new connection with the monitored server is established. By default, no value is provided.
ca_file (Linux only) Provide the path where the CA certificate resides. By default, /opt/PEM/agent/share/certs/ca-bundle.crt