logstash-input-perfmon 0.1.6 → 1.0.0

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: 68cc247a345a96ce083538b3e7f661ab7a81b151
4
- data.tar.gz: f27f18efd369769692d7ec7f3b0b1856eb497a70
3
+ metadata.gz: 1fd605ad5c8aa07747534a29de79f22dcecd354e
4
+ data.tar.gz: c68130460a5ae8bde0ef799421f10345ac9c3ad2
5
5
  SHA512:
6
- metadata.gz: dc35795a90643171fbd743d2691eb59d0cfa51c259e8e3af5acc64fa23c6cce2de03d8c5e08c8feebf25a6df52863abfbc9675605219fc9ca36007f14d56f176
7
- data.tar.gz: 4a91279ddd0072c9d445281bff0728c1df4762b414b60285ef1ab2ebc08dc58691a5a03465ff1aa3d6e3b3493fba95a708cb578c8570c6b8bacc782a762985e9
6
+ metadata.gz: 30800a921771e02ac393e8e443b51500373e68dd053d5c1471016ea2a697f0e4e0ef7cfef6b3877231c9a6b8efdc09be8efe937c80d4ccab10519007179ddff4
7
+ data.tar.gz: 4927766d9df8adfa11d4ed9c9909fc222028d99cff613d32f3030deb536448cb64fbbe4601b583e4c37819d711dbb2e6fda17d8b043dcc5379a7a5cf4dfeddba
@@ -0,0 +1,65 @@
1
+ # Contributing to Logstash
2
+
3
+ All contributions are welcome: ideas, patches, documentation, bug reports,
4
+ complaints, etc!
5
+
6
+ Programming is not a required skill, and there are many ways to help out!
7
+ It is more important to us that you are able to contribute.
8
+
9
+ That said, some basic guidelines, which you are free to ignore :)
10
+
11
+ ## Want to learn?
12
+
13
+ Want to lurk about and see what others are doing with Logstash?
14
+
15
+ * The irc channel (#logstash on irc.freenode.org) is a good place for this
16
+ * The [forum](https://discuss.elastic.co/c/logstash) is also
17
+ great for learning from others.
18
+
19
+ ## Got Questions?
20
+
21
+ Have a problem you want Logstash to solve for you?
22
+
23
+ * You can ask a question in the [forum](https://discuss.elastic.co/c/logstash)
24
+ * Alternately, you are welcome to join the IRC channel #logstash on
25
+ irc.freenode.org and ask for help there!
26
+
27
+ ## Have an Idea or Feature Request?
28
+
29
+ * File a ticket on [GitHub](https://github.com/elastic/logstash/issues). Please remember that GitHub is used only for issues and feature requests. If you have a general question, the [forum](https://discuss.elastic.co/c/logstash) or IRC would be the best place to ask.
30
+
31
+ ## Something Not Working? Found a Bug?
32
+
33
+ If you think you found a bug, it probably is a bug.
34
+
35
+ * If it is a general Logstash or a pipeline issue, file it in [Logstash GitHub](https://github.com/elasticsearch/logstash/issues)
36
+ * If it is specific to a plugin, please file it in the respective repository under [logstash-plugins](https://github.com/logstash-plugins)
37
+ * or ask the [forum](https://discuss.elastic.co/c/logstash).
38
+
39
+ # Contributing Documentation and Code Changes
40
+
41
+ If you have a bugfix or new feature that you would like to contribute to
42
+ logstash, and you think it will take more than a few minutes to produce the fix
43
+ (ie; write code), it is worth discussing the change with the Logstash users and developers first! You can reach us via [GitHub](https://github.com/elastic/logstash/issues), the [forum](https://discuss.elastic.co/c/logstash), or via IRC (#logstash on freenode irc)
44
+ Please note that Pull Requests without tests will not be merged. If you would like to contribute but do not have experience with writing tests, please ping us on IRC/forum or create a PR and ask our help.
45
+
46
+ ## Contributing to plugins
47
+
48
+ Check our [documentation](https://www.elastic.co/guide/en/logstash/current/contributing-to-logstash.html) on how to contribute to plugins or write your own! It is super easy!
49
+
50
+ ## Contribution Steps
51
+
52
+ 1. Test your changes! [Run](https://github.com/elastic/logstash#testing) the test suite
53
+ 2. Please make sure you have signed our [Contributor License
54
+ Agreement](https://www.elastic.co/contributor-agreement/). We are not
55
+ asking you to assign copyright to us, but to give us the right to distribute
56
+ your code without restriction. We ask this of all contributors in order to
57
+ assure our users of the origin and continuing existence of the code. You
58
+ only need to sign the CLA once.
59
+ 3. Send a pull request! Push your changes to your fork of the repository and
60
+ [submit a pull
61
+ request](https://help.github.com/articles/using-pull-requests). In the pull
62
+ request, describe what your changes do and mention any bugs/issues related
63
+ to the pull request.
64
+
65
+
@@ -0,0 +1,9 @@
1
+ Please post all product and debugging questions on our [forum](https://discuss.elastic.co/c/logstash). Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.
2
+
3
+ For all general issues, please provide the following details for fast resolution:
4
+
5
+ - Version:
6
+ - Operating System:
7
+ - Config File (if you have sensitive info, please remove it):
8
+ - Sample Data:
9
+ - Steps to Reproduce:
@@ -0,0 +1 @@
1
+ Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/
@@ -0,0 +1,5 @@
1
+ ## 2.0.0
2
+ - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
+ instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
4
+ - Dependency on logstash-core update to 2.0
5
+
data/Gemfile CHANGED
@@ -1,6 +1,2 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
-
4
- gem 'logstash-core', '~> 2.1'
5
- gem 'logstash-codec-plain', '~> 2.0'
6
- gem 'logstash-devutils', '~> 0'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Perfmon Logstash Plugin
2
2
 
3
+ [![Build
4
+ Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-perfmon-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-perfmon-unit/)
5
+
3
6
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
7
 
5
8
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
@@ -11,7 +14,7 @@ This plugin collects the same sort of counters by using the command-line tool [T
11
14
 
12
15
  To run the tests (be sure that JRuby is installed prior):
13
16
  ```
14
- git clone https://github.com/NickMRamirez/logstash-input-perfmon.git
17
+ git clone https://github.com/logstash-plugins/logstash-input-perfmon.git
15
18
  cd logstash-input-perfmon
16
19
  jruby -S gem install bundler
17
20
  jruby -S bundle install
@@ -23,16 +26,21 @@ To build the gem:
23
26
  gem build logstash-input-perfmon.gemspec
24
27
  ```
25
28
 
26
- To install the gem to logstash:
29
+ To install the gem to logstash (note the forward slashes in the path when using the `install` command):
27
30
  ```
28
31
  cd path\to\logstash\bin
29
- plugin install path\to\gem
32
+ logstash-plugin install C:/path/to/gem
30
33
  ```
31
34
 
32
- If you aren't building the gem yourself, you can install it directly from rubygems.org:
35
+ If you aren't building the gem yourself, you can install it directly from [rubygems.org](https://rubygems.org/gems/logstash-input-perfmon):
33
36
  ```
34
- cd path\to\logstash\bin
35
- plugin install logstash-input-perfmon
37
+ cd path\to\logstash
38
+
39
+ # Logstash 2.3 and higher
40
+ bin\logstash-plugin install --no-verify logstash-input-perfmon
41
+
42
+ # Prior to Logstash 2.3
43
+ bin\plugin install --no-verify logstash-input-perfmon
36
44
  ```
37
45
 
38
46
  Create a configuration file. The following collects three metrics every ten seconds:
@@ -56,11 +64,10 @@ filter {
56
64
  }
57
65
 
58
66
  output {
59
- file {
60
- path => "C:\perfmon_output.txt"
61
- }
67
+ stdout {}
62
68
  }
63
69
  ```
70
+
64
71
  Run logstash:
65
72
  ```
66
73
  logstash -f C:\path\to\conf
@@ -76,7 +76,7 @@ class LogStash::Inputs::Perfmon < LogStash::Inputs::Base
76
76
  @codec.decode(data) do |event|
77
77
  decorate(event)
78
78
 
79
- event['host'] = @host
79
+ event.set('host', @host)
80
80
 
81
81
  queue << event
82
82
  @logger.debug("Added event to queue: #{event}")
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-perfmon'
3
- s.version = '0.1.6'
3
+ s.version = '1.0.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Logstash input for Windows Performance Monitor"
6
6
  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."
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
20
20
 
21
21
  # Gem dependencies
22
- s.add_runtime_dependency 'logstash-core', '~> 2.1'
23
- s.add_runtime_dependency 'logstash-codec-plain', '~> 2.0'
22
+ s.add_runtime_dependency 'logstash-core', '>= 5.0.0'
23
+ s.add_runtime_dependency 'logstash-codec-plain'
24
24
 
25
- s.add_development_dependency 'logstash-devutils', '~> 0'
25
+ s.add_development_dependency 'logstash-devutils'
26
26
  end
@@ -4,10 +4,14 @@ require_relative '../../lib/logstash/inputs/typeperf_wrapper.rb'
4
4
 
5
5
  class MockPerfmonProcGetter
6
6
  def start_process(counters, interval, output_queue)
7
- output_queue << "Test msg 1"
8
- output_queue << "Test msg 2"
9
- output_queue << "Test msg 3"
7
+ output_queue << "Test msg 1"
8
+ output_queue << "Test msg 2"
9
+ output_queue << "Test msg 3"
10
10
  end
11
+
12
+ def proc_is_running?
13
+ true
14
+ end
11
15
 
12
16
  def wait_for_process_to_start
13
17
  sleep 1
metadata CHANGED
@@ -1,47 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-perfmon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Ramirez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-19 00:00:00.000000000 Z
11
+ date: 2017-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '2.1'
18
+ version: 5.0.0
19
19
  name: logstash-core
20
20
  prerelease: false
21
21
  type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.1'
26
+ version: 5.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - "~>"
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '2.0'
32
+ version: '0'
33
33
  name: logstash-codec-plain
34
34
  prerelease: false
35
35
  type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  name: logstash-devutils
@@ -49,15 +49,20 @@ dependencies:
49
49
  type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- 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.
55
+ description: This gem is a logstash plugin required to be installed on top of the
56
+ Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not
57
+ a stand-alone program. Logstash input for Windows Performance Monitor metrics.
56
58
  email: nickram44@hotmail.com
57
59
  executables: []
58
60
  extensions: []
59
61
  extra_rdoc_files: []
60
62
  files:
63
+ - ".github/CONTRIBUTING.md"
64
+ - ".github/ISSUE_TEMPLATE.md"
65
+ - ".github/PULL_REQUEST_TEMPLATE.md"
61
66
  - ".gitignore"
62
67
  - ".travis.yml"
63
68
  - CHANGELOG.md
@@ -97,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
102
  version: '0'
98
103
  requirements: []
99
104
  rubyforge_project:
100
- rubygems_version: 2.4.8
105
+ rubygems_version: 2.6.8
101
106
  signing_key:
102
107
  specification_version: 4
103
108
  summary: Logstash input for Windows Performance Monitor