Enabling the Data Collection Agents
This section describes how to create the Command Center database and enable the Command Center data collection agents. When the data collection agents are enabled, their processes are started and stopped along with the Greenplum Database server processes (using
Greenplum provides a
gpperfmon_install utility that performs the following tasks:
- Creates the Command Center database (gpperfmon).
- Creates the Command Center superuser role (
- Configures Greenplum Database server to accept connections from the Command Center superuser role (edits the
- Sets the Command Center server configuration parameters in the Greenplum Database server
Log in to the Greenplum master host as the
$ su - gpadmin
Source the path file from your master host’s Greenplum Database installation directory:
# source /usr/local/greenplum-db/greenplum_path.sh
gpperfmon_installutility with the
--enableoption. You must supply the connection port of the Greenplum Database master server process, and set the password for the
gpmonsuperuser that will be created. For example:
$ gpperfmon_install --enable --password changeme --port 5432
gperfmon_installutility adds the
gpmonuser to the
pg_hba.confauthorization configuration file with an entry that permits local connections to any database. Since the
gpmonrole is a Greenplum Database superuser, you may wish to restrict the role to just the gpperfmon database after you run
gpperfmon_install. Edit the
$MASTER_DATA_DIRECTORY/pg_hba.conffile and change this line:
host all gpmon 127.0.0.1/28 md5
to the following:
host gpperfmon gpmon 127.0.0.1/28 md5
When the utility completes, restart Greenplum Database server. The data collection agents will not start until the database is restarted.
$ gpstop -r
pscommand, verify that the data collection process is running on the Greenplum master. For example:
$ ps -ef | grep gpmmon
Run the following command to verify that the data collection processes are writing to the Command Center database. If all of the segment data collection agents are running, you should see one row per segment host.
$ psql gpperfmon -c 'SELECT * FROM system_now;'
The data collection agents are now running, and your Greenplum system now has a gpperfmon database installed. This is the database where Command Center data is stored. You can connect to it as follows:
$ psql gpperfmon
- Copy the
$MASTER_DATA_DIRECTORY/pg_hba.conffile from your primary master host to your standby master host. This ensures that the required connection options are also set on the standby master.
- Copy your
~/.pgpassfile from your primary master host to your standby master host. This file usually resides in the
gpadminuser’s home directory. Note that the permissions on
.pgpassmust be set to 600 (for example:
chmod 0600 ~/.pgpass).