logstash-output-librato 3.0.0 → 3.0.2

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: 788eb8edeb263e20cf9493ae65b83cd44ad9ea1e
4
- data.tar.gz: 8f0f26fca91eaa32d59e5d552f05af57eb00f3f2
3
+ metadata.gz: 3236c5a07fada333f897a6b67577551402ada99b
4
+ data.tar.gz: 0e8efd70439bcdc010c1e1192cc52879f79820d1
5
5
  SHA512:
6
- metadata.gz: 35250a8b4641eb83549dd514434dae09f2ed08f4fae6d9ec03a44536c35e292318a42a66b01ff77756da14c67e8456df67615f33b30c682679574935130c880b
7
- data.tar.gz: bc453abd46e37ee82ac925944907e280a9d4d5bdbd804221256221bd88c6fbe4bf41736d4dbe53c64baa28780ebb4fe14046f3e4f8803da6cfc8f6712c9896e1
6
+ metadata.gz: fc4887529affe6dadbb7b508fa11a90bf7794abf03695ae5cddd4619f5ad6fe35aca6502d3162cec42d2cbb0fce65f529fce98272fc6dca17babd2e2e0bea9e5
7
+ data.tar.gz: d209af1a79aab0194f21891498668ee91057397a28d3cbb63294e419a0f97191fc381e890b9dc8daed4fd24db4ad83709e78099afe2f3be3c14bc081d988ffda
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 3.0.1
2
+ - Docs: Update doc example to use new event API syntax
3
+ # 3.0.0
4
+ - Update plugin to the new event API
1
5
  # 2.0.4
2
6
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
7
  # 2.0.3
data/Gemfile CHANGED
@@ -1,2 +1,11 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+
3
+ gemspec
4
+
5
+ logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6
+ use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
7
+
8
+ if Dir.exist?(logstash_path) && use_logstash_source
9
+ gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
10
+ gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
+ end
@@ -0,0 +1,162 @@
1
+ :plugin: librato
2
+ :type: output
3
+
4
+ ///////////////////////////////////////////
5
+ START - GENERATED VARIABLES, DO NOT EDIT!
6
+ ///////////////////////////////////////////
7
+ :version: %VERSION%
8
+ :release_date: %RELEASE_DATE%
9
+ :changelog_url: %CHANGELOG_URL%
10
+ :include_path: ../../../../logstash/docs/include
11
+ ///////////////////////////////////////////
12
+ END - GENERATED VARIABLES, DO NOT EDIT!
13
+ ///////////////////////////////////////////
14
+
15
+ [id="plugins-{type}-{plugin}"]
16
+
17
+ === Librato output plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+
24
+
25
+ [id="plugins-{type}s-{plugin}-options"]
26
+ ==== Librato Output Configuration Options
27
+
28
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
29
+
30
+ [cols="<,<,<",options="header",]
31
+ |=======================================================================
32
+ |Setting |Input type|Required
33
+ | <<plugins-{type}s-{plugin}-account_id>> |<<string,string>>|Yes
34
+ | <<plugins-{type}s-{plugin}-annotation>> |<<hash,hash>>|No
35
+ | <<plugins-{type}s-{plugin}-api_token>> |<<string,string>>|Yes
36
+ | <<plugins-{type}s-{plugin}-batch_size>> |<<string,string>>|No
37
+ | <<plugins-{type}s-{plugin}-counter>> |<<hash,hash>>|No
38
+ | <<plugins-{type}s-{plugin}-gauge>> |<<hash,hash>>|No
39
+ |=======================================================================
40
+
41
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
42
+ output plugins.
43
+
44
+ &nbsp;
45
+
46
+ [id="plugins-{type}s-{plugin}-account_id"]
47
+ ===== `account_id`
48
+
49
+ * This is a required setting.
50
+ * Value type is <<string,string>>
51
+ * There is no default value for this setting.
52
+
53
+ This output lets you send metrics, annotations and alerts to
54
+ Librato based on Logstash events
55
+
56
+ This is VERY experimental and inefficient right now.
57
+ Your Librato account
58
+ usually an email address
59
+
60
+ [id="plugins-{type}s-{plugin}-annotation"]
61
+ ===== `annotation`
62
+
63
+ * Value type is <<hash,hash>>
64
+ * Default value is `{}`
65
+
66
+ Annotations
67
+ Registers an annotation with Librato
68
+ The only required field is `title` and `name`.
69
+ `start_time` and `end_time` will be set to `event.get("@timestamp").to_i`
70
+ You can add any other optional annotation values as well.
71
+ All values will be passed through `event.sprintf`
72
+
73
+ Example:
74
+ [source,ruby]
75
+ {
76
+ "title" => "Logstash event on %{host}"
77
+ "name" => "logstash_stream"
78
+ }
79
+ or
80
+ [source,ruby]
81
+ {
82
+ "title" => "Logstash event"
83
+ "description" => "%{message}"
84
+ "name" => "logstash_stream"
85
+ }
86
+
87
+ [id="plugins-{type}s-{plugin}-api_token"]
88
+ ===== `api_token`
89
+
90
+ * This is a required setting.
91
+ * Value type is <<string,string>>
92
+ * There is no default value for this setting.
93
+
94
+ Your Librato API Token
95
+
96
+ [id="plugins-{type}s-{plugin}-batch_size"]
97
+ ===== `batch_size`
98
+
99
+ * Value type is <<string,string>>
100
+ * Default value is `"10"`
101
+
102
+ Batch size
103
+ Number of events to batch up before sending to Librato.
104
+
105
+
106
+ [id="plugins-{type}s-{plugin}-counter"]
107
+ ===== `counter`
108
+
109
+ * Value type is <<hash,hash>>
110
+ * Default value is `{}`
111
+
112
+ Counters
113
+ Send data to Librato as a counter
114
+
115
+ Example:
116
+ [source,ruby]
117
+ {
118
+ "value" => "1"
119
+ "source" => "%{host}"
120
+ "name" => "messages_received"
121
+ }
122
+
123
+ Additionally, you can override the `measure_time` for the event. Must be a unix timestamp:
124
+ [source,ruby]
125
+ {
126
+ "value" => "1"
127
+ "source" => "%{host}"
128
+ "name" => "messages_received"
129
+ "measure_time" => "%{my_unixtime_field}"
130
+ }
131
+ Default is to use the event's timestamp
132
+
133
+ [id="plugins-{type}s-{plugin}-gauge"]
134
+ ===== `gauge`
135
+
136
+ * Value type is <<hash,hash>>
137
+ * Default value is `{}`
138
+
139
+ Gauges
140
+ Send data to Librato as a gauge
141
+
142
+ Example:
143
+ [source,ruby]
144
+ {
145
+ "value" => "%{bytes_received}"
146
+ "source" => "%{host}"
147
+ "name" => "apache_bytes"
148
+ }
149
+ Additionally, you can override the `measure_time` for the event. Must be a unix timestamp:
150
+ [source,ruby]
151
+ {
152
+ "value" => "%{bytes_received}"
153
+ "source" => "%{host}"
154
+ "name" => "apache_bytes"
155
+ "measure_time" => "%{my_unixtime_field}
156
+ }
157
+ Default is to use the event's timestamp
158
+
159
+
160
+
161
+ [id="plugins-{type}s-{plugin}-common-options"]
162
+ include::{include_path}/{type}.asciidoc[]
@@ -64,7 +64,7 @@ class LogStash::Outputs::Librato < LogStash::Outputs::Base
64
64
  # Annotations
65
65
  # Registers an annotation with Librato
66
66
  # The only required field is `title` and `name`.
67
- # `start_time` and `end_time` will be set to `event["@timestamp"].to_i`
67
+ # `start_time` and `end_time` will be set to `event.get("@timestamp").to_i`
68
68
  # You can add any other optional annotation values as well.
69
69
  # All values will be passed through `event.sprintf`
70
70
  #
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-librato'
3
- s.version = '3.0.0'
3
+ s.version = '3.0.2'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This output lets you send metrics, annotations and alerts to Librato based on Logstash events"
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"
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
13
- s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
13
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
14
14
 
15
15
  # Tests
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-librato
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -56,6 +56,7 @@ files:
56
56
  - LICENSE
57
57
  - NOTICE.TXT
58
58
  - README.md
59
+ - docs/index.asciidoc
59
60
  - lib/logstash/outputs/librato.rb
60
61
  - logstash-output-librato.gemspec
61
62
  - spec/outputs/librato_spec.rb