logstash-filter-cpu_temp 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0aebdffd1bcdefb374e7ecacbb2d4a4c48d6c3af
4
- data.tar.gz: 9f4f9fe28eacd1d99288fb261c447714661e9907
3
+ metadata.gz: 6549b05d4bd47c5d20d9b7dde542537bd7a38f79
4
+ data.tar.gz: 31c6660f880a0f2471bb720fba7a2a5b343d000e
5
5
  SHA512:
6
- metadata.gz: 8093ebb198b7b98c79b4fd6d65878efdb95a95c351174da6213298778a121bb776061e56ef9bd2887c55a61a0b8292fae08893e9b3fb6ca81c3ff75db3ac7ca3
7
- data.tar.gz: 4c919775b87a279d14f81f3e1ad3ec0480b8c62f78dd8e185fe124afb81d271b545c193193792975c7c5d05d5d8c04452eabae1b961489cb0c64cd54e099303a
6
+ metadata.gz: 8fc2002aad3b7360a3ad143add7427555919b975492b4bc68c11a5541d34ea2a8c85d3748c6f81f5e6c33a59e17a8453a426d684003286992df019d440decf55
7
+ data.tar.gz: 11a641de692928c0b765f1b42ae721a4f522f82e3e67a5ad99ec39cf437872867b949c12f93adf4cc207046975f835d1d3e6359ef9269d47292a0b6dcd97cb75
@@ -25,6 +25,7 @@ class LogStash::Filters::CPU_TEMP < LogStash::Filters::Base
25
25
 
26
26
  begin
27
27
  rubytime = Time.strptime($1, "%d-%m-%Y %H:%M:%S")
28
+ rubytime = rubytime - 7200
28
29
  logstash_time = LogStash::Timestamp.new(rubytime)
29
30
  event.set('@timestamp', logstash_time)
30
31
  rescue Exception => e
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-cpu_temp'
3
- s.version = '1.0.1'
3
+ s.version = '1.0.2'
4
4
  s.licenses = 'Apache-2.0'
5
5
  s.summary = "This example filter replaces the contents of the message field with the specified value."
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/logstash-plugin install gemname. This gem is not a stand-alone program. It's only purpose is for testing our schoolproject. Please don't use this in production."
@@ -21,7 +21,7 @@ describe LogStash::Filters::CPU_TEMP do
21
21
 
22
22
  it "should extract timestamp and cpu temperature" do
23
23
  plugin.filter(event)
24
- expect(event.get("@timestamp").to_f).to eq(1539343622.0)
24
+ expect(event.get("@timestamp").to_f).to eq(1539336422.0)
25
25
  expect(event.get("temperature")).to eq(32.999)
26
26
  expect(event.get("message")).to eq("12-10-2018 11:27:02 32.999")
27
27
  end
@@ -32,7 +32,7 @@ describe LogStash::Filters::CPU_TEMP do
32
32
 
33
33
  it "should extract timestamp" do
34
34
  plugin.filter(event)
35
- expect(event.get("@timestamp").to_f).to eq(1545692322.0)
35
+ expect(event.get("@timestamp").to_f).to eq(1545685122.0)
36
36
  expect(event.get("temperature")).to eq(0.321)
37
37
  expect(event.get("message")).to eq("24-12-2018 22:58:42 0.321")
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-cpu_temp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danel Roelle, Manuel Metzger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-14 00:00:00.000000000 Z
11
+ date: 2018-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement