sensu-plugins-windows 0.0.1.alpha.3 → 0.0.1

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: 456b4499d2e08b5e019ab896313dfdfcfadd90ae
4
- data.tar.gz: 23a294e527464fcb7cceec73f4d31cccd915e65e
3
+ metadata.gz: ef96a4ab27948355d0ebe457b524a8b592df8f2a
4
+ data.tar.gz: 83182755a743a8b15c90dc29a633b568b4b22a56
5
5
  SHA512:
6
- metadata.gz: 86cdef0dc28393ca1950e1ccedfcab3ddde54a33b1f06c6684e928cfbd656618a1872a56f4788ca59550f8d37943a629432fd37ea06b40d48c30614a59a67032
7
- data.tar.gz: 1d9c17275640843b15e27ed045d5ea6085c60fd9f2c72f60fb8e7be57be8d0ce5e4dbda01ba97ec49503920afb835561fa1c4778f8994316f790f3df9ed9fc7e
6
+ metadata.gz: 0a5e700834d2d0392f513bf3f2e95b96c7a58cbd834b7dd43055d2983ef0488580dbbecf7a95d5d6392029582ae3dac4ced7b817f3c2b33b22de53aee8799bd4
7
+ data.tar.gz: 71eb67df19982ebf3e7896aa3029b95c31be381ff7e4b03c32d93fe912d303aacb3662245d55196dd53fbce704aa33e7198d99381bc534ef6bcecec1c099b853
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- CM-5��q4�W��
2
- ����g��Y�z3���Բ�t�AU0��Zց�@��
1
+
2
+ o����qi�EG�[Hx��*F�v�8xP�_[ .�5J �k���o���1��b1|��Gk�z�d�Ju�Z�!�]��x�EQT�۳ �"���L�ja�������E�SG����Q��Z�u��@�Jc����L�a կk����Yqϴ�"��d��Ai�Z̲�ޞ#�n�r4�i���Q��k��C��t�ne�{7���2����[�t�J��"��e�,ZK%��W��� ���DB �?�cF{v�l�b�
data/CHANGELOG.md CHANGED
@@ -1,14 +1,12 @@
1
- #### 0.0.1.alpha.1
1
+ #Change Log
2
+ This project adheres to [Semantic Versioning](http://semver.org/).
2
3
 
3
- * initial release, same as community plugins repo
4
+ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
4
5
 
5
- #### 0.0.1.alpha.2
6
+ ## Unreleased][unreleased]
6
7
 
7
- * build passes
8
+ ## 0.0.1 - 2015-05-21
8
9
 
9
- #### 0.0.1.alpha.2
10
+ ### Added
11
+ - initial release
10
12
 
11
- * fix rubocop issues
12
- * add gem metadata
13
- * add new version and bump tasks
14
- * add new version modules
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 devops@yieldbot.com
1
+ Copyright (c) 2015 Sensu-Plugins
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-windows/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-windows)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-windows/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-windows)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-windows.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-windows)
8
+ [ ![Codeship Status for sensu-plugins/sensu-plugins-windows](https://codeship.com/projects/36b6a840-e20b-0132-647e-4ea0dd54b93d/status?branch=master)](https://codeship.com/projects/81375)
8
9
 
9
10
  ## Functionality
10
11
 
@@ -16,7 +17,6 @@
16
17
  * bin/metrics-iis-current-connections.rb
17
18
  * bin/check-windows-service.rb
18
19
  * bin/check-windows-process.rb
19
- * bin/extension-wmi-metrics.rb
20
20
  * bin/check-windows-disk.rb
21
21
  * bin/check-windows-cpu-load.rb
22
22
  * bin/check-iis-current-connections.rb
@@ -25,39 +25,6 @@
25
25
 
26
26
  ## Installation
27
27
 
28
- Add the public key (if you haven’t already) as a trusted certificate
29
-
30
- ```
31
- gem cert --add <(curl -Ls https://raw.githubusercontent.com/sensu-plugins/sensu-plugins.github.io/master/certs/sensu-plugins.pem)
32
- gem install sensu-plugins-windows -P MediumSecurity
33
- ```
34
-
35
- You can also download the key from /certs/ within each repository.
36
-
37
- #### Rubygems
38
-
39
- `gem install sensu-plugins-windows`
40
-
41
- #### Bundler
42
-
43
- Add *sensu-plugins-windows* to your Gemfile and run `bundle install` or `bundle update`
44
-
45
- #### Chef
46
-
47
- Using the Sensu **sensu_gem** LWRP
48
- ```
49
- sensu_gem 'sensu-plugins-windows' do
50
- options('--prerelease')
51
- version '0.0.1.alpha.1'
52
- end
53
- ```
54
-
55
- Using the Chef **gem_package** resource
56
- ```
57
- gem_package 'sensu-plugins-windows' do
58
- options('--prerelease')
59
- version '0.0.1.alpha.1'
60
- end
61
- ```
28
+ [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
62
29
 
63
30
  ## Notes
File without changes
File without changes
File without changes
@@ -3,7 +3,8 @@
3
3
  # extension-wmi-metrics.rb
4
4
  #
5
5
  # DESCRIPTION:
6
- # Collects a variety of system metrics every 10 seconds (by default).
6
+ # Collects a variety of system metrics every 60 seconds (by default).
7
+ # Network metrics are accumulated over the time interval.
7
8
  # Expects a "graphite" handler on the Sensu server, eg:
8
9
  #
9
10
  # OUTPUT:
@@ -29,6 +30,10 @@
29
30
  # NOTES:
30
31
  # Tested on Windows 2012RC2.
31
32
  #
33
+ # Changelog
34
+ # ----------
35
+ # 03/11/2015 - Alan Smith (@cloakedcode) added cumulative metric
36
+ # collection for network traffic over interval timespan.
32
37
  # LICENSE:
33
38
  # Copyright 2014 Heavy Water Operations, LLC.
34
39
  # Released under the same terms as Sensu (the MIT license); see LICENSE
@@ -62,17 +67,22 @@ module Sensu
62
67
  end
63
68
 
64
69
  def post_init
65
- @metrics = []
70
+ @metrics = {}
66
71
  @wmi = WIN32OLE.connect('winmgmts://')
72
+
73
+ # setup timer for cumulative metrics
74
+ EM.add_periodic_timer(1) do
75
+ network_interface_metrics do
76
+ end
77
+ end
78
+ true
67
79
  end
68
80
 
69
81
  def run
70
82
  memory_metrics do
71
83
  disk_metrics do
72
84
  cpu_metrics do
73
- network_interface_metrics do
74
- yield flush_metrics, 0
75
- end
85
+ yield flush_metrics, 0
76
86
  end
77
87
  end
78
88
  end
@@ -83,11 +93,10 @@ module Sensu
83
93
  def options
84
94
  return @options if @options
85
95
  @options = {
86
- interval: 10,
96
+ interval: 60,
87
97
  handler: 'graphite',
88
98
  add_client_prefix: true,
89
- path_prefix: 'WMI',
90
- prefix_at_start: 0
99
+ path_prefix: 'WMI'
91
100
  }
92
101
  if settings[:wmi_metrics].is_a?(Hash)
93
102
  @options.merge!(settings[:wmi_metrics])
@@ -96,19 +105,20 @@ module Sensu
96
105
  end
97
106
 
98
107
  def flush_metrics
99
- metrics = @metrics.join("\n") + "\n"
100
- @metrics = []
101
- metrics
108
+ metrics = @metrics.map { |k, v| [k, v, Time.now.to_i].join(' ') }
109
+ @metrics = {}
110
+ metrics.join("\n") + "\n"
102
111
  end
103
112
 
104
113
  def add_metric(*args) # rubocop:disable all
105
114
  value = args.pop
106
115
  path = []
107
- path << options[:path_prefix] if options[:prefix_at_start]
108
116
  path << settings[:client][:name] if options[:add_client_prefix]
109
- path << options[:path_prefix] unless options[:prefix_at_start]
117
+ path << options[:path_prefix]
110
118
  path = (path + args).join('.')
111
- @metrics << [path, value, Time.now.to_i].join(' ')
119
+
120
+ @metrics[path] = 0 if @metrics[path].nil?
121
+ @metrics[path] += value.to_i
112
122
  end
113
123
 
114
124
  def formatted_perf_data(provider, &_callback)
File without changes
File without changes
File without changes
@@ -8,7 +8,7 @@ module SensuPluginsWindows
8
8
  MINOR = 0
9
9
  PATCH = 1
10
10
 
11
- VER_STRING = [MAJOR, MINOR, PATCH, 'alpha.3'].compact.join('.')
11
+ VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
12
12
 
13
13
  NAME = 'sensu-plugins-windows'
14
14
  BANNER = "#{NAME} v%s"
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-windows
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha.3
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - Yieldbot, Inc. and contributors
7
+ - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-04-02 00:00:00.000000000 Z
33
+ date: 2015-05-21 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
@@ -64,16 +64,16 @@ dependencies:
64
64
  name: rubocop
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '='
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 0.17.0
69
+ version: '0.30'
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '='
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 0.17.0
76
+ version: '0.30'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: rspec
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -201,7 +201,10 @@ metadata:
201
201
  maintainer: ''
202
202
  development_status: active
203
203
  production_status: unstable - testing recommended
204
- post_install_message:
204
+ release_draft: 'false'
205
+ release_prerelease: 'false'
206
+ post_install_message: You can use the embedded Ruby by setting EMBEDDED_RUBY=true
207
+ in /etc/default/sensu
205
208
  rdoc_options: []
206
209
  require_paths:
207
210
  - lib
@@ -212,14 +215,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
215
  version: 1.9.3
213
216
  required_rubygems_version: !ruby/object:Gem::Requirement
214
217
  requirements:
215
- - - ">"
218
+ - - ">="
216
219
  - !ruby/object:Gem::Version
217
- version: 1.3.1
220
+ version: '0'
218
221
  requirements: []
219
222
  rubyforge_project:
220
- rubygems_version: 2.2.2
223
+ rubygems_version: 2.4.6
221
224
  signing_key:
222
225
  specification_version: 4
223
226
  summary: Sensu plugins for working with windows
224
227
  test_files: []
225
- has_rdoc:
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- tH+��L1s
2
- MKS4p�Z8�Z����1"ӏ[������o_R'�]���{��QW��x�ĕ+\���X1�ꮛn�Y�XW�
1
+ A�*�>�a=<���9Dp���#�����}[�\&��i6&�&.U�B���+K��$�d�9 ��?4��S����!)<�O Y_G�T����Գ m���E�$�����>f�#I�;�ac�GG;X����ҚϠ�s���C�Q棑 TXe�#wS ak�'�}��b�������$ߛK�dIc��,� �S�mk�ɨ�laA!�hХm�f�)̀��Tұ{�^�C%ǶN>S�|��Q����