NSX Advanced Load Balancer 控制器 集群会持续从集群节点收集 CPU、磁盘和内存利用率衡量指标。超过使用阈值时,将引发系统警示以通知管理员。

默认情况下,CPU、磁盘和内存的此阈值已预配置为 85%。在某些部署中,此预定义阈值可能不够保守,需要设置更低的阈值。下面将提供一个修改这些阈值以满足部署要求的示例。

阈值配置选项

可为以下各项单独定义自定义阈值:

  • CONTROLLER_CPU_THRESHOLD

  • CONTROLLER_MEM_THRESHOLD

  • CONTROLLER_DISK_THRESHOLD

定义配置时,有两个阈值选项需要注意:

  • watermark_thresholds:引发事件的阈值。可以定义多个阈值。当目标高于此阈值时,运行状况评分会降级。

  • reset_thresholds:该值用于重置事件状态机。

配置控制器阈值

以下配置提供了一个覆盖默认值的示例。此示例将为 CPU、磁盘和内存配置 watermark_threshold 75 和 reset_threshold 60。使用此配置时,如果这三个资源中的任一资源利用率超过 75%,则会针对该资源引发警示。利用率降至 60% 以下时,将重置警示。

[admin:controller]: > configure systemconfiguration 
[admin:controller]: systemconfiguration> controller_analytics_policy
[admin:controller]: systemconfiguration:controller_analytics_policy> metrics_event_thresholds
[admin:controller]: systemconfiguration:controller_analytics_policy> metrics_event_thresholds metrics_event_threshold_type controller_cpu_threshold 
New object being created
[admin:controller]: systemconfiguration:controller_analytics_policy:metrics_event_thresholds> reset_threshold 60 watermark_thresholds 75
[admin:controller]: systemconfiguration:controller_analytics_policy:metrics_event_thresholds> save

[admin:controller]: systemconfiguration:controller_analytics_policy> metrics_event_thresholds metrics_event_threshold_type controller_mem_threshold 
New object being created
[admin:controller]: systemconfiguration:controller_analytics_policy:metrics_event_thresholds> reset_threshold 60 watermark_thresholds 75
[admin:controller]: systemconfiguration:controller_analytics_policy:metrics_event_thresholds> save


[admin:controller]: systemconfiguration:controller_analytics_policy> metrics_event_thresholds metrics_event_threshold_type controller_disk_threshold 
New object being created
[admin:controller]: systemconfiguration:controller_analytics_policy:metrics_event_thresholds> reset_threshold 60 watermark_thresholds 75
[admin:controller]: systemconfiguration:controller_analytics_policy:metrics_event_thresholds> save
[admin:controller]: systemconfiguration:controller_analytics_policy> save
[admin:controller]: systemconfiguration> save

+----------------------------------+------------------------------------+
| Field                            | Value                              |
+----------------------------------+------------------------------------+


| controller_analytics_policy      |                                    |
|   metrics_event_thresholds[1]    |                                    |
|     reset_threshold              | 60.0                               |
|     watermark_thresholds[1]      | 75                                 |
|     metrics_event_threshold_type | CONTROLLER_CPU_THRESHOLD           |
|   metrics_event_thresholds[2]    |                                    |
|     reset_threshold              | 60.0                               |
|     watermark_thresholds[1]      | 75                                 |
|     metrics_event_threshold_type | CONTROLLER_MEM_THRESHOLD           |
|   metrics_event_thresholds[3]    |                                    |
|     reset_threshold              | 60.0                               |
|     watermark_thresholds[1]      | 75                                 |
|     metrics_event_threshold_type | CONTROLLER_DISK_THRESHOLD          |
+----------------------------------+------------------------------------+