nagira 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +3 -0
- data/Rakefile +1 -7
- data/app/get/status/hostgroups.rb +29 -35
- data/app/put/host.rb +4 -5
- data/config/environment.rb +2 -1
- data/config/puma.rb +7 -0
- data/lib/nagira.rb +0 -3
- data/lib/tasks/config.rake +11 -12
- data/lib/tasks/debug.rake +7 -7
- data/lib/tasks/doc.rake +1 -1
- data/spec/00_configuration_spec.rb +0 -2
- data/spec/01_data_format/01_nagira_response_spec.rb +0 -1
- data/spec/01_data_format/02_0_status_spec.rb +0 -2
- data/spec/01_data_format/02_nagira_data_spec.rb +0 -2
- data/spec/01_data_format/03_api_spec.rb +0 -2
- data/spec/get/get_helper.rb +50 -0
- data/spec/get/{comments_spec.rb → status/comments_spec.rb} +0 -1
- data/spec/get/{endpoints_spec.rb → status/endpoints_spec.rb} +2 -1
- data/spec/get/{hostgroup.rb → status/hostgroup.rb} +0 -1
- data/spec/get/{hosts_spec.rb → status/hosts_spec.rb} +0 -3
- data/spec/get/{services_spec.rb → status/services_spec.rb} +0 -1
- data/spec/put/host_spec.rb +2 -1
- data/spec/put/status_spec.rb +2 -1
- data/spec/spec_helper.rb +10 -0
- data/version.txt +1 -1
- metadata +54 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e09ff94870be35304fdfb687e5fc6047f95b6ca
|
4
|
+
data.tar.gz: b03938f74c6fbba6618249cd189f0f5346ce562e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b94672b041d55420637a30975f0b8e9ad5781b2f84ad6b47906d0257d9ddfe265615e49e4d150bf409236d783d9ba7fde62ef95101155a658a569e77af869c6d
|
7
|
+
data.tar.gz: 59059bccbcdbb2a6b103bef6f8b4d6c7a37540039ad949eece266e12b4dc6607566cb62cc855cf27c6a68b536b063494a3b0637631e31d1a8ed00e90d0349e61
|
data/History.md
CHANGED
data/Rakefile
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require_relative 'lib/nagira'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
Dir.glob(File.join($nagira_root, 'lib', 'tasks','*.rake')).each do |rake|
|
4
|
+
Dir.glob(File.join(Nagira.root, 'lib', 'tasks','*.rake')).each do |rake|
|
7
5
|
load rake
|
8
6
|
end
|
9
7
|
|
10
8
|
def log_user msg
|
11
9
|
puts "#{Time.now} -- #{msg.chomp}"
|
12
10
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
@@ -8,42 +8,36 @@ class Nagira < Sinatra::Base
|
|
8
8
|
#
|
9
9
|
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
#
|
22
|
-
get "/:hostgroup" do |hostgroup|
|
23
|
-
@data = Hostgroup.new(hostgroup).full
|
24
|
-
nil
|
25
|
-
end
|
11
|
+
##
|
12
|
+
# @method get_status_hostgroup
|
13
|
+
#
|
14
|
+
# Return full status of the hostgroup: including host status and
|
15
|
+
# service status.
|
16
|
+
#
|
17
|
+
get "/_status/_hostgroup/:hostgroup" do |hostgroup|
|
18
|
+
@data = Hostgroup.new(hostgroup).full
|
19
|
+
nil
|
20
|
+
end
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
22
|
+
##
|
23
|
+
# @method get_status_hostgroup_service
|
24
|
+
#
|
25
|
+
# Endpoint:
|
26
|
+
# - GET /_status/_hostgroup/:hostgroup/_service
|
27
|
+
#
|
28
|
+
get "/_status/_hostgroup/:hostgroup/_service" do |hostgroup|
|
29
|
+
@data = Hostgroup.new(hostgroup).service_status
|
30
|
+
nil
|
31
|
+
end
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
33
|
+
##
|
34
|
+
# @method get_status_hostgroup_host
|
35
|
+
# @overload get("/_status/_hostgroup/:hostgroup/_host")
|
36
|
+
#
|
37
|
+
# Endpoint:
|
38
|
+
# - GET /_status/_hostgroup/:host
|
39
|
+
get "/_status/_hostgroup/:hostgroup/_host" do |hostgroup|
|
40
|
+
@data = Hostgroup.new(hostgroup).host_status
|
41
|
+
nil
|
48
42
|
end
|
49
43
|
end
|
data/app/put/host.rb
CHANGED
@@ -31,11 +31,11 @@ class Nagira < Sinatra::Base
|
|
31
31
|
# {
|
32
32
|
# "status_code":"0",
|
33
33
|
# "plugin_output" : "ping OK"
|
34
|
-
# }
|
34
|
+
# }
|
35
35
|
put "/_status/:host_name" do
|
36
36
|
@data = update_host_status @input.first.merge({
|
37
|
-
|
38
|
-
|
37
|
+
'host_name' => params['host_name']
|
38
|
+
})
|
39
39
|
nil
|
40
40
|
end
|
41
41
|
|
@@ -44,9 +44,8 @@ class Nagira < Sinatra::Base
|
|
44
44
|
# @method put__host_status_host_name
|
45
45
|
# @overload put("/_host_status/:host_name")
|
46
46
|
#
|
47
|
-
put "/_host_status/:host_name" do
|
47
|
+
put "/_host_status/:host_name" do
|
48
48
|
"Not implemented: TODO"
|
49
49
|
end
|
50
|
-
|
51
50
|
|
52
51
|
end
|
data/config/environment.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
class Nagira < Sinatra::Base
|
3
2
|
|
4
3
|
disable :protection
|
@@ -7,8 +6,10 @@ class Nagira < Sinatra::Base
|
|
7
6
|
set :port, ENV['NAGIRA_PORT'].to_i if ENV['NAGIRA_PORT']
|
8
7
|
set :bind, ENV['NAGIRA_BIND'] if ENV['NAGIRA_BIND']
|
9
8
|
set :root, File.dirname(File.dirname(__FILE__))
|
9
|
+
set :cfg_dir, "#{root}/config"
|
10
10
|
|
11
11
|
configure do
|
12
|
+
set :server, %w[puma thin webrick]
|
12
13
|
set :format, :json
|
13
14
|
end
|
14
15
|
|
data/config/puma.rb
ADDED
data/lib/nagira.rb
CHANGED
@@ -8,7 +8,6 @@ require 'active_support/core_ext/hash/slice' # for Hash.slice
|
|
8
8
|
require 'json'
|
9
9
|
require 'yaml'
|
10
10
|
require 'sinatra'
|
11
|
-
require 'sinatra/namespace'
|
12
11
|
require 'sinatra/reloader'
|
13
12
|
|
14
13
|
$: << File.dirname(__FILE__) << File.dirname(File.dirname(__FILE__))
|
@@ -33,8 +32,6 @@ class Nagira < Sinatra::Base
|
|
33
32
|
VERSION = File.read(File.expand_path(File.dirname(__FILE__)) + '/../version.txt').strip
|
34
33
|
GITHUB = "http://dmytro.github.com/nagira/"
|
35
34
|
|
36
|
-
register Sinatra::Namespace
|
37
|
-
|
38
35
|
##
|
39
36
|
# When this prefix added to routes convert output to ActiveResource
|
40
37
|
# compatible format (basically Array instead of Hash).
|
data/lib/tasks/config.rake
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
namespace :config do
|
2
2
|
|
3
|
-
@nagira_config = File.join($nagira_root, 'config') # Config directory of Nagira installation
|
4
|
-
|
5
3
|
target_os = nil
|
6
4
|
|
7
5
|
%x{ sherlock }.split($\).each do |line|
|
@@ -9,17 +7,17 @@ namespace :config do
|
|
9
7
|
l,target_os = line.chomp.split '='
|
10
8
|
target_os = target_os.chomp.strip.to_sym
|
11
9
|
end
|
12
|
-
|
13
|
-
|
10
|
+
|
11
|
+
namespace :test do
|
14
12
|
|
15
13
|
desc "Test Nagira production config: Nagios files in proper locations and parseable"
|
16
|
-
task :prod do
|
14
|
+
task :prod do
|
17
15
|
ENV['RACK_ENV'] = 'production'
|
18
16
|
Rake::Task['config:test:test'].invoke
|
19
17
|
end
|
20
18
|
|
21
19
|
desc "Test Nagira installation: test Nagios files and parse"
|
22
|
-
task :install do
|
20
|
+
task :install do
|
23
21
|
ENV['RACK_ENV'] = 'test'
|
24
22
|
Rake::Task['config:test:test'].invoke
|
25
23
|
end
|
@@ -51,7 +49,7 @@ namespace :config do
|
|
51
49
|
|
52
50
|
#desc "Install /etc/init.d startup file for Nagira"
|
53
51
|
task :init_d => init_d do
|
54
|
-
src = File.join(
|
52
|
+
src = File.join(Nagira.cfg_dir, 'nagira.init_d')
|
55
53
|
dst = "#{init_d}/nagira"
|
56
54
|
|
57
55
|
FileUtils.copy src, dst
|
@@ -62,8 +60,8 @@ namespace :config do
|
|
62
60
|
end
|
63
61
|
|
64
62
|
#desc "Install defaults file for Nagira service in /etc"
|
65
|
-
task :defaults do
|
66
|
-
src = File.join(
|
63
|
+
task :defaults do
|
64
|
+
src = File.join(Nagira.cfg_dir, 'nagira.defaults')
|
67
65
|
dst = case target_os
|
68
66
|
when :rh
|
69
67
|
'/etc/sysconfig/nagira'
|
@@ -78,7 +76,7 @@ namespace :config do
|
|
78
76
|
FileUtils.copy src, dst
|
79
77
|
FileUtils.chown 0, 0, dst unless test?
|
80
78
|
FileUtils.chmod 0644, dst
|
81
|
-
|
79
|
+
|
82
80
|
log_user "Installed new defaults file for Nagira in #{dst}."
|
83
81
|
log_user " >>> You might want to tune some of the variables."
|
84
82
|
end
|
@@ -89,7 +87,7 @@ namespace :config do
|
|
89
87
|
log_user "Starting Nagira for the first time"
|
90
88
|
sh "/etc/init.d/nagira start"
|
91
89
|
end
|
92
|
-
|
90
|
+
|
93
91
|
desc "Configure Nagira to start on system boot"
|
94
92
|
task :chkconfig => [:init_d, :defaults] do
|
95
93
|
|
@@ -104,6 +102,7 @@ namespace :config do
|
|
104
102
|
abort "Unknown or unsupported target OS: #{target_os}"
|
105
103
|
end
|
106
104
|
log_user "[OK]"
|
107
|
-
|
105
|
+
|
106
|
+
end
|
108
107
|
|
109
108
|
end
|
data/lib/tasks/debug.rake
CHANGED
@@ -2,12 +2,12 @@ namespace :debug do
|
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
4
|
#
|
5
|
-
# These are default configured files.
|
5
|
+
# These are default configured files.
|
6
6
|
#
|
7
7
|
files = %w{ /etc/init.d/nagira /etc/sysconfig/nagira /etc/default/nagira /var/log/nagios/nagira.log }
|
8
8
|
files += Dir.glob(
|
9
9
|
[
|
10
|
-
"/etc/nagios*/nagios.cfg",
|
10
|
+
"/etc/nagios*/nagios.cfg",
|
11
11
|
"/usr/local/nagios/etc/nagios.cfg"
|
12
12
|
]
|
13
13
|
)
|
@@ -24,25 +24,25 @@ namespace :debug do
|
|
24
24
|
puts "Creating file #{output}. Please send this file for investigation."
|
25
25
|
|
26
26
|
Dir.mktmpdir { |dir|
|
27
|
-
|
27
|
+
|
28
28
|
$stdout.reopen("#{dir}/stdout.txt", "w")
|
29
29
|
require_relative '../../lib/nagira.rb'
|
30
30
|
require_relative '../../lib/app.rb'
|
31
31
|
#
|
32
32
|
# These files from parsed config.
|
33
|
-
#
|
33
|
+
#
|
34
34
|
files << $nagios[:config].path
|
35
35
|
files << $nagios[:status].path
|
36
36
|
files << $nagios[:objects].path
|
37
|
-
|
37
|
+
|
38
38
|
open("#{dir}/sherlock.txt", "w") { |f| f.puts os_info }
|
39
39
|
open("#{dir}/permissions.txt", "w") { |f| f.puts permissions }
|
40
40
|
open("#{dir}/environment.txt", "w") { |f| f.puts environment }
|
41
|
-
|
41
|
+
|
42
42
|
files.each do |ff|
|
43
43
|
FileUtils.cp(ff, "#{dir}/#{ff.gsub('/','_')}") if File.exist? ff
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
%x{ tar cfz #{output} #{dir} 1>&2 }
|
47
47
|
}
|
48
48
|
end
|
data/lib/tasks/doc.rake
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
IMPLEMENTED = {
|
4
|
+
top: %w{ _api _status _objects _config _runtime},
|
5
|
+
output: %w{ _list _state _full }, # Type of requests as in varaible @output
|
6
|
+
hosts: %w{ archive tv },
|
7
|
+
status: %w{ _services _servicecomments _hostcomments },
|
8
|
+
objects: %w{ timeperiod command contactgroup hostgroup contact host service }
|
9
|
+
}
|
10
|
+
|
11
|
+
#
|
12
|
+
# Specs for implemetned API endpoints. Only check response: OK or 404.
|
13
|
+
#
|
14
|
+
|
15
|
+
shared_examples_for :fail_on_random_url do |base|
|
16
|
+
RANDOM.each do |url|
|
17
|
+
ep = "#{base}/#{url}"
|
18
|
+
it "fails on '#{ep}' string" do
|
19
|
+
get ep
|
20
|
+
last_response.status.should be 404
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
shared_examples_for :respond_to_valid_url do |base, urls, custom_regex|
|
26
|
+
|
27
|
+
case urls
|
28
|
+
when Array
|
29
|
+
urls.each do |url|
|
30
|
+
ep = "#{base}/#{url}"
|
31
|
+
it "responds to #{ep}" do
|
32
|
+
get ep
|
33
|
+
last_response.should be_ok
|
34
|
+
end
|
35
|
+
end
|
36
|
+
when nil
|
37
|
+
ep = "#{base}"
|
38
|
+
it "responds to #{ep}" do
|
39
|
+
get ep
|
40
|
+
last_response.should be_ok
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
shared_examples_for :fail_on_bad_url do |url|
|
46
|
+
before { get url }
|
47
|
+
it "fails on #{url}" do
|
48
|
+
last_response.status.should be 404
|
49
|
+
end
|
50
|
+
end
|
data/spec/put/host_spec.rb
CHANGED
data/spec/put/status_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -12,3 +12,13 @@ IMPLEMENTED = {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
RANDOM = %w{ _bla _foo bla foo ahdhjdjda }
|
15
|
+
|
16
|
+
set :environment, ENV['RACK_ENV'] || :test
|
17
|
+
|
18
|
+
def dont_run_in_production(file)
|
19
|
+
if Nagira.settings.environment == :production
|
20
|
+
puts "**** #{File.basename file} should not be run in #{Nagira.settings.environment} environment"
|
21
|
+
return true
|
22
|
+
end
|
23
|
+
false
|
24
|
+
end
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Kovalov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.8'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.1
|
61
|
+
version: '3.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.1
|
68
|
+
version: '3.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sherlock_os
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,9 +73,6 @@ dependencies:
|
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.0'
|
76
|
-
- - '>='
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 0.0.2
|
79
76
|
type: :runtime
|
80
77
|
prerelease: false
|
81
78
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,51 +80,48 @@ dependencies:
|
|
83
80
|
- - ~>
|
84
81
|
- !ruby/object:Gem::Version
|
85
82
|
version: '0.0'
|
86
|
-
- - '>='
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 0.0.2
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
name: rspec-core
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
87
|
- - ~>
|
94
88
|
- !ruby/object:Gem::Version
|
95
|
-
version: 3.1
|
89
|
+
version: '3.1'
|
96
90
|
type: :runtime
|
97
91
|
prerelease: false
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
99
93
|
requirements:
|
100
94
|
- - ~>
|
101
95
|
- !ruby/object:Gem::Version
|
102
|
-
version: 3.1
|
96
|
+
version: '3.1'
|
103
97
|
- !ruby/object:Gem::Dependency
|
104
98
|
name: rspec-expectations
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|
106
100
|
requirements:
|
107
101
|
- - ~>
|
108
102
|
- !ruby/object:Gem::Version
|
109
|
-
version: 3.1
|
103
|
+
version: '3.1'
|
110
104
|
type: :runtime
|
111
105
|
prerelease: false
|
112
106
|
version_requirements: !ruby/object:Gem::Requirement
|
113
107
|
requirements:
|
114
108
|
- - ~>
|
115
109
|
- !ruby/object:Gem::Version
|
116
|
-
version: 3.1
|
110
|
+
version: '3.1'
|
117
111
|
- !ruby/object:Gem::Dependency
|
118
112
|
name: rspec-mocks
|
119
113
|
requirement: !ruby/object:Gem::Requirement
|
120
114
|
requirements:
|
121
115
|
- - ~>
|
122
116
|
- !ruby/object:Gem::Version
|
123
|
-
version: 3.1
|
117
|
+
version: '3.1'
|
124
118
|
type: :runtime
|
125
119
|
prerelease: false
|
126
120
|
version_requirements: !ruby/object:Gem::Requirement
|
127
121
|
requirements:
|
128
122
|
- - ~>
|
129
123
|
- !ruby/object:Gem::Version
|
130
|
-
version: 3.1
|
124
|
+
version: '3.1'
|
131
125
|
- !ruby/object:Gem::Dependency
|
132
126
|
name: ruby-nagios
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,98 +148,112 @@ dependencies:
|
|
154
148
|
requirements:
|
155
149
|
- - ~>
|
156
150
|
- !ruby/object:Gem::Version
|
157
|
-
version: 1.
|
151
|
+
version: '1.4'
|
158
152
|
type: :runtime
|
159
153
|
prerelease: false
|
160
154
|
version_requirements: !ruby/object:Gem::Requirement
|
161
155
|
requirements:
|
162
156
|
- - ~>
|
163
157
|
- !ruby/object:Gem::Version
|
164
|
-
version: 1.
|
158
|
+
version: '1.4'
|
165
159
|
- !ruby/object:Gem::Dependency
|
166
160
|
name: sinatra-contrib
|
167
161
|
requirement: !ruby/object:Gem::Requirement
|
168
162
|
requirements:
|
169
163
|
- - ~>
|
170
164
|
- !ruby/object:Gem::Version
|
171
|
-
version: 1.
|
165
|
+
version: '1.4'
|
172
166
|
type: :runtime
|
173
167
|
prerelease: false
|
174
168
|
version_requirements: !ruby/object:Gem::Requirement
|
175
169
|
requirements:
|
176
170
|
- - ~>
|
177
171
|
- !ruby/object:Gem::Version
|
178
|
-
version: 1.
|
172
|
+
version: '1.4'
|
179
173
|
- !ruby/object:Gem::Dependency
|
180
174
|
name: rake
|
181
175
|
requirement: !ruby/object:Gem::Requirement
|
182
176
|
requirements:
|
183
|
-
- -
|
177
|
+
- - ~>
|
184
178
|
- !ruby/object:Gem::Version
|
185
|
-
version: '
|
179
|
+
version: '10.1'
|
186
180
|
type: :runtime
|
187
181
|
prerelease: false
|
188
182
|
version_requirements: !ruby/object:Gem::Requirement
|
189
183
|
requirements:
|
190
|
-
- -
|
184
|
+
- - ~>
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '10.1'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: puma
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ~>
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '2.1'
|
194
|
+
type: :runtime
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ~>
|
191
199
|
- !ruby/object:Gem::Version
|
192
|
-
version: '
|
200
|
+
version: '2.1'
|
193
201
|
- !ruby/object:Gem::Dependency
|
194
202
|
name: growl
|
195
203
|
requirement: !ruby/object:Gem::Requirement
|
196
204
|
requirements:
|
197
205
|
- - ~>
|
198
206
|
- !ruby/object:Gem::Version
|
199
|
-
version: 1
|
207
|
+
version: '1'
|
200
208
|
type: :development
|
201
209
|
prerelease: false
|
202
210
|
version_requirements: !ruby/object:Gem::Requirement
|
203
211
|
requirements:
|
204
212
|
- - ~>
|
205
213
|
- !ruby/object:Gem::Version
|
206
|
-
version: 1
|
214
|
+
version: '1'
|
207
215
|
- !ruby/object:Gem::Dependency
|
208
216
|
name: pry
|
209
217
|
requirement: !ruby/object:Gem::Requirement
|
210
218
|
requirements:
|
211
219
|
- - ~>
|
212
220
|
- !ruby/object:Gem::Version
|
213
|
-
version: 0.10
|
221
|
+
version: '0.10'
|
214
222
|
type: :development
|
215
223
|
prerelease: false
|
216
224
|
version_requirements: !ruby/object:Gem::Requirement
|
217
225
|
requirements:
|
218
226
|
- - ~>
|
219
227
|
- !ruby/object:Gem::Version
|
220
|
-
version: 0.10
|
228
|
+
version: '0.10'
|
221
229
|
- !ruby/object:Gem::Dependency
|
222
230
|
name: guard-brakeman
|
223
231
|
requirement: !ruby/object:Gem::Requirement
|
224
232
|
requirements:
|
225
233
|
- - ~>
|
226
234
|
- !ruby/object:Gem::Version
|
227
|
-
version: 0.5
|
235
|
+
version: '0.5'
|
228
236
|
type: :development
|
229
237
|
prerelease: false
|
230
238
|
version_requirements: !ruby/object:Gem::Requirement
|
231
239
|
requirements:
|
232
240
|
- - ~>
|
233
241
|
- !ruby/object:Gem::Version
|
234
|
-
version: 0.5
|
242
|
+
version: '0.5'
|
235
243
|
- !ruby/object:Gem::Dependency
|
236
244
|
name: guard-rspec
|
237
245
|
requirement: !ruby/object:Gem::Requirement
|
238
246
|
requirements:
|
239
247
|
- - ~>
|
240
248
|
- !ruby/object:Gem::Version
|
241
|
-
version: 4
|
249
|
+
version: '4'
|
242
250
|
type: :development
|
243
251
|
prerelease: false
|
244
252
|
version_requirements: !ruby/object:Gem::Requirement
|
245
253
|
requirements:
|
246
254
|
- - ~>
|
247
255
|
- !ruby/object:Gem::Version
|
248
|
-
version: 4
|
256
|
+
version: '4'
|
249
257
|
- !ruby/object:Gem::Dependency
|
250
258
|
name: yard
|
251
259
|
requirement: !ruby/object:Gem::Requirement
|
@@ -264,16 +272,16 @@ dependencies:
|
|
264
272
|
name: redcarpet
|
265
273
|
requirement: !ruby/object:Gem::Requirement
|
266
274
|
requirements:
|
267
|
-
- -
|
275
|
+
- - ~>
|
268
276
|
- !ruby/object:Gem::Version
|
269
|
-
version: '0'
|
277
|
+
version: '3.0'
|
270
278
|
type: :development
|
271
279
|
prerelease: false
|
272
280
|
version_requirements: !ruby/object:Gem::Requirement
|
273
281
|
requirements:
|
274
|
-
- -
|
282
|
+
- - ~>
|
275
283
|
- !ruby/object:Gem::Version
|
276
|
-
version: '0'
|
284
|
+
version: '3.0'
|
277
285
|
description: |2+
|
278
286
|
|
279
287
|
Nagira -- Nagios RESTful API
|
@@ -306,6 +314,7 @@ files:
|
|
306
314
|
- config/environment.rb
|
307
315
|
- config/nagira.defaults
|
308
316
|
- config/nagira.init_d
|
317
|
+
- config/puma.rb
|
309
318
|
- lib/nagira.rb
|
310
319
|
- lib/nagira/background_parse.rb
|
311
320
|
- lib/nagira/hostgroup.rb
|
@@ -319,11 +328,12 @@ files:
|
|
319
328
|
- spec/01_data_format/02_0_status_spec.rb
|
320
329
|
- spec/01_data_format/02_nagira_data_spec.rb
|
321
330
|
- spec/01_data_format/03_api_spec.rb
|
322
|
-
- spec/get/
|
323
|
-
- spec/get/
|
324
|
-
- spec/get/
|
325
|
-
- spec/get/
|
326
|
-
- spec/get/
|
331
|
+
- spec/get/get_helper.rb
|
332
|
+
- spec/get/status/comments_spec.rb
|
333
|
+
- spec/get/status/endpoints_spec.rb
|
334
|
+
- spec/get/status/hostgroup.rb
|
335
|
+
- spec/get/status/hosts_spec.rb
|
336
|
+
- spec/get/status/services_spec.rb
|
327
337
|
- spec/put/host_spec.rb
|
328
338
|
- spec/put/status_spec.rb
|
329
339
|
- spec/put/support.rb
|
@@ -358,7 +368,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
358
368
|
requirements:
|
359
369
|
- - '>='
|
360
370
|
- !ruby/object:Gem::Version
|
361
|
-
version:
|
371
|
+
version: 1.9.1
|
362
372
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
363
373
|
requirements:
|
364
374
|
- - '>='
|