Support https and basic-auth for elasticsearch notification target (#10332)

This commit is contained in:
Praveen raj Mani
2020-08-23 22:13:48 +05:30
committed by GitHub
parent 81c90ae430
commit d0c910a6f3
7 changed files with 100 additions and 17 deletions

View File

@@ -337,6 +337,8 @@ index* (string) Elasticsearch index to store/update events, in
format* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
queue_dir (path) staging dir for undelivered messages e.g. '/home/events'
queue_limit (number) maximum limit for undelivered messages, defaults to '100000'
username (string) username for Elasticsearch basic-auth
password (string) password for Elasticsearch basic-auth
comment (sentence) optionally add a comment to this setting
```
@@ -353,6 +355,8 @@ MINIO_NOTIFY_ELASTICSEARCH_INDEX* (string) Elasticsearch index
MINIO_NOTIFY_ELASTICSEARCH_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
MINIO_NOTIFY_ELASTICSEARCH_USERNAME (string) username for Elasticsearch basic-auth
MINIO_NOTIFY_ELASTICSEARCH_PASSWORD (string) password for Elasticsearch basic-auth
MINIO_NOTIFY_ELASTICSEARCH_COMMENT (sentence) optionally add a comment to this setting
```
@@ -372,7 +376,7 @@ notify_elasticsearch:1 queue_limit="0" url="" format="namespace" index="" queue
Use `mc admin config set` command to update the configuration for the deployment. Restart the MinIO server to put the changes into effect. The server will print a line like `SQS ARNs: arn:minio:sqs::1:elasticsearch` at start-up if there were no errors.
```sh
$ mc admin config set myminio notify_elasticsearch:1 queue_limit="0" url="http://127.0.0.1:9200" format="namespace" index="minio_events" queue_dir=""
$ mc admin config set myminio notify_elasticsearch:1 queue_limit="0" url="http://127.0.0.1:9200" format="namespace" index="minio_events" queue_dir="" username="" password=""
```
Note that, you can add as many Elasticsearch server endpoint configurations as needed by providing an identifier (like "1" in the example above) for the Elasticsearch instance and an object of per-server configuration parameters.