Register/Unregister database server using PEM Agent v8

You can use the pemworker utility to register a database server for monitoring. The RPM installer places the utility in the /usr/edb/pem/agent/bin directory. Use the following commands to register a server:

  • On Linux: pemworker −−register-server [register-server-options]
  • On Windows: pemworker.exe REGISTER-SERVER [register-server-options]

Use the parameters in the table that follow to provide connection information for a Postgres database server that you wish to register for monitoring by the PEM Server. Please note that the pg_hba.conf file on the database server must be configured to allow connections from the PEM server.

Properties that begin with −−asb (agent server binding) define the binding for an agent that does not reside on the same host as the database server. These properties are optional if you have a PEM agent installed on the host of the database server. You will be prompted for required information if you do not include it on the command line.

ParametersCommand-line optionsOptionalDescriptionDefault Value
PEM Admin User−−pem-user <username>NoThe name of the PEM Admin User that will connect to the monitored server.
Server Host−−server-addr <host name/address>NoHost name/address of the monitored server.
Server Port−−server-port <port>NoPort on which database server is running.
Server Database−−server-database <name>NoThe database to which PEM will connect.
Server User−−server-user <name>NoThe database user role that will be used by the agent for monitoring purposes.
Server Service Name−−server-service-name <name>YesName of the system level service, which controls the operations like start, stop, restart, reload, etc. of the server.
Remote Monitoring?−−remote-monitoring <yes/no>Nono if the monitored server resides on the same machine as the bound PEM agent, yes if the agent is on another host.no
- EDB Failover Manager

Cluster Name
−−efm-cluster-name <name>YesName of EDB Failover Manager Cluster associated with this server.
EDB Failover manager Installation Path−−efm-install-path <path>YesInstallation path of EDB Failover Manager associated with this server.
Server Display Name−−display-name <server_name>YesDisplay name of the registred server.System hostname
Host Name−−asb-host-name <name_of_host>YesThe name of the host to which the agent is connecting.The value specified by the −−server-addr property.
Host Port−−asb-host-port <port_number>YesThe port number that the agent will use when connecting to the database.The value specified by the −−server-port property.
Host DB−−asb-host-db <database_name>YesThe name of the database to which the agent will connect.The value specified by the −−server-database property.
Host User Name−−asb-host-user <database_user>YesThe database user name that the agent will supply when authenticating with the database.The value specified by the −−server-user property.
SSL Mode−−asb-ssl-mode <certificate path>YesType of SSL authentication that will be used for connections. Supported values include prefer, require, disable, verify-CA, verify-full.prefer
Server Group−−group <group_name>YesSpecify the name of the server group in which the server will be displayed.
Server Team−−team <team_name>YesSpecify the name of the group role that will be allowed to access the server.
Owner−−owner <owner_name>YesSpecify the name of the role that will own the monitored server.

Use the PEM_MONITORED_SERVER_PASSWORD environment variable to set the password of the user of the database server which is to be registered. When registering the database server, the pemworker utility will bind the server to the PEM Agent associated with the pemworker utility. The PEM server will use the specified user name (Server User) and password specified in the PEM_MONITORED_SERVER_PASSWORD environment variable when monitoring the database server.

Use the PEM_SERVER_PASSWORD environment variable to provide the password of the user of the PEM database server. If the PEM_SERVER_PASSWORD is not set, the server will use the PGPASSWORD or pgpass file when connecting to the PEM Database Server.

To unregister a database server

You can use the pemworker utility to unregister a server:

  • On Linux: pemworker −−unregister-server [unregister-server-options]
  • On Windows: pemworker.exe UNREGISTER-SERVER [unregister-server-options]

Include the following information when unregistering a database server from the PEM Server; you will be prompted for required information if you do not include it on the command line:

ParametersCommand-line optionsOptionalDescriptionDefault Value
PEM Admin User−−pem-user <username>NoPEM Admin User to connect the PEM database server.
Server Host−−server-addr <host name/address>NoHost name/address of the database server.
Server Port−−server-port <port>NoPort on which database server is running.

The command will unregister the server from the PEM Server for the specified combination of Server Host and Server Port, which is being monitored by the PEM Agent.

For more information, refer the PEM Worker Usage Guide.