From a8017ecaefe9152302111101405b5186a124cd4a Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Sun, 5 Sep 2021 17:07:05 +0300 Subject: MENT-1626: JSON file interface to wsrep node state. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integration with status reporter in wsrep-lib. Status reporter reports changes in wsrep state and logged errors/ warnings to a json file which then can be read and interpreted by an external monitoring tool. Rationale: until the server is fully initialized it is unaccessible by client and the only source of information is an error log which is not machine-friendly. Since wsrep node can spend a very long time in initialization phase (state transfer), it may be a very long time that automatic tools can't easily monitor its liveness and progression. New variable: wsrep_status_file specifies the output file name. If not set, no file is created and no reporting is done. Reviewed-by: Jan Lindström --- sql/sys_vars.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index e18ca6392d8..fe9559ec843 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -5961,6 +5961,11 @@ static Sys_var_charptr Sys_wsrep_notify_cmd( READ_ONLY GLOBAL_VAR(wsrep_notify_cmd), CMD_LINE(REQUIRED_ARG), DEFAULT("")); +static Sys_var_charptr_fscs Sys_wsrep_status_file( + "wsrep_status_file", "wsrep status output filename", + READ_ONLY GLOBAL_VAR(wsrep_status_file), CMD_LINE(REQUIRED_ARG), + DEFAULT("")); + static Sys_var_mybool Sys_wsrep_certify_nonPK( "wsrep_certify_nonPK", "Certify tables with no primary key", GLOBAL_VAR(wsrep_certify_nonPK), -- cgit v1.2.1