Default index for web & exec

This commit is contained in:
2020-08-21 18:15:54 -04:00
parent a020a8b32c
commit d116cf9d91
2 changed files with 9 additions and 1 deletions

View File

@@ -331,6 +331,10 @@ int web_args_validate(web_args_t *args, int argc, const char **argv) {
args->listen_address = DEFAULT_LISTEN_ADDRESS;
}
if (args->es_index == NULL) {
args->es_index = DEFAULT_ES_INDEX;
}
if (args->credentials != NULL) {
char *ptr = strstr(args->credentials, ":");
if (ptr == NULL) {
@@ -431,6 +435,10 @@ int exec_args_validate(exec_args_t *args, int argc, const char **argv) {
args->es_url = DEFAULT_ES_URL;
}
if (args->es_index == NULL) {
args->es_index = DEFAULT_ES_INDEX;
}
if (args->script_path == NULL) {
LOG_FATAL("cli.c", "--script-file argument is required");
}