logstash-output-chronix 0.1.2 → 0.1.3
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/lib/logstash/outputs/chronix.rb +5 -1
- data/logstash-output-chronix.gemspec +1 -1
- data/spec/outputs/chronix_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a69201bb7c029a03bbda1af883aab1e77e67f0a3
|
4
|
+
data.tar.gz: 0d2507a5321e60f134d2d8a46783c7946f69538f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48e88364f15e7df8df46fb0479a4dedf4eceb48364a5258a93529199ee058e70b6e802f5952810a192576e7bf14f8ec0a3c42e1a919e6e5a20ee60cacde81c06
|
7
|
+
data.tar.gz: a01be98c35f97d7099d9f8c6b88a164da845457b9998283e69cecae81e99ffecf84f034e77a349ead8ba9fee02b487517a402f9acef4dcd3b0c5d30026e1256f
|
@@ -92,7 +92,11 @@ class LogStash::Outputs::Chronix < LogStash::Outputs::Base
|
|
92
92
|
|
93
93
|
# if there is no list for the current metric -> create a new one
|
94
94
|
if pointHash[metric] == nil
|
95
|
-
|
95
|
+
if eventData["chronix_type"] == "strace"
|
96
|
+
pointHash[metric] = {"startTime" => timestamp, "lastTimestamp" => 0, "points" => Chronix::StracePoints.new, "prevDelta" => 0, "timeSinceLastDelta" => 0, "lastStoredDate" => timestamp}
|
97
|
+
else
|
98
|
+
pointHash[metric] = {"startTime" => timestamp, "lastTimestamp" => 0, "points" => Chronix::Points.new, "prevDelta" => 0, "timeSinceLastDelta" => 0, "lastStoredDate" => timestamp}
|
99
|
+
end
|
96
100
|
end
|
97
101
|
|
98
102
|
if pointHash[metric]["lastTimestamp"] == 0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-chronix'
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.3"
|
4
4
|
s.licenses = ["Apache License (2.0)"]
|
5
5
|
s.summary = "This output stores your logs in chronix"
|
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/plugin install logstash-output-chronix. This gem is not a stand-alone program"
|
@@ -72,6 +72,14 @@ describe LogStash::Outputs::Chronix do
|
|
72
72
|
expect(subject.createPointHash(events)).to eq(phash)
|
73
73
|
end
|
74
74
|
|
75
|
+
it "should create a correct point hash with a StracePoint" do
|
76
|
+
points = Chronix::StracePoints.new
|
77
|
+
points.p << subject.createChronixPoint(0, svalue, "strace")
|
78
|
+
phash = {tmetric => {"startTime" => ttimestamp.to_i, "lastTimestamp" => ttimestamp.to_i, "points" => points, "prevDelta" => 0, "timeSinceLastDelta" => 1, "lastStoredDate" => ttimestamp.to_i}}
|
79
|
+
events = [LogStash::Event.new("metric" => tmetric, "value" => svalue, "@timestamp" => "2016-03-30T15:54:32.172Z", "chronix_type" => "strace")]
|
80
|
+
expect(subject.createPointHash(events)).to eq(phash)
|
81
|
+
end
|
82
|
+
|
75
83
|
it "should create a valid document" do
|
76
84
|
points = Chronix::Points.new
|
77
85
|
points.p << subject.createChronixPoint(ttimestamp, tvalue)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-chronix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Jalowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|