Updated on 2024-06-03 GMT+08:00

Alarm Detection

During the running of a database, error scenarios can be detected so that users are informed of the errors in time. You can view system_alarm logs in $GAUSSLOG/cm, $GAUSSLOG/gs_log, or $GAUSSLOG/roach/agent.

enable_alarm

Parameter description: Specifies whether to enable the alarm detector thread to detect fault scenarios that may occur in the database.

This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

  • on indicates that the alarm detector thread is enabled.
  • off indicates that the alarm detector thread is disabled.

Default value: on

This parameter takes effect only on DNs.

connection_alarm_rate

Parameter description: Specifies the ratio restriction on the maximum number of allowed parallel connections to the database. The maximum number of concurrent connections to the database is max_connections x connection_alarm_rate.

This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: a floating-point number ranging from 0.0 to 1.0

Default value: 0.9

alarm_report_interval

Parameter description: Specifies the interval at which an alarm is reported.

This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: an integer. The unit is s.

Default value: 10

alarm_component

Parameter description: Certain alarms are suppressed during alarm reporting. That is, the same alarm will not be repeatedly reported by an instance within the period specified by alarm_report_interval. Its default value is 10s. In this case, the parameter specifies the location of the alarm component that is used to process alarm information. Only the sysadmin user can access this parameter.

This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: a string.

  • If --alarm-type in the gs_preinstall script is set to 5, no third-party component is connected and alarms are written into system_alarm logs. In this case, the value of alarm_component is /opt/huawei/snas/bin/snas_cm_cmd.
  • If --alarm-type in the gs_preinstall script is set to 1, a third-party component is connected. In this case, the value of alarm_component is the absolute path of the executable program of the third-party component.

Default value: /opt/huawei/snas/bin/snas_cm_cmd

table_skewness_warning_threshold

Parameter description: Specifies the threshold for triggering a table skew alarm.

This is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: a floating-point number ranging from 0 to 1

Default value: 1

table_skewness_warning_rows

Parameter description: Specifies the minimum number of rows for triggering a table skew alarm.

This is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: an integer ranging from 0 to INT_MAX

Default value: 100000