Skip to content

Commit cf4ed95

Browse files
committed
Published plugin to RubyGems.com
1 parent c3a945c commit cf4ed95

File tree

3 files changed

+47
-44
lines changed

3 files changed

+47
-44
lines changed

README.md

+43-39
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,58 @@
22

33
# Logstash Plugin
44

5-
This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
5+
This is a plugin for with [Logstash](https://github.com/elasticsearch/logstash).
66

77
This plugin is to read the /proc virtual file system , decode the files in it.
88
I am using the following pages for reference
99

1010
- http://man7.org/linux/man-pages/man5/proc.5.html
1111

12+
## To install for use
13+
```
14+
${LS_HOME}/bin/plugin install logstash-input-proc
15+
```
16+
17+
## Example Config all features enabled
18+
```ruby
19+
input {
20+
proc {
21+
interval=>60
22+
vmstats =>{ }
23+
loadavg =>{ }
24+
meminfo =>{ }
25+
pidstats =>{
26+
user => "root"
27+
}
28+
29+
}
30+
}
31+
32+
output {
33+
stdout{
34+
codec=>"rubydebug"
35+
}
36+
}
37+
```
38+
##Example Minimal
39+
40+
```ruby
41+
input {
42+
proc {
43+
interval=>60
44+
meminfo =>{ }
45+
}
46+
}
1247

48+
output {
49+
stdout{
50+
codec=>"rubydebug"
51+
}
52+
}
53+
```
1354

1455

15-
## Documentation
56+
## Development Documentation
1657

1758

1859
### 1. Plugin Developement and Testing
@@ -64,43 +105,6 @@ bin/plugin install /your/local/plugin/logstash-input-proc.gem
64105
```
65106
- Start Logstash and proceed to test the plugin
66107
-
67-
# Example Config all features enabled
68-
```ruby
69-
input {
70-
proc {
71-
interval=>60
72-
vmstats =>{ }
73-
loadavg =>{ }
74-
meminfo =>{ }
75-
pidstats =>{
76-
user => "root"
77-
}
78-
79-
}
80-
}
81-
82-
output {
83-
stdout{
84-
codec=>"rubydebug"
85-
}
86-
}
87-
```
88-
#Example Minimal
89-
90-
```ruby
91-
input {
92-
proc {
93-
interval=>60
94-
meminfo =>{ }
95-
}
96-
}
97-
98-
output {
99-
stdout{
100-
codec=>"rubydebug"
101-
}
102-
}
103-
```
104108

105109
## 3.0 Kibana Dashboards
106110

lib/logstash/inputs/proc.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ def readPidStats(queue)
216216
process["processor"] = stat[38].to_i
217217
process["rt_priority"] = stat[39].to_i
218218
process["policy"] = stat[40].to_i
219-
220219
# Get /proc/<pid>/status information (name, uid, euid, gid, egid)
221220
begin
222221
IO.foreach("/proc/#{file}/status") do |line|
@@ -234,7 +233,7 @@ def readPidStats(queue)
234233
rescue Errno::ESRCH, Errno::ENOENT
235234
next
236235
end
237-
236+
238237
# If cmdline is empty use comm instead
239238
process["cmdline"] = process["comm"] if process["cmdline.empty?"]
240239

logstash-input-proc.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-input-proc'
3-
s.version = '0.1.2'
3+
s.version = '0.1.1'
44
s.licenses = ['Apache License (2.0)']
55
s.summary = "This plugin is for reading the /proc of a linux filesystem"
66
s.description = "Plugin is used with logstash"
77
s.authors = ["Edward Perry"]
88
s.email = '[email protected]'
9-
s.homepage = "http://www.edwardperry.com"
9+
s.homepage = "http://eperry.github.io/logstash-input-proc/"
1010
s.require_paths = ["lib"]
1111

1212
# Files
@@ -22,4 +22,4 @@ Gem::Specification.new do |s|
2222
s.add_runtime_dependency 'logstash-codec-plain'
2323
s.add_runtime_dependency 'stud'
2424
s.add_development_dependency 'logstash-devutils'
25-
end
25+
end

0 commit comments

Comments
 (0)