logstash-output-honeycomb_json_batch 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf59c27f44d60efa7c924e9b3371133a718e938a
4
- data.tar.gz: '09aead3e7779e92feff278e6bfb91c4a5ec09be6'
3
+ metadata.gz: 2b2a7b660d8b854fb0607a4fa80dabe4329e4e41
4
+ data.tar.gz: c0bf451645c3755d6c7ac39cdb031f7ab08b6516
5
5
  SHA512:
6
- metadata.gz: c578d3531ba2d72197eab44b471939fc8dccb5ef1e9f99155915fbc937c937262061bab610d19f15a832903ab80623400741004b4c44068aa46e6ffb20fc3e6b
7
- data.tar.gz: cc4fba63f1ca522bc4d744b37bad638848a86fe2f1d7721bd652f1b33e18cad757979ed44d603aaac2d3bb2066593005e339057761e61d5805bb2b95657b87aa
6
+ metadata.gz: f5055fc55d3cbd3be58411d4565894df2eb5f9f68f6fb711c5590e6e4613cc57565ed1ba5e556eb7f3c0d3da2961cd6797ee8fb1a86084fd6900368ea7116425
7
+ data.tar.gz: 379e0423f7822931c219a15e3f0a379d30f9f869fa48a71c0d901754840dfe502f921229abb8db1a68e52c8c61bb8aea4929be2804d3cf288087002ee5b30e83
data/README.md CHANGED
@@ -1,30 +1,43 @@
1
- # Honeycomb Batch JSON Logstash Plugin
1
+ # logstash-output-honeycomb_json_batch
2
+
3
+ A logstash plugin for interacting with [Honeycomb](https://honeycomb.io) at high volumes. (See here for more information about [using Honeycomb](https://honeycomb.io/intro/) and [its libraries](https://honeycomb.io/docs/send-data/sdks).)
4
+
5
+ At lower volumes, it may be simpler to use the standard logstash `http` output plugin and provide Honeycomb-specific values. (See here for more information about [using the standard logstash http output plugin](https://honeycomb.io/docs/send-data/connectors/logstash).)
2
6
 
3
7
  This plugin is a heavily modified version of the standard logstash [http output](https://github.com/logstash-plugins/logstash-output-http) plugin and the [Lucidworks JSON batch plugin](https://github.com/lucidworks/logstash-output-json_batch).
4
8
 
5
- # Usage
9
+ ## Installation
6
10
 
7
- Please note that the name of the plugin when used is `json_batch`, since it only supports JSON in its current form.
11
+ The easiest way to use this plugin is by installing it through rubygems like any other logstash plugin. To get the latest version installed, you should run the following command:
8
12
 
9
- The default batch size is 50, ...
13
+ ```
14
+ bin/logstash-plugin install logstash-output-honeycomb_json_batch
15
+ ```
10
16
 
11
- output {
12
- honeycomb_json_batch {
13
- write_key => "YOUR_TEAM_KEY"
14
- dataset => "Logstash Batch Test"
15
- }
16
- }
17
+ ## Usage
17
18
 
18
- # Installation
19
+ The default batch size is 50, the default flush interval is 5 seconds, and each of those can be overridden via the plugin config.
19
20
 
20
- The easiest way to use this plugin is by installing it through rubygems like any other logstash plugin. To get the latest version installed, you should run the following command: `bin/logstash-plugin install logstash-output-honeycomb_json_batch`
21
+ A simple config to test this might be:
21
22
 
22
- TODO: publish to rubygems
23
+ ```
24
+ input {
25
+ stdin {
26
+ codec => json_lines
27
+ }
28
+ }
29
+ output {
30
+ honeycomb_json_batch {
31
+ write_key => "YOUR_TEAM_KEY"
32
+ dataset => "Logstash Batch Test"
33
+ }
34
+ }
35
+ ```
23
36
 
24
37
 
25
- # Running locally
38
+ ## Development
26
39
 
27
- Install dependencies
40
+ Install dependencies (this assumes you have JRuby with the Bundler gem installed.)
28
41
 
29
42
  ```
30
43
  bundle install
@@ -12,7 +12,7 @@ class LogStash::Outputs::HoneycombJSONBatch < LogStash::Outputs::Base
12
12
 
13
13
  config_name "honeycomb_json_batch"
14
14
 
15
- # URL host to use, defaults to api.honeycomb.io
15
+ # URL host to use, defaults to https://api.honeycomb.io
16
16
  config :api_host, :validate => :string
17
17
 
18
18
  config :write_key, :validate => :string, :required => true
@@ -37,7 +37,9 @@ class LogStash::Outputs::HoneycombJSONBatch < LogStash::Outputs::Base
37
37
  @total = 0
38
38
  @total_failed = 0
39
39
  @requests = Array.new
40
- if !@api_host.start_with? "http"
40
+ if @api_host.nil?
41
+ @api_host = "https://api.honeycomb.io"
42
+ elsif !@api_host.start_with? "http"
41
43
  @api_host = "http://#{ @api_host }"
42
44
  end
43
45
  @api_host = @api_host.chomp
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-honeycomb_json_batch'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.1'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "This output lets you `POST` batches of events to the Honeycomb.io API endpoint"
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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -23,6 +23,4 @@ Gem::Specification.new do |s|
23
23
  s.add_runtime_dependency "logstash-mixin-http_client", ">= 2.2.1", "< 5.0.0"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
- s.add_development_dependency 'sinatra'
27
- s.add_development_dependency 'webrick'
28
26
  end
metadata CHANGED
@@ -1,133 +1,107 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-honeycomb_json_batch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeycomb
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
- - - ">="
17
+ - - '>='
17
18
  - !ruby/object:Gem::Version
18
19
  version: '1.60'
19
- - - "<="
20
+ - - <=
20
21
  - !ruby/object:Gem::Version
21
22
  version: '2.99'
22
- name: logstash-core-plugin-api
23
- prerelease: false
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '1.60'
30
- - - "<="
30
+ - - <=
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.99'
33
33
  - !ruby/object:Gem::Dependency
34
+ name: logstash-mixin-http_client
34
35
  requirement: !ruby/object:Gem::Requirement
35
36
  requirements:
36
- - - ">="
37
+ - - '>='
37
38
  - !ruby/object:Gem::Version
38
39
  version: 2.2.1
39
- - - "<"
40
+ - - <
40
41
  - !ruby/object:Gem::Version
41
42
  version: 5.0.0
42
- name: logstash-mixin-http_client
43
- prerelease: false
44
43
  type: :runtime
44
+ prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ">="
47
+ - - '>='
48
48
  - !ruby/object:Gem::Version
49
49
  version: 2.2.1
50
- - - "<"
50
+ - - <
51
51
  - !ruby/object:Gem::Version
52
52
  version: 5.0.0
53
53
  - !ruby/object:Gem::Dependency
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: '0'
59
54
  name: logstash-devutils
60
- prerelease: false
61
- type: :development
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: '0'
67
- - !ruby/object:Gem::Dependency
68
55
  requirement: !ruby/object:Gem::Requirement
69
56
  requirements:
70
- - - ">="
57
+ - - '>='
71
58
  - !ruby/object:Gem::Version
72
59
  version: '0'
73
- name: sinatra
74
- prerelease: false
75
60
  type: :development
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- version: '0'
81
- - !ruby/object:Gem::Dependency
82
- requirement: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- name: webrick
88
61
  prerelease: false
89
- type: :development
90
62
  version_requirements: !ruby/object:Gem::Requirement
91
63
  requirements:
92
- - - ">="
64
+ - - '>='
93
65
  - !ruby/object:Gem::Version
94
66
  version: '0'
95
- description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
67
+ description: This gem is a Logstash plugin required to be installed on top of the
68
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
69
+ gem is not a stand-alone program
96
70
  email: support@honeycomb.io
97
71
  executables: []
98
72
  extensions: []
99
73
  extra_rdoc_files: []
100
74
  files:
101
- - Gemfile
102
- - LICENSE
103
- - README.md
104
75
  - lib/logstash/outputs/honeycomb_json_batch.rb
105
- - logstash-output-honeycomb_json_batch.gemspec
106
76
  - spec/outputs/honeycomb_json_batch_spec.rb
77
+ - logstash-output-honeycomb_json_batch.gemspec
78
+ - README.md
79
+ - Gemfile
80
+ - LICENSE
107
81
  homepage: https://honeycomb.io
108
82
  licenses:
109
83
  - Apache-2.0
110
84
  metadata:
111
85
  logstash_plugin: 'true'
112
86
  logstash_group: output
113
- post_install_message:
87
+ post_install_message:
114
88
  rdoc_options: []
115
89
  require_paths:
116
90
  - lib
117
91
  required_ruby_version: !ruby/object:Gem::Requirement
118
92
  requirements:
119
- - - ">="
93
+ - - '>='
120
94
  - !ruby/object:Gem::Version
121
95
  version: '0'
122
96
  required_rubygems_version: !ruby/object:Gem::Requirement
123
97
  requirements:
124
- - - ">="
98
+ - - '>='
125
99
  - !ruby/object:Gem::Version
126
100
  version: '0'
127
101
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.6.8
130
- signing_key:
102
+ rubyforge_project:
103
+ rubygems_version: 2.0.14.1
104
+ signing_key:
131
105
  specification_version: 4
132
106
  summary: This output lets you `POST` batches of events to the Honeycomb.io API endpoint
133
107
  test_files: