Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with comparison of dates. S3 plugin #172

Open
ricardostocco opened this issue May 21, 2019 · 0 comments
Open

Problem with comparison of dates. S3 plugin #172

ricardostocco opened this issue May 21, 2019 · 0 comments

Comments

@ricardostocco
Copy link

When configuring the input s3 plugin I have a problem with comparing dates, since the last trace is re-processed, even though its update mark has not changed in the bucket.

I am NOT eliminating the files that are processed.

input {
s3 {
access_key_id => "xxxxx"
secret_access_key => "xxxx"
bucket => "xxxxx"
endpoint => "http://xxxxx.xxxxx.com"
region => "xxxxx"
proxy_uri => "http:/xxxx:xxxxx@xxxxxx:3128"
}
}

Logstash version: 7.0.1
SO: MS Windows 7
The bucket is not AWS S3, I'm using Open Cloud OBS (S3 compatible)

Example. In the file sincedb_xxx I have this date:
2019-05-20 23:45:10 +0000

and logstash reprocesses every 60 seconds a file that has an update date "2019-05-20 23:45:10 UTC"

It seems that the comparison "sincedb.newer? (Log.last_modified)" returns true when you compare those values ..

If I modify the comparison and compare integers, and it seems to work correctly ... (file s3.rb)

       def newer? (date)
         date.to_i> read.to_i
       end

Why is the comparison of dates wrong? Will the timezone be the problem? ("+0000" vs. "UTC")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant