sensu-plugins-iis-forked 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b467996f0457cfa2908e62dbf4d0605588991c59
4
+ data.tar.gz: b399a23a71f77626790670be0a75247f904c0529
5
+ SHA512:
6
+ metadata.gz: 11c6a7623336e3e6da23157c9be83caf9e405185e5e601bd48f51d12e58e258e500c636a54bf669d59b4160151295f7bb708b5d911f46fcf4849b829d680d403
7
+ data.tar.gz: 9dfa9bb57984f7377f7c4b88f59e50689bb69e82ef5039bc20bc324198966a01fd34051532c316eb253cb1757451d94e19a6c625f2187e44f9723775eccd0c9b
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ #Change Log
2
+ This project adheres to [Semantic Versioning](http://semver.org/).
3
+
4
+ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.0.2] - 2015-07-14
9
+ ### Changed
10
+ - updated sensu-plugin gem to 1.2.0
11
+
12
+ ## 0.0.1 - [2015-07-04]
13
+ ### Added
14
+ - initial release
15
+
16
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-iis/compare/0.0.2...HEAD
17
+ [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-iis/compare/0.0.1...0.0.2
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Sensu-Plugins
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,22 @@
1
+ ## Sensu-Plugins-iis
2
+
3
+ [ ![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-iis.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-iis)
4
+ [![Gem Version](https://badge.fury.io/rb/sensu-plugins-iis.svg)](http://badge.fury.io/rb/sensu-plugins-iis)
5
+ [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-iis/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-iis)
6
+ [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-iis/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-iis)
7
+ [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-iis.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-iis)
8
+
9
+ ## Functionality
10
+
11
+ ## Files
12
+ * bin/metrics-iis-get-requests.rb
13
+ * bin/metrics-iis-current-connections.rb
14
+ * bin/check-iis-current-connections.rb
15
+
16
+ ## Usage
17
+
18
+ ## Installation
19
+
20
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
21
+
22
+ ## Notes
@@ -0,0 +1,54 @@
1
+ #! /usr/bin/env ruby
2
+ #
3
+ # check-iis-current-connections
4
+ #
5
+ # DESCRIPTION:
6
+ #
7
+ # OUTPUT:
8
+ # plain text
9
+ #
10
+ # PLATFORMS:
11
+ # iis
12
+ #
13
+ # DEPENDENCIES:
14
+ # gem: sensu-plugin
15
+ #
16
+ # USAGE:
17
+ #
18
+ # NOTES:
19
+ # Tested on iis 2012RC2.
20
+ #
21
+ # LICENSE:
22
+ # Yohei Kawahara <inokara@gmail.com>
23
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
24
+ # for details.
25
+ #
26
+
27
+ require 'sensu-plugin/check/cli'
28
+
29
+ #
30
+ # Check IIS Current Connections
31
+ #
32
+ class CheckIisCurrentConnections < Sensu::Plugin::Check::CLI
33
+ option :warning,
34
+ short: '-w WARNING',
35
+ proc: proc(&:to_f),
36
+ default: 50
37
+
38
+ option :critical,
39
+ short: '-c CRITICAL',
40
+ proc: proc(&:to_f),
41
+ default: 150
42
+
43
+ option :site,
44
+ short: '-s sitename',
45
+ default: '_Total'
46
+
47
+ def run
48
+ io = IO.popen("typeperf -sc 1 \"Web Service(#{config[:site]})\\Current\ Connections\"")
49
+ current_connection = io.readlines[2].split(',')[1].delete('"').to_f
50
+ critical "Current Connectio at #{current_connection}" if current_connection > config[:critical]
51
+ warning "Current Connectio at #{current_connection}" if current_connection > config[:warning]
52
+ ok "Current Connection at #{current_connection}"
53
+ end
54
+ end
@@ -0,0 +1,50 @@
1
+ #! /usr/bin/env ruby
2
+ #
3
+ # metrics-iis-current-connections.rb
4
+ #
5
+ # DESCRIPTION:
6
+ #
7
+ # OUTPUT:
8
+ # metric data
9
+ #
10
+ # PLATFORMS:
11
+ # iis
12
+ #
13
+ # DEPENDENCIES:
14
+ # gem: sensu-plugin
15
+ #
16
+ # USAGE:
17
+ #
18
+ # NOTES:
19
+ # Tested on iis 2012RC2.
20
+ #
21
+ # LICENSE:
22
+ # Yohei Kawahara <inokara@gmail.com>
23
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
24
+ # for details.
25
+ #
26
+
27
+ require 'sensu-plugin/metric/cli'
28
+ require 'socket'
29
+
30
+ #
31
+ # IIS Current Connections Metric
32
+ #
33
+ class IisCurrentConnectionsMetric < Sensu::Plugin::Metric::CLI::Graphite
34
+ option :scheme,
35
+ description: 'Metric naming scheme, text to prepend to .$parent.$child',
36
+ long: '--scheme SCHEME',
37
+ default: "#{Socket.gethostname}.iis_current_connections"
38
+
39
+ option :site,
40
+ short: '-s sitename',
41
+ default: '_Total'
42
+
43
+ def run
44
+ io = IO.popen("typeperf -sc 2 \"Web Service(#{config[:site]})\\Current\ Connections\"")
45
+ current_connection = io.readlines[3].split(',')[1].delete('"').to_f
46
+
47
+ output [config[:scheme], config[:site]].join('.'), current_connection
48
+ ok
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ #! /usr/bin/env ruby
2
+ #
3
+ # metrics-iis-get-requests.rb
4
+ #
5
+ # DESCRIPTION:
6
+ #
7
+ # OUTPUT:
8
+ # metric data
9
+ #
10
+ # PLATFORMS:
11
+ # iis
12
+ #
13
+ # DEPENDENCIES:
14
+ # gem: sensu-plugin
15
+ #
16
+ # USAGE:
17
+ #
18
+ # NOTES:
19
+ # Tested on iis 2012RC2.
20
+ #
21
+ # LICENSE:
22
+ # Yohei Kawahara <inokara@gmail.com>
23
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
24
+ # for details.
25
+ #
26
+
27
+ require 'sensu-plugin/metric/cli'
28
+ require 'socket'
29
+
30
+ #
31
+ # IIS Get Requests
32
+ #
33
+ class IisGetRequests < Sensu::Plugin::Metric::CLI::Graphite
34
+ option :scheme,
35
+ description: 'Metric naming scheme, text to prepend to .$parent.$child',
36
+ long: '--scheme SCHEME',
37
+ default: "#{Socket.gethostname}.iis_get_requests"
38
+
39
+ option :site,
40
+ short: '-s sitename',
41
+ default: '_Total'
42
+
43
+ def run
44
+ io = IO.popen("typeperf -sc 1 \"Web Service(#{config[:site]})\\Get\ Requests\/sec\"")
45
+ get_requests = io.readlines[2].split(',')[1].delete('"').to_f
46
+
47
+ output [config[:scheme], config[:site]].join('.'), get_requests
48
+ ok
49
+ end
50
+ end
@@ -0,0 +1 @@
1
+ require 'sensu-plugins-iis/version'
@@ -0,0 +1,9 @@
1
+ module SensuPluginsIIS
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 0
5
+ PATCH = 3
6
+
7
+ VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,200 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sensu-plugins-iis-forked
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Sensu-Plugins and contributors
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sensu-plugin
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: codeclimate-test-reporter
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.4'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.4'
55
+ - !ruby/object:Gem::Dependency
56
+ name: github-markup
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.10'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.10'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '10.5'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '10.5'
97
+ - !ruby/object:Gem::Dependency
98
+ name: redcarpet
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.40.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.40.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.4'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.4'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.8'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.8'
153
+ description: Sensu plugins for Microsoft IIS
154
+ email: "<sensu-users@googlegroups.com>"
155
+ executables:
156
+ - check-iis-current-connections.rb
157
+ - metrics-iis-current-connections.rb
158
+ - metrics-iis-get-requests.rb
159
+ extensions: []
160
+ extra_rdoc_files: []
161
+ files:
162
+ - CHANGELOG.md
163
+ - LICENSE
164
+ - README.md
165
+ - bin/check-iis-current-connections.rb
166
+ - bin/metrics-iis-current-connections.rb
167
+ - bin/metrics-iis-get-requests.rb
168
+ - lib/sensu-plugins-iis.rb
169
+ - lib/sensu-plugins-iis/version.rb
170
+ homepage: https://github.com/sensu-plugins/sensu-plugins-iis
171
+ licenses:
172
+ - MIT
173
+ metadata:
174
+ maintainer: maraca
175
+ development_status: active
176
+ production_status: unstable - testing recommended
177
+ release_draft: 'false'
178
+ release_prerelease: 'false'
179
+ post_install_message: You can use the embedded Ruby by setting EMBEDDED_RUBY=true
180
+ in /etc/default/sensu
181
+ rdoc_options: []
182
+ require_paths:
183
+ - lib
184
+ required_ruby_version: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: 1.9.3
189
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ requirements: []
195
+ rubyforge_project:
196
+ rubygems_version: 2.6.10
197
+ signing_key:
198
+ specification_version: 4
199
+ summary: Sensu plugins for Microsoft IIS
200
+ test_files: []