nagios-promoo 0.0.5 → 0.0.6
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 +4 -4
- data/lib/nagios/promoo/appdb/probes/appliances_probe.rb +1 -1
- data/lib/nagios/promoo/appdb/probes/base_probe.rb +2 -2
- data/lib/nagios/promoo/appdb/probes/sizes_probe.rb +1 -1
- data/lib/nagios/promoo/appdb/probes/vmcatcher_probe.rb +1 -1
- data/lib/nagios/promoo/occi/probes/categories_probe.rb +1 -1
- data/lib/nagios/promoo/occi/probes/compute_probe.rb +6 -6
- data/lib/nagios/promoo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76dff93f07782caaba45b356e3aeef9861565a29
|
4
|
+
data.tar.gz: 11f4809f563ca467f4d6010eb1771faf00d5f0f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f335f41c43a7c827935c8c5eb4a5ab6a72b4d2989d99ec84d1b2d6155180ff78456f7b0e8269958b6e3421299fad652ebb986478fa80cbb12a38ca6b1dafcc1e
|
7
|
+
data.tar.gz: 0090b8d4b2f7685f451a2714d47cc430dbe6072a1d29d9a977dec8a449b615b2f8abb8a5d5ed1f969c5f9ea6b0e09c911b1ea9ac92596a50e73686a21f61cc37
|
@@ -35,6 +35,6 @@ class Nagios::Promoo::Appdb::Probes::AppliancesProbe < Nagios::Promoo::Appdb::Pr
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def check_appliances(options)
|
38
|
-
[appdb_provider(options)['image']].flatten.compact.count
|
38
|
+
[appdb_provider(options)['provider:image']].flatten.compact.count
|
39
39
|
end
|
40
40
|
end
|
@@ -13,8 +13,8 @@ class Nagios::Promoo::Appdb::Probes::BaseProbe
|
|
13
13
|
fail "Could not get site"\
|
14
14
|
"details from AppDB [#{response.code}]" unless response.success?
|
15
15
|
|
16
|
-
@provider = response.parsed_response['broker']['reply']['appdb']['provider'].select do |prov|
|
17
|
-
prov['endpoint_url'] && (prov['endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
|
16
|
+
@provider = response.parsed_response['appdb:broker']['appdb:reply']['appdb:appdb']['virtualization:provider'].select do |prov|
|
17
|
+
prov['provider:endpoint_url'] && (prov['provider:endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
|
18
18
|
end.first
|
19
19
|
fail "Could not locate site by endpoint #{options[:endpoint].inspect} in AppDB" unless @provider
|
20
20
|
|
@@ -35,6 +35,6 @@ class Nagios::Promoo::Appdb::Probes::SizesProbe < Nagios::Promoo::Appdb::Probes:
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def check_sizes(options)
|
38
|
-
[appdb_provider(options)['template']].flatten.compact.count
|
38
|
+
[appdb_provider(options)['provider:template']].flatten.compact.count
|
39
39
|
end
|
40
40
|
end
|
@@ -79,7 +79,7 @@ class Nagios::Promoo::Appdb::Probes::VmcatcherProbe < Nagios::Promoo::Appdb::Pro
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def provider_appliances(options)
|
82
|
-
images = [appdb_provider(options)['image']].flatten.compact
|
82
|
+
images = [appdb_provider(options)['provider:image']].flatten.compact
|
83
83
|
images.collect { |image| image['mp_uri'] }.reject { |mpuri| mpuri.blank? }
|
84
84
|
end
|
85
85
|
|
@@ -6,7 +6,7 @@ require File.join(File.dirname(__FILE__), 'mixins_probe')
|
|
6
6
|
class Nagios::Promoo::Occi::Probes::CategoriesProbe < Nagios::Promoo::Occi::Probes::BaseProbe
|
7
7
|
class << self
|
8
8
|
def description
|
9
|
-
['categories', 'Run a probe checking for mandatory OCCI
|
9
|
+
['categories', 'Run a probe checking for mandatory OCCI category definitions']
|
10
10
|
end
|
11
11
|
|
12
12
|
def options
|
@@ -110,7 +110,7 @@ class Nagios::Promoo::Occi::Probes::ComputeProbe < Nagios::Promoo::Occi::Probes:
|
|
110
110
|
|
111
111
|
def appdb_appliance(options)
|
112
112
|
appliance = nil
|
113
|
-
appliance = [appdb_provider(options)['image']].flatten.compact.select do |image|
|
113
|
+
appliance = [appdb_provider(options)['provider:image']].flatten.compact.select do |image|
|
114
114
|
image['mp_uri'] && (normalize_mpuri(image['mp_uri']) == normalize_mpuri(options[:mpuri]))
|
115
115
|
end.first
|
116
116
|
fail "Site does not have an appliance with MPURI "\
|
@@ -121,10 +121,10 @@ class Nagios::Promoo::Occi::Probes::ComputeProbe < Nagios::Promoo::Occi::Probes:
|
|
121
121
|
|
122
122
|
def appdb_smallest_size(options)
|
123
123
|
sizes = []
|
124
|
-
[appdb_provider(options)['template']].flatten.compact.each do |template|
|
124
|
+
[appdb_provider(options)['provider:template']].flatten.compact.each do |template|
|
125
125
|
sizes << [
|
126
|
-
template['resource_name'].split('#').last,
|
127
|
-
template['main_memory_size'].to_i + (template['physical_cpus'].to_i * CPU_SUM_WEIGHT)
|
126
|
+
template['provider_template:resource_name'].split('#').last,
|
127
|
+
template['provider_template:main_memory_size'].to_i + (template['provider_template:physical_cpus'].to_i * CPU_SUM_WEIGHT)
|
128
128
|
]
|
129
129
|
end
|
130
130
|
fail "No appliance sizes available in AppDB" if sizes.blank?
|
@@ -143,8 +143,8 @@ class Nagios::Promoo::Occi::Probes::ComputeProbe < Nagios::Promoo::Occi::Probes:
|
|
143
143
|
response.parsed_response
|
144
144
|
end
|
145
145
|
|
146
|
-
@provider = parsed_response['broker']['reply']['appdb']['provider'].select do |prov|
|
147
|
-
prov['endpoint_url'] && (prov['endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
|
146
|
+
@provider = parsed_response['appdb:broker']['appdb:reply']['appdb:appdb']['virtualization:provider'].select do |prov|
|
147
|
+
prov['provider:endpoint_url'] && (prov['provider:endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
|
148
148
|
end.first
|
149
149
|
fail "Could not locate site by endpoint #{options[:endpoint].inspect} in AppDB" unless @provider
|
150
150
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagios-promoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Parak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: occi-api
|
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
284
284
|
version: '0'
|
285
285
|
requirements: []
|
286
286
|
rubyforge_project:
|
287
|
-
rubygems_version: 2.4.
|
287
|
+
rubygems_version: 2.4.8
|
288
288
|
signing_key:
|
289
289
|
specification_version: 4
|
290
290
|
summary: Nagios Probes for Monitoring OpenNebula and OCCI
|