Closed joeythelantern closed 4 years ago
The poller can’t extract the Message part from Sqs Message.
Is your Setup S3 -> SNS -> SQS ? If not please set
from_sns => false
If this does not resolve your issue, please post one of your sqs Messages.
Regards Christian
from_sns => false seems to do the trick. I thought I tried that configuration yesterday but maybe I had it wrong. I'll leave the ticket open for another day of testing, then I'll close it.
Thank you very much for your fast response!
Also, quick question. How do I get my s3 metadata through your plugin? I originally could access it through %{[@metadata][s3][metadata]}.
EDIT: I accessed the @metadata and only the basic data is shown, none of metadata I've added.
For example, in the s3 plugin, you add include_object_properties => true to get your custom metadata.
Is there a way to get it form your plugin?
I think We habe to catch these error and give a suggestion on that sns sqs thing.
About metadata: I´ll take a look in implementation of the s3 plugin. Maybe i could add this in the next release. At this time you only have [@metadata][s3][object_key] [@metadata][s3][bucket_name] [@metadata][s3][object_folder]
regards Christian
That would be fantastic!
Currently, you can add metadata to an s3 object, and with the normal s3 plugin, you can access it through [@metadata][s3][metadata].
begin
@factory.get_s3_client(record[:bucket]) do |s3|
response = s3.get_object(
bucket: record[:bucket],
key: record[:key],
response_target: record[:local_file]
)
end
Is there where you grab the metadata?
I feel we could add metadata: record[:metadata] and it should work
ok a first try of the S3 metadata expansion is here:
https://github.com/cherweg/logstash-input-s3-sns-sqs/commit/55f4f4531525b8f047612bc3c36e88481936602c
I´ll test next week. (for testing your selfe use: gem build logstash-input-s3-sns-sqs.gemspec )
regards christian
I'm going to test it tomorrow if I can
OK. Released 2.1.0: config :include_object_properties, :validate => :array, :default => [:last_modified, :content_type, :metadata]
There is an copy n paste bug in the documentation. I will fix this. Sorry.
Von: JTL (Saman) notifications@github.com
Gesendet: Tuesday, January 21, 2020 6:21:27 PM
An: cherweg/logstash-input-s3-sns-sqs logstash-input-s3-sns-sqs@noreply.github.com
Cc: Herweg, Christian Christian.Herweg@otto.de; State change state_change@noreply.github.com
Betreff: Re: [cherweg/logstash-input-s3-sns-sqs] [2019-11-25T22:02:12,143][WARN ][logstash.inputs.s3snssqs ] Error in poller loop {:error=>#
Does this feature work now? I have been unable to test. If so, is it in the docs?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/cherweg/logstash-input-s3-sns-sqs/issues/33?email_source=notifications&email_token=AJOIIALNRGMOL2IU2R5RUM3Q64VJPA5CNFSM4JRPL3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJQRJLQ#issuecomment-576787630, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJOIIALVTQS2QVB75WASSBLQ64VJPANCNFSM4JRPL3KQ.
Created an s3 bucket, which sends events to SQS whenever a file is placed there.
Here is my config:
Here is my stacktrace: