Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
source 'https://rubygems.org'
gemspec

gem 'logstash-core', '~> 2.1'
gem 'logstash-codec-plain', '~> 2.0'
gem 'logstash-devutils', '~> 0'
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ To build the gem:
gem build logstash-input-perfmon.gemspec
```

To install the gem to logstash:
To install the gem to logstash (note the forward slashes in the path when using the `install` command):
```
cd path\to\logstash\bin
plugin install path\to\gem
logstash-plugin install C:/path/to/gem
```

If you aren't building the gem yourself, you can install it directly from [rubygems.org](https://rubygems.org/gems/logstash-input-perfmon):
Expand Down Expand Up @@ -64,9 +64,7 @@ filter {
}

output {
file {
path => "C:\perfmon_output.txt"
}
stdout {}
}
```

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/inputs/perfmon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def run(queue)
@codec.decode(data) do |event|
decorate(event)

event['host'] = @host
event.set('host', @host)

queue << event
@logger.debug("Added event to queue: #{event}")
Expand Down
8 changes: 4 additions & 4 deletions logstash-input-perfmon.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-input-perfmon'
s.version = '0.1.6'
s.version = '1.0.0'
s.licenses = ['Apache License (2.0)']
s.summary = "Logstash input for Windows Performance Monitor"
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program. Logstash input for Windows Performance Monitor metrics."
Expand All @@ -19,8 +19,8 @@ Gem::Specification.new do |s|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }

# Gem dependencies
s.add_runtime_dependency 'logstash-core', '~> 2.1'
s.add_runtime_dependency 'logstash-codec-plain', '~> 2.0'
s.add_runtime_dependency 'logstash-core', '>= 5.0.0'
s.add_runtime_dependency 'logstash-codec-plain'

s.add_development_dependency 'logstash-devutils', '~> 0'
s.add_development_dependency 'logstash-devutils'
end
10 changes: 7 additions & 3 deletions spec/inputs/typeperf_wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

class MockPerfmonProcGetter
def start_process(counters, interval, output_queue)
output_queue << "Test msg 1"
output_queue << "Test msg 2"
output_queue << "Test msg 3"
output_queue << "Test msg 1"
output_queue << "Test msg 2"
output_queue << "Test msg 3"
end

def proc_is_running?
true
end

def wait_for_process_to_start
sleep 1
Expand Down