logstash-input-proc 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/inputs/proc.rb +28 -27
- data/logstash-input-proc.gemspec +1 -1
- 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: 1cdbd16b4254917f2335715332ec00c12430ca3a
|
4
|
+
data.tar.gz: fbcdf0c2c1fa195955276d7f8843e18d0452a10c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aea789af59efe887a727e54199e221ce652140af439b4ca1b94220d9b85011de2d3ca38b20df42eee65696a3006d7aeb5e4a8d6672835ba47982d13036d34f1
|
7
|
+
data.tar.gz: 4fd5d300fb50b0498d1ddf4ab4edccf93ede4d3830a5c10c6c48222b34e02fb762e1135de3a948f8b2400909054ddf3e6afd2124b8945db8fb87930ff57d9d15
|
data/lib/logstash/inputs/proc.rb
CHANGED
@@ -542,34 +542,35 @@ end
|
|
542
542
|
def run(queue)
|
543
543
|
loop do
|
544
544
|
begin
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
545
|
+
start = Time.now
|
546
|
+
readVmStats(queue) if @vmstats
|
547
|
+
readLoadAverage(queue) if @loadavg
|
548
|
+
readMemInfo(queue) if @meminfo
|
549
|
+
readPidStats(queue) if @pidstats
|
550
|
+
readDiskStats(queue) if @diskstats
|
551
|
+
readMounts(queue) if @mounts
|
552
|
+
readNetDev(queue) if @netdev
|
553
|
+
readCpuInfo(queue) if @cpuinfo
|
554
|
+
readCrypto(queue) if @crypto
|
555
|
+
readWireless(queue) if @wireless
|
556
|
+
readSysIpcShm(queue) if @sysipcshm
|
557
|
+
duration = Time.now - start
|
558
|
+
@logger.info("Parsing completed", :duration => duration, :interval => @interval )
|
559
|
+
# Sleep for the remainder of the interval, or 0 if the duration ran
|
560
|
+
# longer than the interval.
|
561
|
+
sleeptime = [0, @interval - duration].max
|
562
|
+
if sleeptime == 0
|
563
|
+
@logger.warn("Parsing longer than the interval. Skipping sleep.",
|
564
|
+
:duration => duration,
|
565
|
+
:interval => @interval)
|
566
|
+
else
|
567
|
+
sleep(sleeptime)
|
568
|
+
end
|
569
569
|
rescue => exception
|
570
|
-
|
571
|
-
puts exception.
|
572
|
-
|
570
|
+
# Do Do nothing
|
571
|
+
# puts exception.message
|
572
|
+
# puts exception.backtrace
|
573
|
+
# raise
|
573
574
|
end # rescue
|
574
575
|
end # loop
|
575
576
|
end # def run
|
data/logstash-input-proc.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-proc'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.3.0'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "This plugin is for reading the /proc of a linux filesystem"
|
6
6
|
s.description = "Plugin is used with logstash"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edward Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|