v.24.12Improvement

Add StartupScriptsExecutionState Metric for Tracking Execution Status

Add a new StartupScriptsExecutionState metric. The metric can have three values: 0 = startup scripts have not finished yet, 1 = startup scripts executed successfully, 2 = startup scripts failed. We need this metric because we need to know if startup scripts are being executed successfully in the cloud, especially after releases to base configurations. #72637 (Miсhael Stetsyuk).
Adds the StartupScriptsExecutionState metric to ClickHouse, indicating the execution status of startup scripts with three possible values: 0 (not finished), 1 (success), and 2 (failure).

Why it matters

This metric helps users and cloud operators monitor whether startup scripts have completed successfully, which is especially important after releases affecting base configurations to ensure the system initializes correctly.

How to use it

Users can monitor startup script execution status by checking the StartupScriptsExecutionState metric value, where:
- 0 means scripts have not finished,
- 1 means successful execution,
- 2 means failure of startup scripts.