On the Admin> Alerts page, an administrator can set up alert rules to detect and respond to events occurring in the Greenplum Database system and in currently executing database queries. When a rule is matched, Command Center logs a record.
You can set up email alerts by configuring an SMTP server in Greenplum Database or in Command Center. Additionally, you can create a
send_alert.sh shell script to forward alerts to other destinations, such as an SMS gateway or a Slack channel. If the script is present, Command Center runs it whenever an alert is raised.
Command Center creates the
gpmetrics schema in the gpperfmon database to store both rules and log records. See gpmetrics Schema Reference for information about the
gpcc_alert_log tables in the
This topic contains the following subtopics:
Click EDIT to manage alert event rules. To enable an alert rule, enter any data required in the fields and check the box. Uncheck the box to disable the rule. Click SAVE when you have finished making changes to the alert configuration.
- Command Center is running on the master host, the master host is up, but the database is down or cannot be reached.
- Command Center is running on the standby master host, the standby master host is up, but the master host is down or cannot be reached, or the database is down or cannot be reached.
- Command Center checks three times before raising the alert. If the host where Command Center should be running is down, no alert is raised.
100 - sum(<available disk space>) / sum(<total disk space>) * 100A disk space alert is raised no more than once every 24 hours.
Command Center requires an SMTP server to send alert emails.
Command Center first attempts an encrypted TLS connection and then falls back to an unencrypted connection if TLS is not supported. The SMTP server must support one of the following authentication methods: NONE, PLAIN, LOGIN, or CRAM-MD5. Command Center will use the most secure of these methods the SMTP server allows.
Configuring email With Command Center
Click EDIT in the Manage email configuration panel.
The alert email configuration is set with the following Greenplum Database server configuration parameters:
Xon the address.
From:address in the alert email. Example:
email@example.com. If you leave this field blank, Command Center uses the default value,
When you click SAVE, Command Center sends a test email to the addresses in the Send emails to field. The email contains a list of the currently configured alert rules. If there is an error in the SMTP server or username/password configuration and the email cannot be sent, Command Center displays an error message.
Configuring email for Greenplum Database
The following server configuration parameters are used to configure SMTP email for Greenplum Database.
Command Center uses the
gp_email_smtp_password parameters if they are set. It ignores the remaining parameters.
You can check the current value of a configuration parameter by running the
gpconfig -s command on the master host, for example:
$ gpconfig -s gp_email_smtp_server
gpconfig -c option to set the values of server configuration parameters, for example:
$ gpconfig -c gp_email_smtp_server -v "smtp.example.com:465" $ gpconfig -c gp_email_smtp_userid -v "firstname.lastname@example.org" $ gpconfig -c gp_email_smtp_password -v "changeme" $ gpconfig -c gp_email_from -v "email@example.com" $ gpconfig -c gp_email_to -v "firstname.lastname@example.org;email@example.com"
gpstop -u to reload the configuration files after changing these configuration parameters.
The send alert script is a shell script that you can use to send Command Center alerts to destinations such as SMS gateways, pagers, team collaboration tools like Slack, chat servers, archive files, alternative email servers, and so on. You can use the send alert script in addition to sending email from Command Center, or as an alternative to sending alert emails from Command Center.
Command Center looks for the script
$MASTER_DATA_DIRECTORY/gpmetrics/send_alert.sh on the host where Command Center is running—either the master host or standby host. If the file exists and is executable by the gpadmin user, Command Center executes the script. The following variables are set on the command line when the script runs.
|LINK||URL of the Greenplum Command Center web server.|
|QUERYID||ID of the query, if the alert was triggered by a query.|
|SERVERNAME||Name of the Greenplum Command Center server.|
|QUERYTEXT||The text of the query, if the alert was triggered by a query.|
|ACTIVERULENAME||Current text the of rule, with user-specified values included.|
|LOGID||Value of this alert’s
|RULEDESCRIPTION||Text of the rule, including user-specified values, at the time the alert was raised.|
|ALERTDATE||Date the alert was raised.|
|ALERTTIME||Time the alert was raised.|
|SUBJECT||Subject line for email.|
An example script that you can customize is provided at
$GPCC_HOME/alert-email/send_alert.sh.sample. The example formats the alert as HTML email text and pipes it through the Linux
To set up a send alert script:
Customize the script with code to format and deliver the alert to your desired destination.
gpcc startto restart Command Center and enable the script.