Table of Contents Previous Next


4 Adding Monitored Instances to PEM : 4.2 Registering a Database Server

Before you can use the PEM web interface to manage or monitor a database server, you must register the server with the PEM server. When you register a server, you describe the connection to the server, provide authentication information for the connection, and specify any management preferences (optionally binding an agent).
A managed server is bound to a PEM agent. The PEM agent will monitor the server to which it is bound, and perform tasks or report statistics for display on the PEM dashboards. A managed server has access to extended PEM functionality such as Package Management or Custom Alerting; when registering a server, you can also allow a managed server to be restarted by PEM as required.
An unmanaged server is not bound to a PEM agent; you can create database objects on an unmanaged server, but extended PEM functionality (such as Package Management or Custom Alerting) is not supported on an unmanaged server.
You must ensure the pg_hba.conf file of the server that you are registering allows connections from the host of the PEM web interface. For information about modifying the pg_hba.conf file, please see Section 7.4.
If the server you are registering resides on the same host as the agent that will monitor the server, you can use the Auto Discovery dialog (see Figure 4.3) to simplify the registration and binding process.
To enable auto discovery for a specific agent, you must enable the Server Auto Discovery probe. To access the Manage Probes tab, highlight the name of a PEM agent in the PEM Browser tree control, and select Manage Probes... from the Management menu. When the Manage Probes tab opens, confirm that the slider control in the Enabled? column is set to Yes.
To open the Auto Discovery dialog, highlight the name of a PEM agent in the PEM Browser tree control, and select Auto Discovery... from the Management menu.
When the Auto Discovery dialog opens, the Discovered Database Servers box will display a list of servers that are not currently monitored by a PEM agent.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\26693f6f\auto_discovery_example.png
Check the box to the left of a server name to provide information about the server in the Server Connection Details box, and connection properties for the agent the Agent Connection Details box.
The fields in the Server Connection Details box provide information about the server that PEM will monitor:
Accept or modify the name of the monitored server in the Name field. The specified name will be displayed in the PEM Browser tree control.
Use the Server group drop-down listbox to select the server group under which the server will be displayed in the PEM Browser tree control.
Use the Host name/address field to specify the IP address of the monitored server.
The Port field displays the port that is monitored by the server; this field may not be modified.
Provide the name of the service in the Service ID field. Please note that the service name must be provided to enable some PEM functionality.
By default, the Maintenance database field indicates that the selected server uses a postgres maintenance database. Customize the content of the Maintenance database field for your installation.
The fields in the Agent Connection Details box specify the properties that the PEM agent will use when connecting to the server:
The Host field displays the IP address that will be used for the PEM agent binding.
The User name field displays the name that will be used by the PEM agent when connecting to the selected server.
The Password field displays the password associated with the specified user name.
Use the drop-down listbox in the SSL mode field to specify your SSL connection preferences.
When you've finished specifying the connection properties for the servers that you are binding for monitoring, click the OK button to register the servers. Click Cancel to exit without preserving any changes.
To manually register a database server, navigate through the Object menu to the Create menu and select Server. The Create - Server dialog opens as shown in Figure 4.4.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\99a4f3b9\Screen Shot 2017-11-07 at 10.18.24 AM.png
Use the fields on the General tab to describe the general properties of the server:
Use the Name field to specify a user-friendly name for the server. The name specified will identify the server in the PEM Browser tree control.
You can use server groups to organize your servers in the PEM Browser tree control. Using groups can help you manage large numbers of servers more easily. For example, you may want to have a production group, a test group, or LAN specific groups. Use the Server group drop-down listbox to select the server group in which the new server will be displayed.
Check the box next to Connect now? to instruct PEM to attempt a connection to the database server when you click the Save button on the Create - Server dialog. Leave the Connect now? checkbox unchecked if you do not want to establish a connection to the server immediately. If you do not select the Connect now? option, the connection parameters are not validated until you attempt a connection.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\d4d96f51\Screen Shot 2017-11-07 at 10.20.08 AM.png
Use fields on the Connection tab (see Figure 4.5) to specify connection details for the server:
Specify the IP address of the server host, or the fully qualified domain name in the Host name/address field. On Linux systems, the address field may be left blank to use the default PostgreSQL Unix Domain Socket on the local machine, or may be set to an alternate path containing a PostgreSQL socket. If you enter a path, the path must begin with a /.
Use the Maintenance database field to specify the name of the initial database that PEM will connect to, and that will be expected to contain the pgAgent schema and adminpack objects if installed (both are optional). On an Advanced Server database, the maintenance database is named edb. On PostgreSQL 8.1 and above, the maintenance database for PostgreSQL is named postgres, and on earlier versions it is named template1.
Check the box next to Save password? to instruct PEM to store passwords in the ~/.pgpass file (on Linux) or %APPDATA%\\postgresql\\pgpass.conf (on Windows) for later reuse. Stored passwords will be used for all libpq based tools. To remove a password, disconnect from the server, open the server's Properties dialog and uncheck the selection.
Use the Team field to specify a PostgreSQL role name. Only PEM users who are members of this role, who created the server initially, or have superuser privileges on the PEM server will see this server when they logon to PEM. If this field is left blank, all PEM users will see the server.
Use the Role field to specify the name of the role that is assigned the privileges used after connecting to the server. This allows you to connect as one role, and then assume the permissions of another role when the connection is established (the one you specified in this field). The connecting role must be a member of the role specified.
Use the drop-down listbox in the SSL field to select the type of SSL connection the server should use.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\c6d959b9\Screen Shot 2017-11-07 at 10.20.52 AM.png
Use fields on the Advanced tab (see Figure 4.6) to specify details that are used to manage the server:
Use the DB restriction field to specify a SQL restriction that will be used against the pg_database table to limit the databases displayed in the tree control. For example, you might enter 'live_db', 'test_db' to instruct the PEM browser to display only the live_db and test_db databases.
For more information about the pg_database table, visit:
Use the Service ID field to specify parameters to control the database service process. For servers that are stored in the Enterprise Manager directory, enter the service ID. On Windows machines, this is the identifier for the Windows service. On Linux machines, this is the name of the service script used to start the server (provided in /etc/init.d). For example, the Advanced Server 9.6 service name on Linux is edb-as-9.6.
If the server is a member of a Failover Manager cluster, you can use PEM to monitor the health of the cluster and to replace the master node if necessary. To enable PEM to monitor Failover Manager, use the EFM cluster name field to specify the cluster name. The cluster name is the prefix of the name of the Failover Manager cluster properties file. For example, if the cluster properties file is named efm.properties, the cluster name is efm.
If you are using PEM to monitor the status of a Failover Manager cluster, use the EFM installation path field to specify the location of the Failover Manager binary file. By default, the Failover Manager binary file is installed in /usr/efm-2.x/bin, where x specifies the Failover Manager version.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\8924c2f8\Screen Shot 2017-11-07 at 10.21.30 AM.png
Use fields on the PEM Agent tab (see Figure 4.7) to specify connection details for the PEM agent:
Specify Yes in the Remote monitoring? field to indicate that the PEM agent does not reside on the same host as the monitored server. When remote monitoring is enabled, agent level statistics for the monitored server will not be available for custom charts and dashboards, and the remote server will not be accessible by some PEM utilities (such as Audit Manager, Capacity Manager, Log Manager, Postgres Expert and Tuning Wizard).
Select an Enterprise Manager agent using the drop-down listbox to the right of the Bound agent label. One agent can monitor multiple Postgres servers, either locally or remotely.
Enter the IP address or socket path that the agent should use when connecting to the database server in the Host field. By default, the agent will use the host address shown on the General tab. On a Linux server, you may wish to specify a socket path, e.g. /tmp.
Enter the Port number that the agent will use when connecting to the server. By default, the agent will use the port defined on the Properties tab.
Use the drop-down listbox in the SSL field to specify an SSL operational mode; select from require, prefer, allow, disable, verify-ca or verify-full.
Use the Database field to specify the name of the Postgres Plus database to which the agent will initially connect.
Specify the password that the agent should use when connecting to the server in the Password field, and verify it by typing it again in the Confirm password field. If you do not specify a password, you must configure the authentication for the agent manually; you can use a .pgpass file for example.
Specify Yes in the Allow takeover? field to specify that another agent may be signaled (for example, by a fencing script) to monitor the server. This feature allows an agent to take responsibility for the monitoring of the database server if, for example, the server is part of a high availability failover process.
To review the properties of an existing server, right-click on a server name in the PEM Browser tree control, and select the Properties... option from the context menu. Before modifying server properties, you must disconnect from the server before opening the Properties dialog.
pemworker --register-server
pemworker.exe REGISTER-SERVICE
set the PEM_SERVER_PASSWORD environment variable.
pemworker --unregister-server
pemworker.exe UNREGISTER-SERVICE
set the PEM_SERVER_PASSWORD environment variable.

4 Adding Monitored Instances to PEM : 4.2 Registering a Database Server

Table of Contents Previous Next