fluent-plugin-pi 0.0.5 → 0.0.6

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: 8c0ed5aaacaf5b685dbb6b47ca81eb1ab9b8d7db
4
- data.tar.gz: 1d0e053343dfc865a715805482677fb7ed71d8f7
3
+ metadata.gz: 75bbfde0f15018f51670dc8da342ab3304699ce8
4
+ data.tar.gz: 4199d62180542895fa05e7d78dc5a951ca199b2f
5
5
  SHA512:
6
- metadata.gz: 2a998921ddbdea5090ce6353c9c83cbe40c69ec1b41f0ec96661e31056b903b1357a979e6dda387478c7ea7dba82e081d830939669ff2fbb12d8cec899c25d00
7
- data.tar.gz: 5c32af268a2ff21b76bfa7334ed04a2dd253665dfed601fd85b84917bf7cd46d8721dbf83673ced7463ee8107dfa2686494ad93ee3bd3e0d35ae5da162fa10a8
6
+ metadata.gz: 6d7f95a06f77e3b2ad313f793fa254bcb83f23864657eb23e78d75274a3bd9460d1131c8e3e887ab00be5db318706f6bca53f97adb635f5606e36ffd91f5c790
7
+ data.tar.gz: 4c409b04defa7af7970b8eeeb8a0f9eedf8d28367afd8aba2096d5d9fb552c6bd7c082fee1823e6257818ae72ef6ba1bc1a939b32b279ed1c2cbb1b79c4d5c7e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-pi (0.0.5)
4
+ fluent-plugin-pi (0.0.6)
5
5
  adal (~> 1.0.0)
6
6
  certified (~> 1.0.0)
7
7
  rest-client (~> 1.6.9)
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-pi"
6
- spec.version = "0.0.5"
6
+ spec.version = "0.0.6"
7
7
  spec.authors = ["Derek Endres"]
8
8
  spec.email = ["dendres@osisoft.com"]
9
9
 
@@ -72,7 +72,7 @@ module Fluent
72
72
 
73
73
  (conf.key?('typeID')) ? @typeID = conf['typeID'] : @typeID = nil
74
74
  (conf.key?('streamID')) ? @streamID = conf['streamID'] : @streamID = 'nil'
75
- (conf.key?('valuetag')) ? @valuetag = conf['valuetag'] : @valuetag = 'Value'
75
+ (conf.key?('valuetag')) ? @valuetag = conf['valuetag'] : @valuetag = nil
76
76
 
77
77
  if(@tenantId == nil || @namespaceId == nil)
78
78
  #could change requirement and create a namespace as it is needed, but currently it must be already created
@@ -186,7 +186,12 @@ module Fluent
186
186
 
187
187
  def format(tag, time, record)
188
188
  #assumes time is a bignum in FluentD pattern not a PI Time
189
+ value = nil
190
+ if(@valuetag != nil)
189
191
  value = record[@valuetag].to_s
192
+ else
193
+ value = record.to_s
194
+ end
190
195
  return "{\"Timestamp\":\"#{Time.at(time).localtime}\",\"Value\":\"#{value}\"},"
191
196
  end
192
197
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-pi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Endres
@@ -101,6 +101,7 @@ files:
101
101
  - pkg/fluent-plugin-pi-0.0.2.gem
102
102
  - pkg/fluent-plugin-pi-0.0.3.gem
103
103
  - pkg/fluent-plugin-pi-0.0.4.gem
104
+ - pkg/fluent-plugin-pi-0.0.5.gem
104
105
  homepage: https://github.com/osisoftresearch
105
106
  licenses:
106
107
  - OSISoft LLC