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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08e2af030babde261c06911448ee71e4aa254f47
4
- data.tar.gz: 98ef425eab3ed79441ed3c7d14fa76015c75a8e9
3
+ metadata.gz: a69201bb7c029a03bbda1af883aab1e77e67f0a3
4
+ data.tar.gz: 0d2507a5321e60f134d2d8a46783c7946f69538f
5
5
  SHA512:
6
- metadata.gz: 027063150f333c52388774348770a8afd399a5b0bcfe6554ba77dd22393285f82290399820196adbf4cff3f7b059b182c5cd2829d1399cb1357f70360cb23c4b
7
- data.tar.gz: 73f095af74a87a10ca857ba1375021b78d216fc52a6a61904277c3b575d97f8f174f0e249eb1c2882a0e2e550d9131ec4b628dc9ea058e2b4370a2b4070ad90a
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
- pointHash[metric] = {"startTime" => timestamp, "lastTimestamp" => 0, "points" => Chronix::Points.new, "prevDelta" => 0, "timeSinceLastDelta" => 0, "lastStoredDate" => timestamp}
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.2"
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.2
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-05-30 00:00:00.000000000 Z
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