logstash-input-azurewadeventhub 0.9.7-java → 0.9.8-java
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 +4 -4
- data/CHANGELOG.md +6 -6
- data/Gemfile +2 -6
- data/LICENSE +17 -17
- data/README.md +80 -80
- data/lib/logstash/inputs/azurewadeventhub.rb +185 -184
- data/logstash-input-azurewadeventhub.gemspec +33 -33
- metadata +40 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a3221fde520ac9242db2d0000ad074b678ddbd0
|
4
|
+
data.tar.gz: 76fec5b4ddb0803323838863964bc34daa47b3f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df6d7d9d973b0373c6c69908464d3a36896cab1369398bed249f9ef389e5f2c8a300e241516fd612015b52a118e81d3bbdb9dd1f1e60930344dc326862395ae3
|
7
|
+
data.tar.gz: 354716b86a44823c6ed0ea17b81bb05d589c51305450b43fd31a15037f1f5ee64d55cc966cf9233042ba5e71d7304b233b7fd6ecec06db1e865188fb420555e5
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
## 2016.04.28
|
2
|
-
* Fixed the jar dependency problem. Now installing the plugin by using the "plugin" or "logstash-plugin" (for newer versions of Logstash) should automatically download and jar files needed.
|
3
|
-
* Added missing json runtime dependency.
|
4
|
-
* Fixed the default value of *time_since_epoch_millis* to use UTC time to match the SelectorFilter.
|
5
|
-
* Made the plugin to respect Logstash shutdown signal.
|
6
|
-
* Updated the *logstash-core* runtime dependency requirement to '~> 2.0'.
|
1
|
+
## 2016.04.28
|
2
|
+
* Fixed the jar dependency problem. Now installing the plugin by using the "plugin" or "logstash-plugin" (for newer versions of Logstash) should automatically download and jar files needed.
|
3
|
+
* Added missing json runtime dependency.
|
4
|
+
* Fixed the default value of *time_since_epoch_millis* to use UTC time to match the SelectorFilter.
|
5
|
+
* Made the plugin to respect Logstash shutdown signal.
|
6
|
+
* Updated the *logstash-core* runtime dependency requirement to '~> 2.0'.
|
7
7
|
* Updated the *logstash-devutils* development dependency requirement to '>= 0.0.16'
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
|
2
|
-
Copyright (c) Microsoft. All rights reserved.
|
3
|
-
Microsoft would like to thank its contributors, a list
|
4
|
-
of whom are at http://aka.ms/entlib-contributors
|
5
|
-
|
6
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you
|
7
|
-
may not use this file except in compliance with the License. You may
|
8
|
-
obtain a copy of the License at
|
9
|
-
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
|
12
|
-
Unless required by applicable law or agreed to in writing, software
|
13
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
-
implied. See the License for the specific language governing permissions
|
16
|
-
and limitations under the License.
|
17
|
-
|
1
|
+
|
2
|
+
Copyright (c) Microsoft. All rights reserved.
|
3
|
+
Microsoft would like to thank its contributors, a list
|
4
|
+
of whom are at http://aka.ms/entlib-contributors
|
5
|
+
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you
|
7
|
+
may not use this file except in compliance with the License. You may
|
8
|
+
obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
+
implied. See the License for the specific language governing permissions
|
16
|
+
and limitations under the License.
|
17
|
+
|
data/README.md
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
# Logstash input plugin for Azure diagnostics data from Event Hubs
|
2
|
-
|
3
|
-
## Summary
|
4
|
-
This plugin reads Azure diagnostics data from specified Azure Event Hubs and parses the data for output.
|
5
|
-
|
6
|
-
## Installation
|
7
|
-
You can install this plugin using the Logstash "plugin" or "logstash-plugin" (for newer versions of Logstash) command:
|
8
|
-
```sh
|
9
|
-
logstash-plugin install logstash-input-azurewadeventhub
|
10
|
-
```
|
11
|
-
For more information, see Logstash reference [Working with plugins](https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html).
|
12
|
-
|
13
|
-
## Configuration
|
14
|
-
### Required Parameters
|
15
|
-
*key*
|
16
|
-
|
17
|
-
The shared access key to the target event hub.
|
18
|
-
|
19
|
-
*username*
|
20
|
-
|
21
|
-
The name of the shared access policy.
|
22
|
-
|
23
|
-
*namespace*
|
24
|
-
|
25
|
-
Event Hub namespace.
|
26
|
-
|
27
|
-
*eventhub*
|
28
|
-
|
29
|
-
Event Hub name.
|
30
|
-
|
31
|
-
*partitions*
|
32
|
-
|
33
|
-
Partition count of the target event hub.
|
34
|
-
|
35
|
-
### Optional Parameters
|
36
|
-
*domain*
|
37
|
-
|
38
|
-
Domain of the target Event Hub. Default value is "servicebus.windows.net".
|
39
|
-
|
40
|
-
*port*
|
41
|
-
|
42
|
-
Port of the target Event Hub. Default value is 5671.
|
43
|
-
|
44
|
-
*receive_credits*
|
45
|
-
|
46
|
-
The credit number to limit the number of messages to receive in a processing cycle. Default value is 1000.
|
47
|
-
|
48
|
-
*consumer_group*
|
49
|
-
|
50
|
-
Name of the consumer group. Default value is "$default".
|
51
|
-
|
52
|
-
*time_since_epoch_millis*
|
53
|
-
|
54
|
-
Specifies the point of time after which the messages are received. Default value is the time when this plugin is initialized:
|
55
|
-
```ruby
|
56
|
-
Time.now.utc.to_i * 1000
|
57
|
-
```
|
58
|
-
*thread_wait_sec*
|
59
|
-
|
60
|
-
Specifies the time (in seconds) to wait before another try if no message was received.
|
61
|
-
|
62
|
-
### Examples
|
63
|
-
```
|
64
|
-
input
|
65
|
-
{
|
66
|
-
azurewadeventhub
|
67
|
-
{
|
68
|
-
key => "VGhpcyBpcyBhIGZha2Uga2V5Lg=="
|
69
|
-
username => "receivepolicy"
|
70
|
-
namespace => "mysbns"
|
71
|
-
eventhub => "myeventhub"
|
72
|
-
partitions => 4
|
73
|
-
}
|
74
|
-
}
|
75
|
-
```
|
76
|
-
|
77
|
-
## More information
|
78
|
-
The source code of this plugin is hosted in GitHub repo [Microsoft Azure Diagnostics with ELK](https://github.com/Azure/azure-diagnostics-tools). We welcome you to provide feedback and/or contribute to the project.
|
79
|
-
|
80
|
-
Please also see [Analyze Diagnostics Data with ELK
|
1
|
+
# Logstash input plugin for Azure diagnostics data from Event Hubs
|
2
|
+
|
3
|
+
## Summary
|
4
|
+
This plugin reads Azure diagnostics data from specified Azure Event Hubs and parses the data for output.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
You can install this plugin using the Logstash "plugin" or "logstash-plugin" (for newer versions of Logstash) command:
|
8
|
+
```sh
|
9
|
+
logstash-plugin install logstash-input-azurewadeventhub
|
10
|
+
```
|
11
|
+
For more information, see Logstash reference [Working with plugins](https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html).
|
12
|
+
|
13
|
+
## Configuration
|
14
|
+
### Required Parameters
|
15
|
+
__*key*__
|
16
|
+
|
17
|
+
The shared access key to the target event hub.
|
18
|
+
|
19
|
+
__*username*__
|
20
|
+
|
21
|
+
The name of the shared access policy.
|
22
|
+
|
23
|
+
__*namespace*__
|
24
|
+
|
25
|
+
Event Hub namespace.
|
26
|
+
|
27
|
+
__*eventhub*__
|
28
|
+
|
29
|
+
Event Hub name.
|
30
|
+
|
31
|
+
__*partitions*__
|
32
|
+
|
33
|
+
Partition count of the target event hub.
|
34
|
+
|
35
|
+
### Optional Parameters
|
36
|
+
__*domain*__
|
37
|
+
|
38
|
+
Domain of the target Event Hub. Default value is "servicebus.windows.net".
|
39
|
+
|
40
|
+
__*port*__
|
41
|
+
|
42
|
+
Port of the target Event Hub. Default value is 5671.
|
43
|
+
|
44
|
+
__*receive_credits*__
|
45
|
+
|
46
|
+
The credit number to limit the number of messages to receive in a processing cycle. Default value is 1000.
|
47
|
+
|
48
|
+
__*consumer_group*__
|
49
|
+
|
50
|
+
Name of the consumer group. Default value is "$default".
|
51
|
+
|
52
|
+
__*time_since_epoch_millis*__
|
53
|
+
|
54
|
+
Specifies the point of time after which the messages are received. Default value is the time when this plugin is initialized:
|
55
|
+
```ruby
|
56
|
+
Time.now.utc.to_i * 1000
|
57
|
+
```
|
58
|
+
__*thread_wait_sec*__
|
59
|
+
|
60
|
+
Specifies the time (in seconds) to wait before another try if no message was received.
|
61
|
+
|
62
|
+
### Examples
|
63
|
+
```
|
64
|
+
input
|
65
|
+
{
|
66
|
+
azurewadeventhub
|
67
|
+
{
|
68
|
+
key => "VGhpcyBpcyBhIGZha2Uga2V5Lg=="
|
69
|
+
username => "receivepolicy"
|
70
|
+
namespace => "mysbns"
|
71
|
+
eventhub => "myeventhub"
|
72
|
+
partitions => 4
|
73
|
+
}
|
74
|
+
}
|
75
|
+
```
|
76
|
+
|
77
|
+
## More information
|
78
|
+
The source code of this plugin is hosted in GitHub repo [Microsoft Azure Diagnostics with ELK](https://github.com/Azure/azure-diagnostics-tools). We welcome you to provide feedback and/or contribute to the project.
|
79
|
+
|
80
|
+
Please also see [Analyze Diagnostics Data with Event Hub and ELK](https://github.com/Azure/azure-quickstart-templates/tree/master/diagnostics-eventhub-elk) for quick deployment of ELK to Azure.
|
@@ -1,184 +1,185 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require "logstash/inputs/base"
|
3
|
-
require "logstash/namespace"
|
4
|
-
|
5
|
-
require "securerandom"
|
6
|
-
require "open-uri"
|
7
|
-
require "thread"
|
8
|
-
require "json"
|
9
|
-
|
10
|
-
require Dir[ File.dirname(__FILE__) + "/../../*_jars.rb" ].first
|
11
|
-
|
12
|
-
# Reads events from Azure event-hub for Windows Azure Diagnostics
|
13
|
-
class LogStash::Inputs::Azurewadeventhub < LogStash::Inputs::Base
|
14
|
-
|
15
|
-
config_name "azurewadeventhub"
|
16
|
-
milestone 1
|
17
|
-
|
18
|
-
default :codec, "json"
|
19
|
-
|
20
|
-
config :key, :validate => :string
|
21
|
-
config :username, :validate => :string
|
22
|
-
config :namespace, :validate => :string
|
23
|
-
config :domain, :validate => :string, :default => "servicebus.windows.net"
|
24
|
-
config :port, :validate => :number, :default => 5671
|
25
|
-
config :receive_credits, :validate => :number, :default => 1000
|
26
|
-
|
27
|
-
config :eventhub, :validate => :string
|
28
|
-
config :partitions, :validate => :number
|
29
|
-
config :consumer_group, :validate => :string, :default => "$default"
|
30
|
-
|
31
|
-
config :time_since_epoch_millis, :validate => :number, :default => Time.now.utc.to_i * 1000
|
32
|
-
config :thread_wait_sec, :validate => :number, :default => 5
|
33
|
-
|
34
|
-
|
35
|
-
def initialize(*args)
|
36
|
-
super(*args)
|
37
|
-
end # def initialize
|
38
|
-
|
39
|
-
public
|
40
|
-
def register
|
41
|
-
end # def register
|
42
|
-
|
43
|
-
def get_pay_load(message, partition)
|
44
|
-
return nil if not message
|
45
|
-
message.getPayload().each do |section|
|
46
|
-
if section.java_kind_of? org::apache::qpid::amqp_1_0::type::messaging::Data
|
47
|
-
data = ""
|
48
|
-
begin
|
49
|
-
event = LogStash::Event.new()
|
50
|
-
section.getValue().getArray().each do |byte|
|
51
|
-
data = data + byte.chr
|
52
|
-
end
|
53
|
-
json = JSON.parse(data)
|
54
|
-
# Check if the records field is there. All messages written by WAD should have
|
55
|
-
# "records" as the root element
|
56
|
-
if !json["records"].nil?
|
57
|
-
recordArray = json["records"]
|
58
|
-
recordArray.each do |record|
|
59
|
-
record.each do |name, value|
|
60
|
-
event
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
return event
|
65
|
-
rescue => e
|
66
|
-
if data != ""
|
67
|
-
@logger.error(" " + partition.to_s.rjust(2,"0") + " --- " + "Error: Unable to JSON parse '" + data + "'.", :exception => e)
|
68
|
-
else
|
69
|
-
@logger.error(" " + partition.to_s.rjust(2,"0") + " --- " + "Error: Unable to get the message body for message", :exception => e)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
return nil
|
75
|
-
end
|
76
|
-
|
77
|
-
def process(output_queue, receiver, partition)
|
78
|
-
while !stop?
|
79
|
-
begin
|
80
|
-
msg = receiver.receive(10)
|
81
|
-
if msg
|
82
|
-
event = get_pay_load(msg, partition)
|
83
|
-
if event
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
connection.
|
109
|
-
|
110
|
-
|
111
|
-
receiver.
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
@
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
end #
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
end
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
end
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
end
|
1
|
+
# encoding: utf-8
|
2
|
+
require "logstash/inputs/base"
|
3
|
+
require "logstash/namespace"
|
4
|
+
|
5
|
+
require "securerandom"
|
6
|
+
require "open-uri"
|
7
|
+
require "thread"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
require Dir[ File.dirname(__FILE__) + "/../../*_jars.rb" ].first
|
11
|
+
|
12
|
+
# Reads events from Azure event-hub for Windows Azure Diagnostics
|
13
|
+
class LogStash::Inputs::Azurewadeventhub < LogStash::Inputs::Base
|
14
|
+
|
15
|
+
config_name "azurewadeventhub"
|
16
|
+
milestone 1
|
17
|
+
|
18
|
+
default :codec, "json"
|
19
|
+
|
20
|
+
config :key, :validate => :string
|
21
|
+
config :username, :validate => :string
|
22
|
+
config :namespace, :validate => :string
|
23
|
+
config :domain, :validate => :string, :default => "servicebus.windows.net"
|
24
|
+
config :port, :validate => :number, :default => 5671
|
25
|
+
config :receive_credits, :validate => :number, :default => 1000
|
26
|
+
|
27
|
+
config :eventhub, :validate => :string
|
28
|
+
config :partitions, :validate => :number
|
29
|
+
config :consumer_group, :validate => :string, :default => "$default"
|
30
|
+
|
31
|
+
config :time_since_epoch_millis, :validate => :number, :default => Time.now.utc.to_i * 1000
|
32
|
+
config :thread_wait_sec, :validate => :number, :default => 5
|
33
|
+
|
34
|
+
|
35
|
+
def initialize(*args)
|
36
|
+
super(*args)
|
37
|
+
end # def initialize
|
38
|
+
|
39
|
+
public
|
40
|
+
def register
|
41
|
+
end # def register
|
42
|
+
|
43
|
+
def get_pay_load(message, partition)
|
44
|
+
return nil if not message
|
45
|
+
message.getPayload().each do |section|
|
46
|
+
if section.java_kind_of? org::apache::qpid::amqp_1_0::type::messaging::Data
|
47
|
+
data = ""
|
48
|
+
begin
|
49
|
+
event = LogStash::Event.new()
|
50
|
+
section.getValue().getArray().each do |byte|
|
51
|
+
data = data + byte.chr
|
52
|
+
end
|
53
|
+
json = JSON.parse(data)
|
54
|
+
# Check if the records field is there. All messages written by WAD should have
|
55
|
+
# "records" as the root element
|
56
|
+
if !json["records"].nil?
|
57
|
+
recordArray = json["records"]
|
58
|
+
recordArray.each do |record|
|
59
|
+
record.each do |name, value|
|
60
|
+
event.set("name", value)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
return event
|
65
|
+
rescue => e
|
66
|
+
if data != ""
|
67
|
+
@logger.error(" " + partition.to_s.rjust(2,"0") + " --- " + "Error: Unable to JSON parse '" + data + "'.", :exception => e)
|
68
|
+
else
|
69
|
+
@logger.error(" " + partition.to_s.rjust(2,"0") + " --- " + "Error: Unable to get the message body for message", :exception => e)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
return nil
|
75
|
+
end
|
76
|
+
|
77
|
+
def process(output_queue, receiver, partition)
|
78
|
+
while !stop?
|
79
|
+
begin
|
80
|
+
msg = receiver.receive(10)
|
81
|
+
if msg
|
82
|
+
event = get_pay_load(msg, partition)
|
83
|
+
if event
|
84
|
+
decorate(event)
|
85
|
+
output_queue << event
|
86
|
+
end
|
87
|
+
receiver.acknowledge(msg)
|
88
|
+
else
|
89
|
+
@logger.debug(" " + partition.to_s.rjust(2,"0") + " --- " + "No message")
|
90
|
+
sleep(@thread_wait_sec)
|
91
|
+
end
|
92
|
+
rescue LogStash::ShutdownSignal => e
|
93
|
+
raise e
|
94
|
+
rescue org::apache::qpid::amqp_1_0::client::ConnectionErrorException => e
|
95
|
+
raise e
|
96
|
+
rescue => e
|
97
|
+
@logger.error(" " + partition.to_s.rjust(2,"0") + " --- " + "Oh My, An error occurred.", :exception => e)
|
98
|
+
end
|
99
|
+
end # process
|
100
|
+
end # process
|
101
|
+
|
102
|
+
def process_partition(output_queue, partition)
|
103
|
+
while !stop?
|
104
|
+
begin
|
105
|
+
filter = SelectorFilter.new "amqp.annotation.x-opt-enqueuedtimeutc > '" + @time_since_epoch_millis.to_s + "'"
|
106
|
+
filters = { org::apache::qpid::amqp_1_0::type::Symbol.valueOf("apache.org:selector-filter:string") => filter }
|
107
|
+
host = @namespace + "." + @domain
|
108
|
+
connection = org::apache::qpid::amqp_1_0::client::Connection.new(host, @port, @username, @key, host, true)
|
109
|
+
connection.getEndpoint().getDescribedTypeRegistry().register(filter.java_class, WriterFactory.new)
|
110
|
+
receiveSession = connection.createSession()
|
111
|
+
receiver = receiveSession.createReceiver(@eventhub + "/ConsumerGroups/" + @consumer_group + "/Partitions/" + partition.to_s, org::apache::qpid::amqp_1_0::client::AcknowledgeMode::ALO, "eventhubs-receiver-link-" + partition.to_s, false, filters, nil)
|
112
|
+
receiver.setCredit(org::apache::qpid::amqp_1_0::type::UnsignedInteger.valueOf(@receive_credits), true)
|
113
|
+
process(output_queue,receiver,partition)
|
114
|
+
rescue org::apache::qpid::amqp_1_0::client::ConnectionErrorException => e
|
115
|
+
@logger.debug(" " + partition.to_s.rjust(2,"0") + " --- " + "resetting connection")
|
116
|
+
@time_since_epoch_millis = Time.now.utc.to_i * 1000
|
117
|
+
end
|
118
|
+
end
|
119
|
+
rescue LogStash::ShutdownSignal => e
|
120
|
+
receiver.close()
|
121
|
+
raise e
|
122
|
+
rescue => e
|
123
|
+
@logger.error(" " + partition.to_s.rjust(2,"0") + " --- Oh My, An error occurred.", :exception => e)
|
124
|
+
end # process
|
125
|
+
|
126
|
+
public
|
127
|
+
def run(output_queue)
|
128
|
+
threads = []
|
129
|
+
(0..(@partitions-1)).each do |p_id|
|
130
|
+
threads << Thread.new { process_partition(output_queue, p_id) }
|
131
|
+
end
|
132
|
+
threads.each { |thr| thr.join }
|
133
|
+
end # def run
|
134
|
+
|
135
|
+
public
|
136
|
+
def teardown
|
137
|
+
end # def teardown
|
138
|
+
end # class LogStash::Inputs::Azurewadeventhub
|
139
|
+
|
140
|
+
|
141
|
+
class SelectorFilter
|
142
|
+
include org::apache::qpid::amqp_1_0::type::messaging::Filter
|
143
|
+
|
144
|
+
def initialize(value)
|
145
|
+
@value = value
|
146
|
+
end
|
147
|
+
|
148
|
+
def getValue
|
149
|
+
return @value
|
150
|
+
end
|
151
|
+
|
152
|
+
def toString
|
153
|
+
return @value
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
class SelectorFilterWriter < org::apache::qpid::amqp_1_0::codec::AbstractDescribedTypeWriter
|
158
|
+
def initialize(registry)
|
159
|
+
super(registry)
|
160
|
+
end
|
161
|
+
|
162
|
+
def onSetValue(value)
|
163
|
+
@value = value
|
164
|
+
end
|
165
|
+
|
166
|
+
def clear
|
167
|
+
@value = nil
|
168
|
+
end
|
169
|
+
|
170
|
+
def getDescriptor
|
171
|
+
return org::apache::qpid::amqp_1_0::type::UnsignedLong.valueOf(83483426826);
|
172
|
+
end
|
173
|
+
|
174
|
+
def createDescribedWriter
|
175
|
+
return getRegistry().getValueWriter(@value.getValue());
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
class WriterFactory
|
180
|
+
include org::apache::qpid::amqp_1_0::codec::ValueWriter::Factory
|
181
|
+
|
182
|
+
def newInstance(registry)
|
183
|
+
return SelectorFilterWriter.new registry
|
184
|
+
end
|
185
|
+
end
|
@@ -1,33 +1,33 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = 'logstash-input-azurewadeventhub'
|
3
|
-
s.version = '0.9.
|
4
|
-
s.platform = "java"
|
5
|
-
s.licenses = ['Apache License (2.0)']
|
6
|
-
s.summary = "This plugin
|
7
|
-
s.description = "This gem is a Logstash plugin. It reads and parses diagnostics data from Azure Event Hubs."
|
8
|
-
s.authors = ["Microsoft Corporation"]
|
9
|
-
s.email = 'azdiag@microsoft.com'
|
10
|
-
s.homepage = "https://github.com/Azure/azure-diagnostics-tools"
|
11
|
-
s.require_paths = ["lib"]
|
12
|
-
|
13
|
-
# Files
|
14
|
-
s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','Gemfile','LICENSE']
|
15
|
-
# Tests
|
16
|
-
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
-
|
18
|
-
# Special flag to let us know this is actually a logstash plugin
|
19
|
-
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
|
20
|
-
|
21
|
-
# Gem dependencies
|
22
|
-
s.add_runtime_dependency
|
23
|
-
s.add_runtime_dependency 'azure', '~> 0.7.1'
|
24
|
-
s.add_runtime_dependency 'json', '~> 1.8.3'
|
25
|
-
s.add_development_dependency 'logstash-devutils', '>=
|
26
|
-
|
27
|
-
#Jar dependencies
|
28
|
-
s.requirements << "jar 'org.apache.qpid:qpid-amqp-1-0-common', '0.32'"
|
29
|
-
s.requirements << "jar 'org.apache.qpid:qpid-amqp-1-0-client-jms', '0.32'"
|
30
|
-
s.requirements << "jar 'org.apache.qpid:qpid-client', '0.32'"
|
31
|
-
s.requirements << "jar 'org.apache.geronimo.specs:geronimo-jms_1.1_spec', '1.1.1'"
|
32
|
-
s.add_runtime_dependency 'jar-dependencies', '~> 0.3.2'
|
33
|
-
end
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'logstash-input-azurewadeventhub'
|
3
|
+
s.version = '0.9.8'
|
4
|
+
s.platform = "java"
|
5
|
+
s.licenses = ['Apache License (2.0)']
|
6
|
+
s.summary = "This plugin collects Microsoft Azure Diagnostics data from Azure Event Hubs."
|
7
|
+
s.description = "This gem is a Logstash plugin. It reads and parses diagnostics data from Azure Event Hubs."
|
8
|
+
s.authors = ["Microsoft Corporation"]
|
9
|
+
s.email = 'azdiag@microsoft.com'
|
10
|
+
s.homepage = "https://github.com/Azure/azure-diagnostics-tools"
|
11
|
+
s.require_paths = ["lib"]
|
12
|
+
|
13
|
+
# Files
|
14
|
+
s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','Gemfile','LICENSE']
|
15
|
+
# Tests
|
16
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
+
|
18
|
+
# Special flag to let us know this is actually a logstash plugin
|
19
|
+
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
|
20
|
+
|
21
|
+
# Gem dependencies
|
22
|
+
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
23
|
+
s.add_runtime_dependency 'azure', '~> 0.7.1'
|
24
|
+
s.add_runtime_dependency 'json', '~> 1.8.3'
|
25
|
+
s.add_development_dependency 'logstash-devutils', '>= 1.1.0'
|
26
|
+
|
27
|
+
#Jar dependencies
|
28
|
+
s.requirements << "jar 'org.apache.qpid:qpid-amqp-1-0-common', '0.32'"
|
29
|
+
s.requirements << "jar 'org.apache.qpid:qpid-amqp-1-0-client-jms', '0.32'"
|
30
|
+
s.requirements << "jar 'org.apache.qpid:qpid-client', '0.32'"
|
31
|
+
s.requirements << "jar 'org.apache.geronimo.specs:geronimo-jms_1.1_spec', '1.1.1'"
|
32
|
+
s.add_runtime_dependency 'jar-dependencies', '~> 0.3.2'
|
33
|
+
end
|
metadata
CHANGED
@@ -1,85 +1,91 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-azurewadeventhub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: logstash-core-plugin-api
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.60'
|
20
|
+
- - "<="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.99'
|
14
23
|
requirement: !ruby/object:Gem::Requirement
|
15
24
|
requirements:
|
16
|
-
- -
|
25
|
+
- - ">="
|
17
26
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
19
|
-
|
27
|
+
version: '1.60'
|
28
|
+
- - "<="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '2.99'
|
20
31
|
prerelease: false
|
21
32
|
type: :runtime
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: azure
|
22
35
|
version_requirements: !ruby/object:Gem::Requirement
|
23
36
|
requirements:
|
24
|
-
- - ~>
|
37
|
+
- - "~>"
|
25
38
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
39
|
+
version: 0.7.1
|
28
40
|
requirement: !ruby/object:Gem::Requirement
|
29
41
|
requirements:
|
30
|
-
- - ~>
|
42
|
+
- - "~>"
|
31
43
|
- !ruby/object:Gem::Version
|
32
44
|
version: 0.7.1
|
33
|
-
name: azure
|
34
45
|
prerelease: false
|
35
46
|
type: :runtime
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: json
|
36
49
|
version_requirements: !ruby/object:Gem::Requirement
|
37
50
|
requirements:
|
38
|
-
- - ~>
|
51
|
+
- - "~>"
|
39
52
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
53
|
+
version: 1.8.3
|
42
54
|
requirement: !ruby/object:Gem::Requirement
|
43
55
|
requirements:
|
44
|
-
- - ~>
|
56
|
+
- - "~>"
|
45
57
|
- !ruby/object:Gem::Version
|
46
58
|
version: 1.8.3
|
47
|
-
name: json
|
48
59
|
prerelease: false
|
49
60
|
type: :runtime
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: logstash-devutils
|
50
63
|
version_requirements: !ruby/object:Gem::Requirement
|
51
64
|
requirements:
|
52
|
-
- -
|
65
|
+
- - ">="
|
53
66
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
55
|
-
- !ruby/object:Gem::Dependency
|
67
|
+
version: 1.1.0
|
56
68
|
requirement: !ruby/object:Gem::Requirement
|
57
69
|
requirements:
|
58
|
-
- -
|
70
|
+
- - ">="
|
59
71
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
61
|
-
name: logstash-devutils
|
72
|
+
version: 1.1.0
|
62
73
|
prerelease: false
|
63
74
|
type: :development
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: jar-dependencies
|
64
77
|
version_requirements: !ruby/object:Gem::Requirement
|
65
78
|
requirements:
|
66
|
-
- -
|
79
|
+
- - "~>"
|
67
80
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
69
|
-
- !ruby/object:Gem::Dependency
|
81
|
+
version: 0.3.2
|
70
82
|
requirement: !ruby/object:Gem::Requirement
|
71
83
|
requirements:
|
72
|
-
- - ~>
|
84
|
+
- - "~>"
|
73
85
|
- !ruby/object:Gem::Version
|
74
86
|
version: 0.3.2
|
75
|
-
name: jar-dependencies
|
76
87
|
prerelease: false
|
77
88
|
type: :runtime
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ~>
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.3.2
|
83
89
|
description: This gem is a Logstash plugin. It reads and parses diagnostics data from Azure Event Hubs.
|
84
90
|
email: azdiag@microsoft.com
|
85
91
|
executables: []
|
@@ -105,12 +111,12 @@ require_paths:
|
|
105
111
|
- lib
|
106
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
|
-
- -
|
114
|
+
- - ">="
|
109
115
|
- !ruby/object:Gem::Version
|
110
116
|
version: '0'
|
111
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
118
|
requirements:
|
113
|
-
- -
|
119
|
+
- - ">="
|
114
120
|
- !ruby/object:Gem::Version
|
115
121
|
version: '0'
|
116
122
|
requirements:
|
@@ -122,6 +128,6 @@ rubyforge_project:
|
|
122
128
|
rubygems_version: 2.4.8
|
123
129
|
signing_key:
|
124
130
|
specification_version: 4
|
125
|
-
summary: This plugin
|
131
|
+
summary: This plugin collects Microsoft Azure Diagnostics data from Azure Event Hubs.
|
126
132
|
test_files:
|
127
133
|
- spec/inputs/azurewadeventhub_spec.rb
|