opennebula_nagios_probe 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmU0ZDE5MTZkYzUyMGVhMjNlNDJhZjU4YTA4MzQ4ZTE5YzI4ODllNQ==
4
+ YjI0NGIyZjQ4NDM4OTI5YWYwOTUwZjMwOGRjNGUxYmY1YWFmNmJlYg==
5
5
  data.tar.gz: !binary |-
6
- NjM5MDdmZDUwZTE5MDBhNzBhNzc2NTNmOWZlOTUwZDI3MmQ5OWU4Mg==
6
+ ZjJhYTM2MTMwM2NiZjc2MGM4ZmQyZGI1ZjYxMDA4NzQzOTBhMjc0NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTg0NjhmMTFmMzFjMWM1OWQyZGM2ZGIxYmY5ODhiOGRkMzBiOGRlZmVmMGMx
10
- OTRhYWU3NWMyZDJkOTQ1OTYyMmRkZWMxZWM5YTdmZmMzNGU4NWUzYmFlNWNm
11
- YWZjYzg5MDk1OTJhZmUyMTBlYzhmMDU2Yzk3ZDg2NjVkNjFmNGM=
9
+ YWFkZTM1ZTk3NmI1MmZmYTE3ZTY1NWQ1NTI5YTI4NTNkMzk5YzYwMGYzMTdh
10
+ ZmFjYmJhNWFiYjE2MGU2NjE1NWFkNjVjMGM0MGM4M2E4YjM2ZGIzYTllMGUz
11
+ NDViNDgyZGNiZDg0NmQxNmI5YWFmOGQxOWQ2ZWY1MDUzZmU1NmE=
12
12
  data.tar.gz: !binary |-
13
- ZGVlYzkwOWUyZDQ0YTUzNmFhNTdlODk5Y2YwNDZiZTNjNDM4NjBjNGIzOGNi
14
- N2U0NTlhODAzZjEwNTExMWJlMDJjMDhmNWY2OGFkNzZiZWFkZDBlZTM1MjBk
15
- MTFiNjYwNzUzODVmMDI1OGY2YzQyMTBlNGRkOGNiOTY1ZDQ5Mjc=
13
+ NjlkNTI4MDExMzEwNDI3NGIxMDZmNzYxODc5Mjg0ZmU3M2RkNWQ5NzJmMmUz
14
+ YTFlM2JmODJjZDNmYjhiNWI5ZDVjYzdhMDJmZWYyMmIxZTQwNjZjYjkwNzY0
15
+ YzY5MGNhZmMyMTJmYjhkNDY1NThkZjM0NTVhNGMxODdkNWI4ZWE=
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  .idea/
4
4
  .bundle/
5
5
  build/
6
+ Gemfile.lock
data/Gemfile CHANGED
@@ -1,18 +1,12 @@
1
- ##
2
1
  source "http://rubygems.org"
3
- ##
4
2
 
5
- gem "nagios-probe"
6
- gem "log4r"
7
- gem "amazon-ec2"
8
- gem "multipart-post"
9
- gem "rake"
10
- gem "occi-cli"
11
- gem "opennebula-oca"
12
- gem "occi-api", "~> 4.2"
3
+ gemspec
13
4
 
14
- group :test do
15
- gem "rspec"
16
- gem "vcr"
17
- gem "webmock", "~>1.9.3"
5
+ group :development do
6
+ gem 'rubygems-tasks', :git => 'git://github.com/postmodern/rubygems-tasks.git'
7
+ gem 'rspec', '~> 2.14'
8
+ gem 'webmock', '~> 1.9'
9
+ gem 'vcr', '~> 2.8'
10
+ gem 'rake', '~> 10.1'
11
+ gem 'bundler', '~> 1.3'
18
12
  end
@@ -19,6 +19,7 @@
19
19
  require 'bundler/setup'
20
20
  require 'log4r'
21
21
 
22
+ # include proxy
22
23
  require File.expand_path('..', __FILE__) +'/../lib/opennebula_nagios_probe'
23
24
 
24
25
  begin
@@ -28,13 +29,13 @@ begin
28
29
  # instantiate a probe
29
30
  case options.service
30
31
  when :oned
31
- probe = OpenNebulaOnedProbe.new(options)
32
+ probe = OpennebulaOnedProbe.new(options)
32
33
  logger = Log4r::Logger.new 'OpenNebulaOnedProbe'
33
34
  when :occi, :rocci
34
- probe = OpenNebulaOcciProbe.new(options)
35
+ probe = OpennebulaOcciProbe.new(options)
35
36
  logger = Log4r::Logger.new 'OpenNebulaOcciProbe'
36
37
  when :econe
37
- probe = OpenNebulaEconeProbe.new(options)
38
+ probe = OpennebulaEconeProbe.new(options)
38
39
  logger = Log4r::Logger.new 'OpenNebulaEconeProbe'
39
40
  end
40
41
 
@@ -43,8 +44,6 @@ begin
43
44
  probe.logger = logger
44
45
 
45
46
  case options.debug_level
46
- when 0
47
- logger.level = Log4r::FATAL
48
47
  when 1
49
48
  logger.level = Log4r::ERROR
50
49
  when 2
@@ -26,4 +26,8 @@ require 'opennebula_probe'
26
26
  require 'optparse_nagios_probe'
27
27
  require 'opennebula_oned_probe'
28
28
  require 'opennebula_occi_probe'
29
- require 'opennebula_econe_probe'
29
+ require 'opennebula_econe_probe'
30
+
31
+ module OpennebulaNagiosProbe
32
+ VERSION = "1.0.1" unless defined?(::OpennebulaNagiosProbe::VERSION)
33
+ end
@@ -17,9 +17,9 @@ require 'opennebula_probe'
17
17
  require 'AWS'
18
18
  require 'digest/sha1'
19
19
 
20
- # OpenNebulaEconeProbe - Econe client query service implementation.
20
+ # OpennebulaEconeProbe - Econe client query service implementation.
21
21
 
22
- class OpenNebulaEconeProbe < OpennebulaProbe
22
+ class OpennebulaEconeProbe < OpennebulaProbe
23
23
  def initialize(opts)
24
24
  super(opts)
25
25
 
@@ -16,9 +16,9 @@
16
16
  require 'opennebula_probe'
17
17
  require 'occi/client'
18
18
 
19
- # OpenNebulaOcciProbe - OCCI client query service implementation.
19
+ # OpennebulaOcciProbe - OCCI client query service implementation.
20
20
 
21
- class OpenNebulaOcciProbe < OpennebulaProbe
21
+ class OpennebulaOcciProbe < OpennebulaProbe
22
22
  def initialize(opts)
23
23
  super(opts)
24
24
 
@@ -18,9 +18,9 @@ require 'opennebula'
18
18
 
19
19
  include OpenNebula
20
20
 
21
- # OpenNebulaOnedProbe - XML-RPC ONED client query service implementation.
21
+ # OpennebulaOnedProbe - XML-RPC ONED client query service implementation.
22
22
 
23
- class OpenNebulaOnedProbe < OpennebulaProbe
23
+ class OpennebulaOnedProbe < OpennebulaProbe
24
24
  FAILED_CONNECTIVITY = 'Failed to check connectivity: '
25
25
  FAILED_RESOURCE = 'Failed to check resource availability: '
26
26
 
@@ -19,7 +19,6 @@ require 'ostruct'
19
19
  # OptparseNagiosProbe - opennebula-nagios probes ARGV parser class.
20
20
 
21
21
  class OptparseNagiosProbe
22
- VERSION = 0.99
23
22
 
24
23
  def self.parse(args)
25
24
  options = OpenStruct.new
@@ -151,7 +150,7 @@ class OptparseNagiosProbe
151
150
  end
152
151
 
153
152
  opts.on_tail('--version', 'Show version') do
154
- puts VERSION
153
+ puts OpennebulaNagiosProbe::VERSION
155
154
  exit!
156
155
  end
157
156
 
@@ -1,8 +1,11 @@
1
1
  # coding: utf-8
2
+ lib = File.expand_path('../lib/', __FILE__)
3
+ $:.unshift lib unless $:.include?(lib)
4
+ require 'opennebula_nagios_probe'
2
5
 
3
6
  Gem::Specification.new do |gem|
4
7
  gem.name = 'opennebula_nagios_probe'
5
- gem.version = '1.0.0'
8
+ gem.version = OpennebulaNagiosProbe::VERSION
6
9
  gem.authors = ['Boris Parak', 'Filip Hubik', 'Michal Kimle' ]
7
10
  gem.email = ['parak@cesnet.cz', 'hubik@ics.muni.cz', 'kimle.michal@gmail.com']
8
11
  gem.description = %q{This gem is collection of nagios probes (one, econe, occi, rocci) for OpenNebula cloud platform}
@@ -15,18 +18,12 @@ Gem::Specification.new do |gem|
15
18
  gem.require_paths = ['lib']
16
19
  gem.executables = ['check_opennebula']
17
20
 
18
- gem.add_dependency 'nagios-probe', '~> 0.1'
19
- gem.add_dependency 'log4r', '~> 1.1'
20
- gem.add_dependency 'amazon-ec2', '~> 0.9'
21
- gem.add_dependency 'occi-cli', '~> 4.2'
21
+ gem.add_dependency 'nagios-probe', '~> 0.1'
22
+ gem.add_dependency 'log4r', '~> 1.1'
23
+ gem.add_dependency 'amazon-ec2', '~> 0.9'
24
+ gem.add_dependency 'occi-cli', '~> 4.2'
22
25
  gem.add_dependency 'opennebula-oca', '~> 4.4'
23
- gem.add_dependency 'occi-api', '~> 4.2'
26
+ gem.add_dependency 'occi-api', '~> 4.2'
24
27
 
25
- gem.add_development_dependency 'rspec', '~> 2.14'
26
- gem.add_development_dependency 'webmock', '~> 1.9'
27
- gem.add_development_dependency 'vcr', '~> 2.8'
28
- gem.add_development_dependency 'rake', '~> 10.1'
29
- gem.add_development_dependency 'bundler', '~> 1.3'
30
-
31
- gem.required_ruby_version = '>= 1.9.3'
28
+ gem.required_ruby_version = '>= 1.9.3'
32
29
  end
@@ -27,7 +27,7 @@ require 'ostruct'
27
27
 
28
28
  require 'opennebula_econe_probe'
29
29
 
30
- RSpec::Core::DSL.describe OpenNebulaEconeProbe do
30
+ RSpec::Core::DSL.describe OpennebulaEconeProbe do
31
31
  before do
32
32
  WebMock.disable_net_connect! allow: 'localhost'
33
33
 
@@ -55,7 +55,7 @@ RSpec::Core::DSL.describe OpenNebulaEconeProbe do
55
55
 
56
56
  context 'with no resources' do
57
57
  before :each do
58
- @probe = OpenNebulaEconeProbe.new(@options)
58
+ @probe = OpennebulaEconeProbe.new(@options)
59
59
  @probe.logger = @logger
60
60
  end
61
61
 
@@ -88,7 +88,7 @@ RSpec::Core::DSL.describe OpenNebulaEconeProbe do
88
88
  @options.storage = %w(ami-00000006 ami-00000007)
89
89
  @options.compute = %w(11)
90
90
 
91
- @probe = OpenNebulaEconeProbe.new(@options)
91
+ @probe = OpennebulaEconeProbe.new(@options)
92
92
  @probe.logger = @logger
93
93
  end
94
94
 
@@ -121,7 +121,7 @@ RSpec::Core::DSL.describe OpenNebulaEconeProbe do
121
121
  @options.storage = %w(ami-00000126 ami-00000127)
122
122
  @options.compute = %w(22)
123
123
 
124
- @probe = OpenNebulaEconeProbe.new(@options)
124
+ @probe = OpennebulaEconeProbe.new(@options)
125
125
  @probe.logger = @logger
126
126
  end
127
127
 
@@ -25,7 +25,7 @@ require 'ostruct'
25
25
 
26
26
  require 'opennebula_occi_probe'
27
27
 
28
- RSpec::Core::DSL.describe OpenNebulaOcciProbe do
28
+ RSpec::Core::DSL.describe OpennebulaOcciProbe do
29
29
  before do
30
30
  WebMock.disable_net_connect! allow: 'localhost'
31
31
 
@@ -52,7 +52,7 @@ RSpec::Core::DSL.describe OpenNebulaOcciProbe do
52
52
 
53
53
  context 'with no resources' do
54
54
  before :each do
55
- @probe = OpenNebulaOcciProbe.new(@options)
55
+ @probe = OpennebulaOcciProbe.new(@options)
56
56
  @probe.logger = @logger
57
57
  end
58
58
 
@@ -86,7 +86,7 @@ RSpec::Core::DSL.describe OpenNebulaOcciProbe do
86
86
  @options.storage = %w(6 7)
87
87
  @options.compute = %w(11)
88
88
 
89
- @probe = OpenNebulaOcciProbe.new(@options)
89
+ @probe = OpennebulaOcciProbe.new(@options)
90
90
  @probe.logger = @logger
91
91
  end
92
92
 
@@ -120,7 +120,7 @@ RSpec::Core::DSL.describe OpenNebulaOcciProbe do
120
120
  @options.storage = %w(126 127)
121
121
  @options.compute = %w(22)
122
122
 
123
- @probe = OpenNebulaOcciProbe.new(@options)
123
+ @probe = OpennebulaOcciProbe.new(@options)
124
124
  @probe.logger = @logger
125
125
  end
126
126
 
@@ -26,7 +26,7 @@ require 'opennebula'
26
26
 
27
27
  require 'opennebula_oned_probe'
28
28
 
29
- RSpec::Core::DSL.describe OpenNebulaOnedProbe do
29
+ RSpec::Core::DSL.describe OpennebulaOnedProbe do
30
30
  before do
31
31
  WebMock.disable_net_connect! allow: 'localhost'
32
32
 
@@ -57,7 +57,7 @@ RSpec::Core::DSL.describe OpenNebulaOnedProbe do
57
57
 
58
58
  context 'with no resources' do
59
59
  before :each do
60
- @probe = OpenNebulaOnedProbe.new(@options)
60
+ @probe = OpennebulaOnedProbe.new(@options)
61
61
  @probe.logger = @logger
62
62
  end
63
63
 
@@ -91,7 +91,7 @@ RSpec::Core::DSL.describe OpenNebulaOnedProbe do
91
91
  @options.storage = %w(6 7)
92
92
  @options.compute = %w(11)
93
93
 
94
- @probe = OpenNebulaOnedProbe.new(@options)
94
+ @probe = OpennebulaOnedProbe.new(@options)
95
95
  @probe.logger = @logger
96
96
  end
97
97
 
@@ -125,7 +125,7 @@ RSpec::Core::DSL.describe OpenNebulaOnedProbe do
125
125
  @options.storage = %w(126 127)
126
126
  @options.compute = %w(22)
127
127
 
128
- @probe = OpenNebulaOnedProbe.new(@options)
128
+ @probe = OpennebulaOnedProbe.new(@options)
129
129
  @probe.logger = @logger
130
130
  end
131
131
 
@@ -26,7 +26,7 @@ require 'ostruct'
26
26
 
27
27
  require 'opennebula_occi_probe'
28
28
 
29
- RSpec::Core::DSL.describe OpenNebulaOcciProbe do
29
+ RSpec::Core::DSL.describe OpennebulaOcciProbe do
30
30
  before do
31
31
  WebMock.disable_net_connect! allow: 'localhost'
32
32
 
@@ -54,7 +54,7 @@ RSpec::Core::DSL.describe OpenNebulaOcciProbe do
54
54
 
55
55
  context 'with no resources' do
56
56
  before :each do
57
- @probe = OpenNebulaOcciProbe.new(@options)
57
+ @probe = OpennebulaOcciProbe.new(@options)
58
58
  @probe.logger = @logger
59
59
  end
60
60
 
@@ -92,7 +92,7 @@ RSpec::Core::DSL.describe OpenNebulaOcciProbe do
92
92
  # @options.storage = []
93
93
  @options.compute = %w(4016)
94
94
 
95
- @probe = OpenNebulaOcciProbe.new(@options)
95
+ @probe = OpennebulaOcciProbe.new(@options)
96
96
  @probe.logger = @logger
97
97
  end
98
98
 
@@ -127,7 +127,7 @@ RSpec::Core::DSL.describe OpenNebulaOcciProbe do
127
127
  # @options.storage = ['126', '127']
128
128
  @options.compute = %w(8192)
129
129
 
130
- @probe = OpenNebulaOcciProbe.new(@options)
130
+ @probe = OpennebulaOcciProbe.new(@options)
131
131
  @probe.logger = @logger
132
132
  end
133
133
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula_nagios_probe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Parak
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-03 00:00:00.000000000 Z
13
+ date: 2014-03-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nagios-probe
@@ -96,76 +96,6 @@ dependencies:
96
96
  - - ~>
97
97
  - !ruby/object:Gem::Version
98
98
  version: '4.2'
99
- - !ruby/object:Gem::Dependency
100
- name: rspec
101
- requirement: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ~>
104
- - !ruby/object:Gem::Version
105
- version: '2.14'
106
- type: :development
107
- prerelease: false
108
- version_requirements: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ~>
111
- - !ruby/object:Gem::Version
112
- version: '2.14'
113
- - !ruby/object:Gem::Dependency
114
- name: webmock
115
- requirement: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ~>
118
- - !ruby/object:Gem::Version
119
- version: '1.9'
120
- type: :development
121
- prerelease: false
122
- version_requirements: !ruby/object:Gem::Requirement
123
- requirements:
124
- - - ~>
125
- - !ruby/object:Gem::Version
126
- version: '1.9'
127
- - !ruby/object:Gem::Dependency
128
- name: vcr
129
- requirement: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- version: '2.8'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- requirements:
138
- - - ~>
139
- - !ruby/object:Gem::Version
140
- version: '2.8'
141
- - !ruby/object:Gem::Dependency
142
- name: rake
143
- requirement: !ruby/object:Gem::Requirement
144
- requirements:
145
- - - ~>
146
- - !ruby/object:Gem::Version
147
- version: '10.1'
148
- type: :development
149
- prerelease: false
150
- version_requirements: !ruby/object:Gem::Requirement
151
- requirements:
152
- - - ~>
153
- - !ruby/object:Gem::Version
154
- version: '10.1'
155
- - !ruby/object:Gem::Dependency
156
- name: bundler
157
- requirement: !ruby/object:Gem::Requirement
158
- requirements:
159
- - - ~>
160
- - !ruby/object:Gem::Version
161
- version: '1.3'
162
- type: :development
163
- prerelease: false
164
- version_requirements: !ruby/object:Gem::Requirement
165
- requirements:
166
- - - ~>
167
- - !ruby/object:Gem::Version
168
- version: '1.3'
169
99
  description: This gem is collection of nagios probes (one, econe, occi, rocci) for
170
100
  OpenNebula cloud platform
171
101
  email:
@@ -181,7 +111,6 @@ files:
181
111
  - .rubocop.yml
182
112
  - .travis.yml
183
113
  - Gemfile
184
- - Gemfile.lock
185
114
  - README.md
186
115
  - Rakefile
187
116
  - bin/check_opennebula
@@ -1,87 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- activesupport (4.0.2)
5
- i18n (~> 0.6, >= 0.6.4)
6
- minitest (~> 4.2)
7
- multi_json (~> 1.3)
8
- thread_safe (~> 0.1)
9
- tzinfo (~> 0.3.37)
10
- addressable (2.3.5)
11
- amazon-ec2 (0.9.17)
12
- xml-simple (>= 1.0.12)
13
- atomic (1.1.14)
14
- crack (0.4.2)
15
- safe_yaml (~> 1.0.0)
16
- diff-lcs (1.2.5)
17
- hashie (2.0.5)
18
- highline (1.6.20)
19
- httparty (0.13.0)
20
- json (~> 1.8)
21
- multi_xml (>= 0.5.2)
22
- i18n (0.6.9)
23
- json (1.8.1)
24
- log4r (1.1.10)
25
- mini_portile (0.5.2)
26
- minitest (4.7.5)
27
- multi_json (1.8.4)
28
- multi_xml (0.5.5)
29
- multipart-post (2.0.0)
30
- nagios-probe (0.1.2)
31
- nokogiri (1.6.1)
32
- mini_portile (~> 0.5.0)
33
- occi-api (4.2.0)
34
- httparty
35
- json
36
- occi-core (~> 4.2.10)
37
- occi-cli (4.2.0)
38
- highline
39
- json
40
- occi-api (~> 4.2.0)
41
- occi-core (4.2.10)
42
- activesupport (~> 4.0.0)
43
- hashie
44
- json
45
- settingslogic
46
- uuidtools (>= 2.1.3)
47
- opennebula (4.4.0)
48
- json
49
- nokogiri
50
- opennebula-oca (4.4.0)
51
- opennebula (= 4.4.0)
52
- rake (10.1.1)
53
- rspec (2.14.1)
54
- rspec-core (~> 2.14.0)
55
- rspec-expectations (~> 2.14.0)
56
- rspec-mocks (~> 2.14.0)
57
- rspec-core (2.14.7)
58
- rspec-expectations (2.14.5)
59
- diff-lcs (>= 1.1.3, < 2.0)
60
- rspec-mocks (2.14.5)
61
- safe_yaml (1.0.1)
62
- settingslogic (2.0.9)
63
- thread_safe (0.1.3)
64
- atomic
65
- tzinfo (0.3.38)
66
- uuidtools (2.1.4)
67
- vcr (2.8.0)
68
- webmock (1.9.3)
69
- addressable (>= 2.2.7)
70
- crack (>= 0.3.2)
71
- xml-simple (1.1.3)
72
-
73
- PLATFORMS
74
- ruby
75
-
76
- DEPENDENCIES
77
- amazon-ec2
78
- log4r
79
- multipart-post
80
- nagios-probe
81
- occi-api (~> 4.2)
82
- occi-cli
83
- opennebula-oca
84
- rake
85
- rspec
86
- vcr
87
- webmock (~> 1.9.3)