logstash-filter-webservicemap 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaa5ec5810087093e3846b66bee57e579f9f1ae2
4
- data.tar.gz: 657828395b6b6a2f920931729bd188cf8467cbb4
3
+ metadata.gz: 3c9eaaf8a52e8c83dea14a5b67f02bbdaa195422
4
+ data.tar.gz: 433bb4b6b1c63d2ab289de75da9f0723289fd3e3
5
5
  SHA512:
6
- metadata.gz: 6153949c84ea11ccb41babd9d35cf9cd218c9a1b4f30877c96ccdf74b751f7b2ad476cb789d2bdb8a81b872bd24a822043f8e1fa17098e01ff55e88df4084245
7
- data.tar.gz: 6601cb695955ecbe66822220c79d613a5d5f74ea67ac08ad2a09e9c61b041cc553e6400a90c2d527b26a293e77f534243bb4d9cf49a32a2ff49050f066dafe28
6
+ metadata.gz: 4289a676827193aa4cbf99a99738e8ea43c1adc72cfe6c50142d9965edbad6c3fe6d8d7deb80dcf8aa2802a996b072463f1f8ecda433bb4f202ef966eed466b8
7
+ data.tar.gz: ce25b367ae0e46440cf53f9ade30cfa93323aed8c94558856125f4075a8f9f8da870633ef45657ded0a8037b969986daeb7183afe4346149240bd6f42a3f2189
data/CHANGELOG.md CHANGED
@@ -5,4 +5,7 @@
5
5
  - Only updated gemspec description
6
6
 
7
7
  ## 1.0.3
8
- - map_url as mandatory to be required.
8
+ - map_url as mandatory to be required.
9
+
10
+ ## 1.1.0
11
+ - Now the plugin is resistent to lost of web service when are running.
@@ -130,11 +130,19 @@ class LogStash::Filters::WebServiceMap < LogStash::Filters::Base
130
130
  extension = get_extension(path)
131
131
  temp_extension = '_temp'+extension;
132
132
  file_name = Digest::SHA1.hexdigest path
133
- File.open(file_name+temp_extension, 'wb') do |saved_file|
134
- open(path, 'rb') do |read_file|
135
- saved_file.write(read_file.read)
133
+ begin
134
+ File.open(file_name+temp_extension, 'wb') do |saved_file|
135
+ open(path, 'rb') do |read_file|
136
+ saved_file.write(read_file.read)
137
+ end
136
138
  end
139
+ rescue Exception => _
140
+ if registering
141
+ raise "#{self.class.name}: Failed to initialize with #{file_name} and path #{path}"
142
+ end
143
+ @logger.warn("#{self.class.name}: Something happened with URL. Continuing with old map", :map_path => file_name, :path => path)
137
144
  end
145
+
138
146
  begin
139
147
  load_file(registering, extension, file_name+temp_extension)
140
148
  FileUtils.mv(file_name+temp_extension, file_name+extension)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-webservicemap'
4
- s.version = '1.0.3'
4
+ s.version = '1.1.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "A general search and replace tool which uses a configured web service to determine replacement values."
7
7
  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 logstash-filter-webservicemap. This gem is not a stand-alone program. See https://github.com/angel9484/logstash-filter-webservicemap"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-webservicemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic