From d7bae140a9335b99df210353d871b7759f94c57e Mon Sep 17 00:00:00 2001 From: simon987 Date: Tue, 25 Aug 2020 09:42:41 -0400 Subject: [PATCH] Update docs --- docs/USAGE.md | 8 ++++++++ src/cli.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/docs/USAGE.md b/docs/USAGE.md index f338d52..0371310 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -49,6 +49,7 @@ Scan options Index options -t, --threads= Number of threads. DEFAULT=1 --es-url= Elasticsearch url with port. DEFAULT=http://localhost:9200 + --es-index= Elasticsearch index name. DEFAULT=sist2 -p, --print Just print JSON documents to stdout. --script-file= Path to user script. --async-script Execute user script asynchronously. @@ -57,11 +58,14 @@ Index options Web options --es-url= Elasticsearch url. DEFAULT=http://localhost:9200 + --es-index= Elasticsearch index name. DEFAULT=sist2 --bind= Listen on this address. DEFAULT=localhost:4090 --auth= Basic auth in user:password format --tag-auth= Basic auth in user:password format for tagging Exec-script options + --es-url= Elasticsearch url. DEFAULT=http://localhost:9200 + --es-index= Elasticsearch index name. DEFAULT=sist2 --script-file= Path to user script. --async-script Execute user script asynchronously. Made by simon987 . Released under GPL-3.0 @@ -241,6 +245,8 @@ it is currently unsupported and has no guaranties of back/forward compatibility. * `--es-url` Elasticsearch url and port. If you are using docker, make sure that both containers are on the same network. + * `--es-index` + Elasticsearch index name. DEFAULT=sist2 * `-p, --print` Print index in JSON format to stdout. * `--script-file` @@ -278,6 +284,8 @@ sist2 index --print ./my_index/ | jq | less ### Web options * `--es-url=` Elasticsearch url. + * `--es-index` + Elasticsearch index name. DEFAULT=sist2 * `--bind=` Listen on this address. * `--auth=` Basic auth in user:password format * `--tag-auth=` Basic auth in user:password format. Works the same way as the diff --git a/src/cli.c b/src/cli.c index f5fdc7e..344c418 100644 --- a/src/cli.c +++ b/src/cli.c @@ -303,6 +303,7 @@ int index_args_validate(index_args_t *args, int argc, const char **argv) { } LOG_DEBUGF("cli.c", "arg es_url=%s", args->es_url) + LOG_DEBUGF("cli.c", "arg es_index=%s", args->es_index) LOG_DEBUGF("cli.c", "arg index_path=%s", args->index_path) LOG_DEBUGF("cli.c", "arg script_path=%s", args->script_path) LOG_DEBUGF("cli.c", "arg async_script=%s", args->async_script) @@ -392,6 +393,7 @@ int web_args_validate(web_args_t *args, int argc, const char **argv) { } LOG_DEBUGF("cli.c", "arg es_url=%s", args->es_url) + LOG_DEBUGF("cli.c", "arg es_index=%s", args->es_index) LOG_DEBUGF("cli.c", "arg listen=%s", args->listen_address) LOG_DEBUGF("cli.c", "arg credentials=%s", args->credentials) LOG_DEBUGF("cli.c", "arg tag_credentials=%s", args->tag_credentials)