From: Martin Schwenke Date: Thu, 12 Mar 2026 04:38:04 +0000 (+1100) Subject: ctdb-doc: Expand documentation of monitoring thresholds X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5df9b4dbc9b9820069dd2d83753d67b471530d23;p=thirdparty%2Fsamba.git ctdb-doc: Expand documentation of monitoring thresholds This allows the system resource monitoring documentation to be simplified. It also makes subsequent changes easier. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/doc/ctdb-script.options.5.xml b/ctdb/doc/ctdb-script.options.5.xml index ab141e5829b..f2a7d34e1fd 100644 --- a/ctdb/doc/ctdb-script.options.5.xml +++ b/ctdb/doc/ctdb-script.options.5.xml @@ -87,13 +87,72 @@ A threshold setting looks like WARNING_THRESHOLD:ERROR_THRESHOLD. - If the number of problems is ≥ WARNING_THRESHOLD then the - script will log a warning and continue. If the number - problems is ≥ ERROR_THRESHOLD then the script will log an - error and exit with failure, causing monitoring to fail. Note - that ERROR_THRESHOLD is optional, and follows the optional - colon (:) separator. + Note that ERROR_THRESHOLD is optional, and follows the + optional colon (:) separator. A threshold can indicate either + of the following: + + + + A measurement to be compared against. This can include + things like resource usage or the duration of an + operation. In this case, the associated event script + behaves as follows: + + + + + If ERROR_THRESHOLD is present, an error message is + logged and the event script fails when measurement + ≥ ERROR_THRESHOLD. + + + + + An initial warning message is logged when measurement + is initially ≥ WARNING_THRESHOLD. Additional warning + messages are logged each time measurement changes and + measurement remains ≥ WARNING_THRESHOLD. The event + script continues when a warning is logged. + + + + + If the previous event caused an error or warning to be + logged and measurement < WARNING_THRESHOLD then a + notice is logged indicating that measurement is now + less than WARNING_THRESHOLD. The event script + continues when a notice is logged. + + + + + + + A failure count ("failcount"). That is, the number of + times a particular check has consecutively failed. In + this case, the associated event script behaves as follows: + + + + + If ERROR_THRESHOLD is present, an error message is + logged and the event script fails when failcount ≥ + ERROR_THRESHOLD. + + + + + A warning message is logged when failcount is + initially ≥ WARNING_THRESHOLD. No additional warnings + are logged (until failcount ≥ ERROR_THRESHOLD). The + intention is to avoid flooding the log with warnings. + The event script continues when a warning is logged. + + + + + @@ -1275,38 +1334,38 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 FS-LIMIT-LIST is a space-separated list of - FILESYSTEM:WARN_LIMIT:UNHEALTHY_LIMIT - triples indicating that warnings should be logged if the - space used on FILESYSTEM reaches WARN_LIMIT%. If usage - reaches UNHEALTHY_LIMIT then the node should be flagged - unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be - left blank, meaning that check will be omitted. + FILESYSTEM:THRESHOLDS + entries. See Monitoring + Thresholds for details of how THRESHOLDS + will be interpreted - in this case, as a percentage + measurement of FILESYSTEM usage. - Default is to warn for each filesystem containing a - database directory + Default is to set a WARNING_THRESHOLD of 90 for each + filesystem containing a database directory (volatile database directory, persistent database directory, - state database directory) - with a threshold of 90%. + state database directory). + + + To disable filesystem usage checking, set + CTDB_MONITOR_FILESYSTEM_USAGE to a filesystem path with + no THRESHOLDS. - CTDB_MONITOR_MEMORY_USAGE=MEM-LIMITS + CTDB_MONITOR_MEMORY_USAGE=THRESHOLDS - MEM-LIMITS takes the form - WARN_LIMIT:UNHEALTHY_LIMIT - indicating that warnings should be logged if memory - usage reaches WARN_LIMIT%. If usage reaches - UNHEALTHY_LIMIT then the node should be flagged - unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be - left blank, meaning that check will be omitted. + See Monitoring Thresholds for + details of how THRESHOLDS will be interpreted - in this + case, as a percentage measurement of virtual memory + usage. Default is 80, so warnings will be logged when memory