logstash-output-influxdb 0.1.4 → 2.0.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: b6f61107587eab684af48a9435abdf68f73bfca5
4
- data.tar.gz: 06bad73341f74d379316ec90654d6d5b78e7349c
3
+ metadata.gz: 2753f4d59436b745e795e17a2c2b3f209d0ec2c9
4
+ data.tar.gz: e7eafc51b48430cc109bc1c739bd6e596336d749
5
5
  SHA512:
6
- metadata.gz: 52530dbc46948873507fb1525826e3e805d641ef355c84ae8116e880479f908376c476e7bbbd60de31556f2fe0c8b6e7ddb17ac6bbab273eab663c98785812e5
7
- data.tar.gz: c6d1e37d7948f87179827a4d87ead5294ba6f964fa0291ba05c5a931acf825390e040b0c7a7d758fb05c3b239d7843152efbcae708f4d719117bb17bc12deb24
6
+ metadata.gz: 94506389a8efb37667a0315482cf6a0290e98ccab6556ead93bbe41c99b7e0b14d727cd331c38a747fa8c812a315ade740e878f99065685fdfaa893ee0162c8c
7
+ data.tar.gz: 0598f156973a55c72b879b764eca4331e4b8a24d90c285e4cda5d351e52a85a91c687a207b366bc64cc0e7db68e592ecae2290f47c5c0007e3c79449aecb2a02
data/CHANGELOG.md ADDED
File without changes
data/NOTICE.TXT ADDED
@@ -0,0 +1,5 @@
1
+ Elasticsearch
2
+ Copyright 2012-2015 Elasticsearch
3
+
4
+ This product includes software developed by The Apache Software
5
+ Foundation (http://www.apache.org/).
data/README.md CHANGED
@@ -1,19 +1,19 @@
1
1
  # Logstash Plugin
2
2
 
3
- This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
3
+ This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
4
 
5
5
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
6
6
 
7
7
  ## Documentation
8
8
 
9
- Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elasticsearch.org/guide/en/logstash/current/).
9
+ Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
10
10
 
11
11
  - For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
12
- - For more asciidoc formatting tips, see the excellent reference here https://github.com/elasticsearch/docs#asciidoc-guide
12
+ - For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
13
13
 
14
14
  ## Need Help?
15
15
 
16
- Need help? Try #logstash on freenode IRC or the logstash-users@googlegroups.com mailing list.
16
+ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
17
17
 
18
18
  ## Developing
19
19
 
@@ -83,4 +83,4 @@ Programming is not a required skill. Whatever you've seen about open source and
83
83
 
84
84
  It is more important to the community that you are able to contribute.
85
85
 
86
- For more information about contributing, see the [CONTRIBUTING](https://github.com/elasticsearch/logstash/blob/master/CONTRIBUTING.md) file.
86
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -223,7 +223,7 @@ class LogStash::Outputs::InfluxDB < LogStash::Outputs::Base
223
223
  end
224
224
  end # def post
225
225
 
226
- def teardown
226
+ def close
227
227
  buffer_flush(:final => true)
228
228
  end # def teardown
229
229
  end # class LogStash::Outputs::InfluxDB
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-influxdb'
4
- s.version = '0.1.4'
4
+ s.version = '2.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This output lets you output Metrics to InfluxDB"
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 gemname. This gem is not a stand-alone program"
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = ["lib"]
12
12
 
13
13
  # Files
14
- s.files = `git ls-files`.split($\)+::Dir.glob('vendor/*')
14
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
15
15
 
16
16
  # Tests
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
23
+ s.add_runtime_dependency "logstash-core", "~> 2.0.0.snapshot"
24
24
 
25
25
  s.add_runtime_dependency 'stud'
26
26
  s.add_runtime_dependency 'ftw', ['~> 0.0.40']
@@ -7,36 +7,38 @@ describe LogStash::Outputs::InfluxDB do
7
7
 
8
8
  context "complete pipeline run with 2 events" do
9
9
 
10
- let(:config) do <<-CONFIG
11
- input {
12
- generator {
13
- message => "foo=1 bar=2 time=3"
14
- count => 2
15
- type => "generator"
16
- }
10
+ let(:config) do
11
+ {
12
+ "host" => "localhost",
13
+ "user" => "someuser",
14
+ "password" => "somepwd",
15
+ "allow_time_override" => true,
16
+ "data_points" => {
17
+ "foo" => "%{foo}",
18
+ "bar" => "%{bar}",
19
+ "time" => "%{time}"
17
20
  }
21
+ }
22
+ end
18
23
 
19
- filter {
20
- kv { }
21
- }
24
+ subject { LogStash::Outputs::InfluxDB.new(config) }
22
25
 
23
- output {
24
- influxdb {
25
- host => "localhost"
26
- user => "someuser"
27
- password => "somepwd"
28
- allow_time_override => true
29
- data_points => {"foo" => "%{foo}" "bar" => "%{bar}" "time" => "%{time}"}
30
- }
31
- }
32
- CONFIG
26
+ before do
27
+ subject.register
28
+ allow(subject).to receive(:post).with(json_result)
29
+
30
+ 2.times do
31
+ subject.receive(LogStash::Event.new("foo" => "1", "bar" => "2", "time" => "3", "type" => "generator"))
32
+ end
33
+
34
+ # Close / flush the buffer
35
+ subject.close
33
36
  end
34
37
 
35
38
  let(:json_result) { "[{\"name\":\"logstash\",\"columns\":[\"foo\",\"bar\",\"time\"],\"points\":[[\"1\",\"2\",\"3\"],[\"1\",\"2\",\"3\"]]}]" }
36
39
 
37
40
  it "should receive 2 events, flush and call post with 2 items json array" do
38
- expect_any_instance_of(LogStash::Outputs::InfluxDB).to receive(:post).with(json_result)
39
- pipeline.run
41
+ expect(subject).to have_received(:post).with(json_result)
40
42
  end
41
43
 
42
44
  end
metadata CHANGED
@@ -1,120 +1,114 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-influxdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- requirement: !ruby/object:Gem::Requirement
14
+ name: logstash-core
15
+ version_requirements: !ruby/object:Gem::Requirement
15
16
  requirements:
16
- - - '>='
17
+ - - ~>
17
18
  - !ruby/object:Gem::Version
18
- version: 1.4.0
19
- - - <
19
+ version: 2.0.0.snapshot
20
+ requirement: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - ~>
20
23
  - !ruby/object:Gem::Version
21
- version: 2.0.0
22
- name: logstash-core
24
+ version: 2.0.0.snapshot
23
25
  prerelease: false
24
26
  type: :runtime
27
+ - !ruby/object:Gem::Dependency
28
+ name: stud
25
29
  version_requirements: !ruby/object:Gem::Requirement
26
30
  requirements:
27
31
  - - '>='
28
32
  - !ruby/object:Gem::Version
29
- version: 1.4.0
30
- - - <
31
- - !ruby/object:Gem::Version
32
- version: 2.0.0
33
- - !ruby/object:Gem::Dependency
33
+ version: '0'
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
36
  - - '>='
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
- name: stud
40
39
  prerelease: false
41
40
  type: :runtime
41
+ - !ruby/object:Gem::Dependency
42
+ name: ftw
42
43
  version_requirements: !ruby/object:Gem::Requirement
43
44
  requirements:
44
- - - '>='
45
+ - - ~>
45
46
  - !ruby/object:Gem::Version
46
- version: '0'
47
- - !ruby/object:Gem::Dependency
47
+ version: 0.0.40
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - ~>
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.0.40
53
- name: ftw
54
53
  prerelease: false
55
54
  type: :runtime
55
+ - !ruby/object:Gem::Dependency
56
+ name: logstash-devutils
56
57
  version_requirements: !ruby/object:Gem::Requirement
57
58
  requirements:
58
- - - ~>
59
+ - - '>='
59
60
  - !ruby/object:Gem::Version
60
- version: 0.0.40
61
- - !ruby/object:Gem::Dependency
61
+ version: '0'
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - '>='
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
- name: logstash-devutils
68
67
  prerelease: false
69
68
  type: :development
69
+ - !ruby/object:Gem::Dependency
70
+ name: logstash-input-generator
70
71
  version_requirements: !ruby/object:Gem::Requirement
71
72
  requirements:
72
73
  - - '>='
73
74
  - !ruby/object:Gem::Version
74
75
  version: '0'
75
- - !ruby/object:Gem::Dependency
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - '>='
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
- name: logstash-input-generator
82
81
  prerelease: false
83
82
  type: :development
83
+ - !ruby/object:Gem::Dependency
84
+ name: logstash-filter-kv
84
85
  version_requirements: !ruby/object:Gem::Requirement
85
86
  requirements:
86
87
  - - '>='
87
88
  - !ruby/object:Gem::Version
88
89
  version: '0'
89
- - !ruby/object:Gem::Dependency
90
90
  requirement: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - '>='
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
- name: logstash-filter-kv
96
95
  prerelease: false
97
96
  type: :development
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
97
  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
104
98
  email: info@elastic.co
105
99
  executables: []
106
100
  extensions: []
107
101
  extra_rdoc_files: []
108
102
  files:
109
- - .gitignore
103
+ - lib/logstash/outputs/influxdb.rb
104
+ - spec/outputs/influxdb_spec.rb
105
+ - logstash-output-influxdb.gemspec
106
+ - CHANGELOG.md
107
+ - README.md
110
108
  - CONTRIBUTORS
111
109
  - Gemfile
112
110
  - LICENSE
113
- - README.md
114
- - Rakefile
115
- - lib/logstash/outputs/influxdb.rb
116
- - logstash-output-influxdb.gemspec
117
- - spec/outputs/influxdb_spec.rb
111
+ - NOTICE.TXT
118
112
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
119
113
  licenses:
120
114
  - Apache License (2.0)
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- Gemfile.lock
3
- .bundle
4
- vendor
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- @files=[]
2
-
3
- task :default do
4
- system("rake -T")
5
- end
6
-
7
- require "logstash/devutils/rake"