opensearch-project / logstash-input-opensearch

Apache License 2.0
9 stars 15 forks source link

Currently "index" is ignored and anything at the end of hosts is treated as the index #40

Open matrimcauthondf opened 1 year ago

matrimcauthondf commented 1 year ago

This includes when a port is specified. Here are two examples

[2023-01-10T08:07:54,295][ERROR][logstash.javapipeline ][main][f715db3d065431772c370004948900ccf650a7a3365fec5d2e8813e8c1e994fe] A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::OpenSearch password=><password>, hosts=>["HOST-NAME/pathfinder-dev:443"], query=>"{ \"query\": { \"match\": { \"statuscode\": 200 } }, \"sort\": [ \"_doc\" ] }", scroll=>"5m", index=>"pathfinder-dev", id=>"f715db3d065431772c370004948900ccf650a7a3365fec5d2e8813e8c1e994fe", user=>"USER-NAME", ecs_compatibility=>:disabled, enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_a58efca0-45a3-4cb6-92a6-e53cc2e0c88e", enable_metric=>true, charset=>"UTF-8">, size=>1000, docinfo=>false, docinfo_fields=>["_index", "_type", "_id"], connect_timeout_seconds=>10, request_timeout_seconds=>60, socket_timeout_seconds=>60, ssl=>false> Error: [404] {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [pathfinder-dev:443]","index":"pathfinder-dev:443","resource.id":"pathfinder-dev:443","resource.type":"index_or_alias","index_uuid":"_na_"}],"type":"index_not_found_exception","reason":"no such index [pathfinder-dev:443]","index":"pathfinder-dev:443","resource.id":"pathfinder-dev:443","resource.type":"index_or_alias","index_uuid":"_na_"},"status":404}


[2023-01-10T08:10:13,460][ERROR][logstash.javapipeline ][main][289dafd9c2c9b4665e086d5b4a5ce3fdf23cae7794022cef9238bd6e1ed7fe41] A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::OpenSearch password=><password>, hosts=>["HOST/:443"], query=>"{ \"query\": { \"match\": { \"statuscode\": 200 } }, \"sort\": [ \"_doc\" ] }", scroll=>"5m", index=>"pathfinder-dev", id=>"289dafd9c2c9b4665e086d5b4a5ce3fdf23cae7794022cef9238bd6e1ed7fe41", user=>"USER-NAME", ecs_compatibility=>:disabled, enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_d1e5e2d4-0e70-465b-b5b6-5e00d2a1fe46", enable_metric=>true, charset=>"UTF-8">, size=>1000, docinfo=>false, docinfo_fields=>["_index", "_type", "_id"], connect_timeout_seconds=>10, request_timeout_seconds=>60, socket_timeout_seconds=>60, ssl=>false> Error: [404] {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [:443]","index":":443","resource.id":":443","resource.type":"index_or_alias","index_uuid":"_na_"}],"type":"index_not_found_exception","reason":"no such index [:443]","index":":443","resource.id":":443","resource.type":"index_or_alias","index_uuid":"_na_"},"status":404}