Monitor json diagnostics printing cleanup
The 'events' and 'script' config values were defined for every monitor. Removed the extra definitions and moved the variables to MXS_MONITOR. MariaDBMonitor was printing config values a second time, they are already printed by the caller. Moved the events enum definition to the internal header since it's no longer required by modules. Added a default config setting "all" to 'events' to clarify that it enables all events.
This commit is contained in:
@ -308,20 +308,30 @@ const MXS_MODULE_PARAM config_monitor_params[] =
|
||||
{
|
||||
{CN_TYPE, MXS_MODULE_PARAM_STRING, NULL, MXS_MODULE_OPT_REQUIRED},
|
||||
{CN_MODULE, MXS_MODULE_PARAM_STRING, NULL, MXS_MODULE_OPT_REQUIRED},
|
||||
|
||||
{CN_USER, MXS_MODULE_PARAM_STRING, NULL, MXS_MODULE_OPT_REQUIRED},
|
||||
{CN_PASSWORD, MXS_MODULE_PARAM_STRING, NULL, MXS_MODULE_OPT_REQUIRED},
|
||||
|
||||
{CN_SERVERS, MXS_MODULE_PARAM_STRING},
|
||||
{CN_SCRIPT, MXS_MODULE_PARAM_STRING},
|
||||
{CN_EVENTS, MXS_MODULE_PARAM_ENUM, "all", 0, mxs_monitor_event_enum_values},
|
||||
{CN_MONITOR_INTERVAL, MXS_MODULE_PARAM_COUNT, "2000"},
|
||||
{CN_JOURNAL_MAX_AGE, MXS_MODULE_PARAM_COUNT, "28800"},
|
||||
{CN_SCRIPT_TIMEOUT, MXS_MODULE_PARAM_COUNT, "90"},
|
||||
{CN_BACKEND_CONNECT_TIMEOUT, MXS_MODULE_PARAM_COUNT, "3"},
|
||||
{CN_BACKEND_READ_TIMEOUT, MXS_MODULE_PARAM_COUNT, "1"},
|
||||
{CN_BACKEND_WRITE_TIMEOUT, MXS_MODULE_PARAM_COUNT, "2"},
|
||||
{CN_BACKEND_CONNECT_ATTEMPTS, MXS_MODULE_PARAM_COUNT, "1"},
|
||||
|
||||
{CN_JOURNAL_MAX_AGE, MXS_MODULE_PARAM_COUNT, "28800"},
|
||||
{CN_DISK_SPACE_THRESHOLD, MXS_MODULE_PARAM_STRING},
|
||||
{CN_DISK_SPACE_CHECK_INTERVAL, MXS_MODULE_PARAM_COUNT, "0"},
|
||||
|
||||
{CN_SCRIPT, MXS_MODULE_PARAM_STRING}, // Cannot be a path type as the script may have parameters
|
||||
{CN_SCRIPT_TIMEOUT, MXS_MODULE_PARAM_COUNT, "90"},
|
||||
{
|
||||
CN_EVENTS,
|
||||
MXS_MODULE_PARAM_ENUM,
|
||||
mxs_monitor_event_default_enum.name,
|
||||
MXS_MODULE_OPT_NONE,
|
||||
mxs_monitor_event_enum_values
|
||||
},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user