Updated on 2023-10-23 GMT+08:00

Alarm Detection

During the running of the cluster, error scenarios can be detected and informed to users in a timely manner. You can view the system_alarm log written by the alarm in the $GAUSSLOG/cm or the $GAUSSLOG/pg_log/gtm directory.

enable_alarm

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

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

Value range: Boolean

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

Default value: on

This parameter takes effect only on CNs and 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 parameter 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 parameter 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 parameter 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 the system_alarm log. 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