logstash-input-sqs_s3 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +3 -0
 - data/lib/logstash/inputs/sqs_s3.rb +14 -4
 - data/logstash-input-sqs_s3.gemspec +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 132970c713992e34ec1f7c19fd270a59d846fee32c8167cbe294310db76184b0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1f0e21961947dd2d41aac5ebe7c55335588acb826798a4733628b118ea27aae1
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: df2c3de1337b5c5641cec4349e8cf79013ecc21a8c5ac8c7988f78c961957de9f400233cc6b0c0dbd9d5011f09227f546a7d0bae9eef68025617288668db7b90
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ba14d676693599a607de86fd10e36566882585c32fedf4e18d594262f79c793557621247a7f6a98d946f0a2f43287bbf03dad3d54638a8166bd84486e06a5761
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| 
         @@ -89,6 +89,7 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable 
     | 
|
| 
       89 
89 
     | 
    
         
             
              MAX_MESSAGES_TO_FETCH = 10 # Between 1-10 in the AWS-SDK doc
         
     | 
| 
       90 
90 
     | 
    
         
             
              SENT_TIMESTAMP = "SentTimestamp"
         
     | 
| 
       91 
91 
     | 
    
         
             
              SQS_ATTRIBUTES = [SENT_TIMESTAMP]
         
     | 
| 
      
 92 
     | 
    
         
            +
              SKIP_DELETE = false
         
     | 
| 
       92 
93 
     | 
    
         | 
| 
       93 
94 
     | 
    
         
             
              config_name "sqs_s3"
         
     | 
| 
       94 
95 
     | 
    
         | 
| 
         @@ -97,8 +98,11 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable 
     | 
|
| 
       97 
98 
     | 
    
         
             
              # Name of the SQS Queue to pull messages from. Note that this is just the name of the queue, not the URL or ARN.
         
     | 
| 
       98 
99 
     | 
    
         
             
              config :queue, :validate => :string, :required => true
         
     | 
| 
       99 
100 
     | 
    
         | 
| 
       100 
     | 
    
         
            -
              # Name of the event field in which to store the SQS  
     | 
| 
       101 
     | 
    
         
            -
              config : 
     | 
| 
      
 101 
     | 
    
         
            +
              # Name of the event field in which to store the SQS Receipt Handle
         
     | 
| 
      
 102 
     | 
    
         
            +
              config :receipt_handle, :validate => :string
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
              # Name of the event field in which to store the SQS Message Id
         
     | 
| 
      
 105 
     | 
    
         
            +
              config :message_id, :validate => :string
         
     | 
| 
       102 
106 
     | 
    
         | 
| 
       103 
107 
     | 
    
         
             
              # Name of the event field in which to store the SQS message Sent Timestamp
         
     | 
| 
       104 
108 
     | 
    
         
             
              config :sent_timestamp_field, :validate => :string
         
     | 
| 
         @@ -106,12 +110,16 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable 
     | 
|
| 
       106 
110 
     | 
    
         
             
              # Max messages to fetch, default is 10
         
     | 
| 
       107 
111 
     | 
    
         
             
              config :max_messages_to_fetch, :validate => :number, :default => MAX_MESSAGES_TO_FETCH
         
     | 
| 
       108 
112 
     | 
    
         | 
| 
      
 113 
     | 
    
         
            +
              #If set to true, does NOT delete the message after polling
         
     | 
| 
      
 114 
     | 
    
         
            +
              config :skip_delete, :validate => :string, :default => SKIP_DELETE 
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
       109 
116 
     | 
    
         
             
              attr_reader :poller
         
     | 
| 
       110 
117 
     | 
    
         
             
              attr_reader :s3
         
     | 
| 
       111 
118 
     | 
    
         | 
| 
       112 
119 
     | 
    
         
             
              def register
         
     | 
| 
       113 
120 
     | 
    
         
             
                require "aws-sdk"
         
     | 
| 
       114 
121 
     | 
    
         
             
                @logger.info("Registering SQS input", :queue => @queue)
         
     | 
| 
      
 122 
     | 
    
         
            +
                @logger.info("Skip Delete", :skip_delete => @skip_delete)
         
     | 
| 
       115 
123 
     | 
    
         
             
                setup_queue
         
     | 
| 
       116 
124 
     | 
    
         
             
              end
         
     | 
| 
       117 
125 
     | 
    
         | 
| 
         @@ -132,7 +140,8 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable 
     | 
|
| 
       132 
140 
     | 
    
         
             
                  :attribute_names => SQS_ATTRIBUTES,
         
     | 
| 
       133 
141 
     | 
    
         
             
                  # we will use the queue's setting, a good value is 10 seconds
         
     | 
| 
       134 
142 
     | 
    
         
             
                  # (to ensure fast logstash shutdown on the one hand and few api calls on the other hand)
         
     | 
| 
       135 
     | 
    
         
            -
                  :wait_time_seconds => nil
         
     | 
| 
      
 143 
     | 
    
         
            +
                  :wait_time_seconds => nil,
         
     | 
| 
      
 144 
     | 
    
         
            +
                  :skip_delete => @skip_delete
         
     | 
| 
       136 
145 
     | 
    
         
             
                }
         
     | 
| 
       137 
146 
     | 
    
         
             
              end
         
     | 
| 
       138 
147 
     | 
    
         | 
| 
         @@ -179,7 +188,8 @@ class LogStash::Inputs::SQSS3 < LogStash::Inputs::Threadable 
     | 
|
| 
       179 
188 
     | 
    
         | 
| 
       180 
189 
     | 
    
         
             
                              event.set('[@metadata][s3_bucket_name]', record['s3']['bucket']['name'])
         
     | 
| 
       181 
190 
     | 
    
         
             
                              event.set('[@metadata][s3_object_key]', record['s3']['object']['key'])
         
     | 
| 
       182 
     | 
    
         
            -
            		  event.set(@ 
     | 
| 
      
 191 
     | 
    
         
            +
            		  event.set(@receipt_handle, message.receipt_handle) if @receipt_handle
         
     | 
| 
      
 192 
     | 
    
         
            +
            		  event.set(@message_id, message.message_id) if @message_id
         
     | 
| 
       183 
193 
     | 
    
         
             
            		  event.set(@sent_timestamp_field, convert_epoch_to_timestamp(message.attributes[SENT_TIMESTAMP])) if @sent_timestamp_field
         
     | 
| 
       184 
194 
     | 
    
         | 
| 
       185 
195 
     | 
    
         
             
                              queue << event
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       2 
2 
     | 
    
         
             
              s.name            = 'logstash-input-sqs_s3'
         
     | 
| 
       3 
     | 
    
         
            -
              s.version         = '1.1. 
     | 
| 
      
 3 
     | 
    
         
            +
              s.version         = '1.1.6'
         
     | 
| 
       4 
4 
     | 
    
         
             
              s.licenses        = ['Apache License (2.0)']
         
     | 
| 
       5 
5 
     | 
    
         
             
              s.summary         = "Get logs from AWS s3 buckets as issued by an object-created event via sqs."
         
     | 
| 
       6 
6 
     | 
    
         
             
              s.description     = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program. Full credit goes to Heiko Finzel. Republishing this gem to support Logstash 5."
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: logstash-input-sqs_s3
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Heiko Finzel
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017-11- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-11-07 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |