Skip to content

raoanees/opensearch-backfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

In case of OpenSearch cluster failures, firehose will dump the data into S3 buckets and data will go missing in the OpenSearch dashboards since it’s not ingested into OpenSearch.

There is a code snippet to transform and download the failed records from S3 to JSON files. It can be done using the following script: elastic_bulk.py Don’t forget to replace following placeholders with the appropriate values: HOST_NAME: OpenSearch domain url USER_NAME: Username of OpenSearch domain PASSWORD: Password of OpenSearch domain OUTPUT_FILE: Path for output JSON file BUCKET_NAME:Name of S3 bucket where failed records are stored KEY_PATH: Folder path in S3 bucket for which all files should be fetched and data needs to be sent to OpenSearch

Once the output file is ready with the JSON formatted data following command can be used to push the data to OpenSearch cluster: curl -XPOST -u 'master-user:master-user-password' 'domain-endpoint/_bulk' --data-binary @<OUTPUT_FILE_PATH>.json -H 'Content-Type: application/json'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages