logstash-input-heartbeat 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/inputs/heartbeat.rb +9 -12
- data/logstash-input-heartbeat.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db1519176bec66ad988c9e9ec2bfef24028891496ab6d1e89d7ac231ddc01ed6
|
4
|
+
data.tar.gz: '0824f3149f1421f3ae36d9dcabad8e9f3b20c24565a10b60424c61abb233a307'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e9cbd32dc4734c1ebe67871dcc61b214dbf4ba8c8e87225f85240985e0fb46e2664f96664901eb56c9ddf3d6c384afa736414903bf86f81d0b96941a898abca
|
7
|
+
data.tar.gz: 1b8e6ef1f2e9040cc4d627c9f14c13c51afc53d6fcb68fa846cd1f6fe0d499cd82f22618a0dcc152edd6f97667795751ca9f6b6548fd6facf00735432c9e5c61
|
data/CHANGELOG.md
CHANGED
@@ -38,26 +38,27 @@ class LogStash::Inputs::Heartbeat < LogStash::Inputs::Threadable
|
|
38
38
|
# This is typically used only for testing purposes.
|
39
39
|
config :count, :validate => :number, :default => -1
|
40
40
|
|
41
|
-
public
|
42
41
|
def register
|
43
42
|
@host = Socket.gethostname
|
44
|
-
end
|
43
|
+
end
|
45
44
|
|
46
45
|
def run(queue)
|
47
46
|
sequence = 0
|
48
|
-
@thread = Thread.current
|
49
47
|
|
50
|
-
|
48
|
+
while !stop?
|
49
|
+
start = Time.now
|
50
|
+
|
51
51
|
sequence += 1
|
52
52
|
event = generate_message(sequence)
|
53
53
|
decorate(event)
|
54
54
|
queue << event
|
55
55
|
break if sequence == @count || stop?
|
56
|
-
end # loop
|
57
56
|
|
58
|
-
|
57
|
+
sleep_for = @interval - (Time.now - start)
|
58
|
+
Stud.stoppable_sleep(sleep_for) { stop? } if sleep_for > 0
|
59
|
+
end
|
60
|
+
end
|
59
61
|
|
60
|
-
public
|
61
62
|
def generate_message(sequence)
|
62
63
|
if @message == "epoch"
|
63
64
|
LogStash::Event.new("clock" => Time.now.to_i, "host" => @host)
|
@@ -67,8 +68,4 @@ class LogStash::Inputs::Heartbeat < LogStash::Inputs::Threadable
|
|
67
68
|
LogStash::Event.new("message" => @message, "host" => @host)
|
68
69
|
end
|
69
70
|
end
|
70
|
-
|
71
|
-
def stop
|
72
|
-
Stud.stop!(@thread)
|
73
|
-
end
|
74
|
-
end # class LogStash::Inputs::Heartbeat
|
71
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-heartbeat'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.7'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Generates heartbeat events for testing"
|
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"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-heartbeat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.6.
|
116
|
+
rubygems_version: 2.6.13
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Generates heartbeat events for testing
|