logstash-input-jmx 3.0.1 → 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: cf1d9ed39a9edd9a28f5cd7a6bcd3bfc46cb4fc4
4
- data.tar.gz: 4fbc5c8b0d77b3375ff3745ffe4e310cf01670d8
3
+ metadata.gz: 437380d57bea6a1695c2ed5b7d0ed982860a47f2
4
+ data.tar.gz: c5dc3603c6062da55daa7059d97b413e5c84f29a
5
5
  SHA512:
6
- metadata.gz: 49498f27ae5814f817bff216e790b3b22190e4700ebe185b569303a2710508e0c783b89e4d60c3287f3b5aad2014008c72eacbefd60fc862febfeaf50c4a08a5
7
- data.tar.gz: bba4e01ea2a13d2b8a7988e6a5eae3742a8ad374c324438f267beb6ac0d843ade7fa3192c82fedc9858e3339cba2c25790ad8c0144dc0dd76da446c8b94485b1
6
+ metadata.gz: 950c100835e20f0d7df3b8ad5b115ef23364efc4bff1d267d3cc9e599f39fd16a717eb1e8ce1f305c7f591ab5ecbb269ffe9d9592a2a79bb1a3c6ec5cad7237b
7
+ data.tar.gz: 165e18b60459732a0fae197479bc72921bd8dc4e628c0beb2dd3c026d86674a82c0c8852b7dd56e46e93dabed59c3978ef388ceaa23787062a69f5cd67060848
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,157 @@
1
+ :plugin: jmx
2
+ :type: input
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
+ === Jmx input plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ This input plugin permits to retrieve metrics from remote Java applications using JMX.
24
+ Every `polling_frequency`, it scans a folder containing json configuration
25
+ files describing JVMs to monitor with metrics to retrieve.
26
+ Then a pool of threads will retrieve metrics and create events.
27
+
28
+ ## The configuration:
29
+
30
+ In Logstash configuration, you must set the polling frequency,
31
+ the number of thread used to poll metrics and a directory absolute path containing
32
+ json files with the configuration per jvm of metrics to retrieve.
33
+ Logstash input configuration example:
34
+ [source,ruby]
35
+ jmx {
36
+ //Required
37
+ path => "/apps/logstash_conf/jmxconf"
38
+ //Optional, default 60s
39
+ polling_frequency => 15
40
+ type => "jmx"
41
+ //Optional, default 4
42
+ nb_thread => 4
43
+ }
44
+
45
+ Json JMX configuration example:
46
+ [source,js]
47
+ {
48
+ //Required, JMX listening host/ip
49
+ "host" : "192.168.1.2",
50
+ //Required, JMX listening port
51
+ "port" : 1335,
52
+ //Optional, the username to connect to JMX
53
+ "username" : "user",
54
+ //Optional, the password to connect to JMX
55
+ "password": "pass",
56
+ //Optional, use this alias as a prefix in the metric name. If not set use <host>_<port>
57
+ "alias" : "test.homeserver.elasticsearch",
58
+ //Required, list of JMX metrics to retrieve
59
+ "queries" : [
60
+ {
61
+ //Required, the object name of Mbean to request
62
+ "object_name" : "java.lang:type=Memory",
63
+ //Optional, use this alias in the metrics value instead of the object_name
64
+ "object_alias" : "Memory"
65
+ }, {
66
+ "object_name" : "java.lang:type=Runtime",
67
+ //Optional, set of attributes to retrieve. If not set retrieve
68
+ //all metrics available on the configured object_name.
69
+ "attributes" : [ "Uptime", "StartTime" ],
70
+ "object_alias" : "Runtime"
71
+ }, {
72
+ //object_name can be configured with * to retrieve all matching Mbeans
73
+ "object_name" : "java.lang:type=GarbageCollector,name=*",
74
+ "attributes" : [ "CollectionCount", "CollectionTime" ],
75
+ //object_alias can be based on specific value from the object_name thanks to ${<varname>}.
76
+ //In this case ${type} will be replaced by GarbageCollector...
77
+ "object_alias" : "${type}.${name}"
78
+ }, {
79
+ "object_name" : "java.nio:type=BufferPool,name=*",
80
+ "object_alias" : "${type}.${name}"
81
+ } ]
82
+ }
83
+
84
+ Here are examples of generated events. When returned metrics value type is
85
+ number/boolean it is stored in `metric_value_number` event field
86
+ otherwise it is stored in `metric_value_string` event field.
87
+ [source,ruby]
88
+ {
89
+ "@version" => "1",
90
+ "@timestamp" => "2014-02-18T20:57:27.688Z",
91
+ "host" => "192.168.1.2",
92
+ "path" => "/apps/logstash_conf/jmxconf",
93
+ "type" => "jmx",
94
+ "metric_path" => "test.homeserver.elasticsearch.GarbageCollector.ParNew.CollectionCount",
95
+ "metric_value_number" => 2212
96
+ }
97
+
98
+ [source,ruby]
99
+ {
100
+ "@version" => "1",
101
+ "@timestamp" => "2014-02-18T20:58:06.376Z",
102
+ "host" => "localhost",
103
+ "path" => "/apps/logstash_conf/jmxconf",
104
+ "type" => "jmx",
105
+ "metric_path" => "test.homeserver.elasticsearch.BufferPool.mapped.ObjectName",
106
+ "metric_value_string" => "java.nio:type=BufferPool,name=mapped"
107
+ }
108
+
109
+
110
+ [id="plugins-{type}s-{plugin}-options"]
111
+ ==== Jmx Input Configuration Options
112
+
113
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
114
+
115
+ [cols="<,<,<",options="header",]
116
+ |=======================================================================
117
+ |Setting |Input type|Required
118
+ | <<plugins-{type}s-{plugin}-nb_thread>> |<<number,number>>|No
119
+ | <<plugins-{type}s-{plugin}-path>> |<<string,string>>|Yes
120
+ | <<plugins-{type}s-{plugin}-polling_frequency>> |<<number,number>>|No
121
+ |=======================================================================
122
+
123
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
124
+ input plugins.
125
+
126
+ &nbsp;
127
+
128
+ [id="plugins-{type}s-{plugin}-nb_thread"]
129
+ ===== `nb_thread`
130
+
131
+ * Value type is <<number,number>>
132
+ * Default value is `4`
133
+
134
+ Indicate number of thread launched to retrieve metrics
135
+
136
+ [id="plugins-{type}s-{plugin}-path"]
137
+ ===== `path`
138
+
139
+ * This is a required setting.
140
+ * Value type is <<string,string>>
141
+ * There is no default value for this setting.
142
+
143
+ Path where json conf files are stored
144
+
145
+ [id="plugins-{type}s-{plugin}-polling_frequency"]
146
+ ===== `polling_frequency`
147
+
148
+ * Value type is <<number,number>>
149
+ * Default value is `60`
150
+
151
+ Indicate interval between two jmx metrics retrieval
152
+ (in s)
153
+
154
+
155
+
156
+ [id="plugins-{type}s-{plugin}-common-options"]
157
+ include::{include_path}/{type}.asciidoc[]
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-jmx'
4
- s.version = '3.0.1'
4
+ s.version = '3.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Retrieve metrics from jmx."
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/logstash-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 = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
14
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
15
15
 
16
16
  # Tests
17
17
  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-input-jmx
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
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: 2017-01-10 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
@@ -84,6 +84,7 @@ files:
84
84
  - LICENSE
85
85
  - NOTICE.TXT
86
86
  - README.md
87
+ - docs/index.asciidoc
87
88
  - lib/logstash/inputs/jmx.rb
88
89
  - logstash-input-jmx.gemspec
89
90
  - spec/inputs/jmx_spec.rb