logstash-output-picsv 1.0.7 → 1.0.7.1
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/picsv.rb +14 -14
- data/logstash-output-picsv-1.0.7.gem +0 -0
- data/logstash-output-picsv.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fe40277ee42e81405b7743c7a2c09c57471f0f9
|
4
|
+
data.tar.gz: b149e7863967a9c56cb74786a2180f143f1a2147
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb8fcc431fd7797886ba0afa95a025bbb6611c8d8e1e9d78ba920bc9c358f1512563270ed85e3ea88167793e4472e74e09cc90d9c817bf3e09a365877762c911
|
7
|
+
data.tar.gz: 8198a8cad1cad990f452bf30b227323e89ae1a4f4ebbf81ad750db6a2f5c05fa72ff7eda08321168ae0a3872a44a986ef817eb876c40a35c5e553b846d81931b
|
@@ -1,11 +1,11 @@
|
|
1
1
|
############################################
|
2
2
|
#
|
3
|
-
#
|
3
|
+
# PICSV
|
4
4
|
#
|
5
5
|
# Logstash mediation output for IOA PI
|
6
6
|
#
|
7
7
|
# Version 030815.1 Robert Mckeown
|
8
|
-
# Version 030815.
|
8
|
+
# Version 030815.3 Jim Ray
|
9
9
|
#
|
10
10
|
############################################
|
11
11
|
|
@@ -14,15 +14,15 @@ require "logstash/namespace"
|
|
14
14
|
require "logstash/outputs/file"
|
15
15
|
require 'java' # for the java data format stuff
|
16
16
|
|
17
|
-
#
|
17
|
+
# PICSV - based upon original Logstash CSV output.
|
18
18
|
#
|
19
19
|
# Write events to disk in CSV format
|
20
20
|
# Write a PI header as the first line in the file
|
21
21
|
# Name file per PI convention, based upon first and last timestamps encountered
|
22
22
|
|
23
|
-
class LogStash::Outputs::
|
23
|
+
class LogStash::Outputs::PICSV < LogStash::Outputs::File
|
24
24
|
|
25
|
-
config_name "
|
25
|
+
config_name "picsv"
|
26
26
|
milestone 1
|
27
27
|
|
28
28
|
# The field names from the event that should be written to the CSV file.
|
@@ -105,15 +105,15 @@ class LogStash::Outputs::SCACSV < LogStash::Outputs::File
|
|
105
105
|
private
|
106
106
|
def flushWatchdog(delay)
|
107
107
|
begin
|
108
|
-
@logger.debug("
|
108
|
+
@logger.debug("PICSVFlushWatchdog - Last output time = " + @lastOutputTime.to_s)
|
109
109
|
while true do
|
110
|
-
@logger.debug("
|
110
|
+
@logger.debug("PICSVFlushWatchdog - Time.now = " + Time.now.to_s + " $lastOutputTime=" + @lastOutputTime.to_s + " delay=" + delay.to_s)
|
111
111
|
|
112
112
|
if ( (Time.now.to_i >= (@lastOutputTime.to_i + delay.to_i)) and (@recordCount > 0)) then
|
113
|
-
@logger.debug("
|
113
|
+
@logger.debug("PICSVFlushWatchdog - closeAndRenameCurrentFile")
|
114
114
|
closeAndRenameCurrentFile
|
115
115
|
end
|
116
|
-
@logger.debug("
|
116
|
+
@logger.debug("PICSVFlushWatchdog - Sleeping")
|
117
117
|
sleep 1
|
118
118
|
end
|
119
119
|
end
|
@@ -123,7 +123,7 @@ class LogStash::Outputs::SCACSV < LogStash::Outputs::File
|
|
123
123
|
def receive(event)
|
124
124
|
return unless output?(event)
|
125
125
|
|
126
|
-
@logger.debug("in
|
126
|
+
@logger.debug("in PICSV receive")
|
127
127
|
|
128
128
|
if (event['SCAWindowMarker'])
|
129
129
|
# just eat the marker - don't output it
|
@@ -140,7 +140,7 @@ class LogStash::Outputs::SCACSV < LogStash::Outputs::File
|
|
140
140
|
|
141
141
|
@formattedPath = event.sprintf(@path)
|
142
142
|
fd = open(@formattedPath)
|
143
|
-
@logger.debug("
|
143
|
+
@logger.debug("PICSVreceive - after opening fd=" + fd.to_s)
|
144
144
|
|
145
145
|
if @recordCount == 0
|
146
146
|
# output header on first line - note, need a minimum of one record for sensible output
|
@@ -243,7 +243,7 @@ class LogStash::Outputs::SCACSV < LogStash::Outputs::File
|
|
243
243
|
begin
|
244
244
|
|
245
245
|
if timestamp.nil? then
|
246
|
-
@logger.debug("
|
246
|
+
@logger.debug("PICSV " + missingString + " for #{group}")
|
247
247
|
elsif timestamp_output_format == "epoch" then
|
248
248
|
outputString = timestamp.to_s
|
249
249
|
elsif timestamp_output_format == "" then
|
@@ -353,7 +353,7 @@ class LogStash::Outputs::SCACSV < LogStash::Outputs::File
|
|
353
353
|
end
|
354
354
|
|
355
355
|
def teardown
|
356
|
-
@logger.debug("
|
356
|
+
@logger.debug("PICSV - Teardown: closing files")
|
357
357
|
|
358
358
|
Thread.kill(@timerThread)
|
359
359
|
closeAndRenameCurrentFile
|
@@ -361,5 +361,5 @@ class LogStash::Outputs::SCACSV < LogStash::Outputs::File
|
|
361
361
|
finished
|
362
362
|
end
|
363
363
|
|
364
|
-
end # class LogStash::Outputs::
|
364
|
+
end # class LogStash::Outputs::PICSV
|
365
365
|
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-picsv'
|
3
|
-
s.version = "1.0.7" # 0916@11:16AM
|
3
|
+
s.version = "1.0.7.1" # 0916@11:16AM
|
4
4
|
s.licenses = ["Apache-2.0"]
|
5
5
|
s.summary = "Receives a stream of events and outputs files meeting the csv format for IBM Operation Analytics Predictive Insights"
|
6
6
|
# Need to validate 1.5 standalone gemfile compatibility; gemfile exists!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-picsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.7
|
4
|
+
version: 1.0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ORIG:Robert Mckeown, Update:Jim Ray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- Rakefile
|
71
71
|
- lib/logstash/outputs/picsv.rb
|
72
72
|
- logstash-output-picsv-1.0.6.gem
|
73
|
+
- logstash-output-picsv-1.0.7.gem
|
73
74
|
- logstash-output-picsv.gemspec
|
74
75
|
- spec/outputs/picsv_spec.rb
|
75
76
|
homepage: https://github.com/raygj/logstash-output-picsv/README.md
|