icinga2 0.9.2.8 → 1.0.0
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/README.md +1 -9
- data/doc/downtimes.md +39 -0
- data/lib/icinga2/actions.rb +152 -0
- data/lib/icinga2/client.rb +29 -22
- data/lib/icinga2/configuration_management.rb +312 -0
- data/lib/icinga2/downtimes.rb +72 -4
- data/lib/icinga2/hostgroups.rb +6 -6
- data/lib/icinga2/hosts.rb +23 -23
- data/lib/icinga2/network.rb +115 -10
- data/lib/icinga2/notifications.rb +17 -9
- data/lib/icinga2/servicegroups.rb +5 -5
- data/lib/icinga2/services.rb +32 -30
- data/lib/icinga2/statistics.rb +17 -14
- data/lib/icinga2/tools.rb +31 -10
- data/lib/icinga2/usergroups.rb +5 -5
- data/lib/icinga2/users.rb +5 -5
- data/lib/icinga2/validator.rb +40 -34
- data/lib/icinga2/version.rb +1 -3
- data/lib/monkey_patches.rb +67 -14
- data/spec/icinga2_spec.rb +1013 -0
- data/spec/spec_helper.rb +13 -0
- metadata +9 -22
- data/doc/Array.html +0 -200
- data/doc/Boolean.html +0 -122
- data/doc/FalseClass.html +0 -132
- data/doc/Hash.html +0 -332
- data/doc/Icinga2.html +0 -247
- data/doc/Logging.html +0 -328
- data/doc/Object.html +0 -286
- data/doc/Time.html +0 -200
- data/doc/TrueClass.html +0 -132
- data/doc/_index.html +0 -352
- data/doc/class_list.html +0 -51
- data/doc/examples +0 -122
- data/doc/file.README.html +0 -349
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -349
- data/doc/method_list.html +0 -755
- data/doc/top-level-namespace.html +0 -112
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# require 'pry'
|
4
|
+
require 'rspec'
|
5
|
+
require 'icinga2'
|
6
|
+
|
7
|
+
# RSpec.configure do |config|
|
8
|
+
# config.color_enabled = true
|
9
|
+
# config.formatter = 'documentation'
|
10
|
+
#
|
11
|
+
# # Configure Timezone for proper tests
|
12
|
+
# ENV['TZ'] = 'UTC'
|
13
|
+
# end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: icinga2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bodo Schulz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_dig
|
@@ -220,7 +220,8 @@ dependencies:
|
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
|
-
description: An enhanced ruby gem to communicate with Icinga2 API
|
223
|
+
description: An enhanced ruby gem to communicate with Icinga2 API.It's allowed create
|
224
|
+
small applications to connect to Icinga2 to add Hosts, Services,User and so on.
|
224
225
|
email: bodo@boone-schulz.de
|
225
226
|
executables: []
|
226
227
|
extensions: []
|
@@ -228,32 +229,14 @@ extra_rdoc_files: []
|
|
228
229
|
files:
|
229
230
|
- LICENSE
|
230
231
|
- README.md
|
231
|
-
- doc/Array.html
|
232
|
-
- doc/Boolean.html
|
233
|
-
- doc/FalseClass.html
|
234
|
-
- doc/Hash.html
|
235
|
-
- doc/Icinga2.html
|
236
|
-
- doc/Logging.html
|
237
|
-
- doc/Object.html
|
238
|
-
- doc/Time.html
|
239
|
-
- doc/TrueClass.html
|
240
|
-
- doc/_index.html
|
241
|
-
- doc/class_list.html
|
242
232
|
- doc/downtimes.md
|
243
|
-
- doc/examples
|
244
|
-
- doc/file.README.html
|
245
|
-
- doc/file_list.html
|
246
|
-
- doc/frames.html
|
247
233
|
- doc/hostgroups.md
|
248
234
|
- doc/hosts.md
|
249
|
-
- doc/index.html
|
250
|
-
- doc/method_list.html
|
251
235
|
- doc/notifications.md
|
252
236
|
- doc/servicegroups.md
|
253
237
|
- doc/services.md
|
254
238
|
- doc/statistics.md
|
255
239
|
- doc/status.md
|
256
|
-
- doc/top-level-namespace.html
|
257
240
|
- doc/usergroups.md
|
258
241
|
- doc/users.md
|
259
242
|
- examples/_blank.rb
|
@@ -270,7 +253,9 @@ files:
|
|
270
253
|
- examples/usergroups.rb
|
271
254
|
- examples/users.rb
|
272
255
|
- lib/icinga2.rb
|
256
|
+
- lib/icinga2/actions.rb
|
273
257
|
- lib/icinga2/client.rb
|
258
|
+
- lib/icinga2/configuration_management.rb
|
274
259
|
- lib/icinga2/converts.rb
|
275
260
|
- lib/icinga2/downtimes.rb
|
276
261
|
- lib/icinga2/hostgroups.rb
|
@@ -287,6 +272,8 @@ files:
|
|
287
272
|
- lib/icinga2/version.rb
|
288
273
|
- lib/logging.rb
|
289
274
|
- lib/monkey_patches.rb
|
275
|
+
- spec/icinga2_spec.rb
|
276
|
+
- spec/spec_helper.rb
|
290
277
|
homepage: https://github.com/bodsch/ruby-icinga2
|
291
278
|
licenses:
|
292
279
|
- LGPL-2.1+
|
@@ -310,5 +297,5 @@ rubyforge_project:
|
|
310
297
|
rubygems_version: 2.6.14
|
311
298
|
signing_key:
|
312
299
|
specification_version: 4
|
313
|
-
summary: Icinga2 API
|
300
|
+
summary: Ruby SDK for easly access to the Icinga2 API
|
314
301
|
test_files: []
|
data/doc/Array.html
DELETED
@@ -1,200 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: Array
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.11
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
pathId = "Array";
|
19
|
-
relpath = '';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="_index.html">Index (A)</a> »
|
40
|
-
|
41
|
-
|
42
|
-
<span class="title">Array</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Class: Array
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName"><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></li>
|
76
|
-
|
77
|
-
<li class="next">Array</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dl>
|
96
|
-
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/monkey_patches.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
<h2>Overview</h2><div class="docstring">
|
103
|
-
<div class="discussion">
|
104
|
-
<hr>
|
105
|
-
|
106
|
-
|
107
|
-
</div>
|
108
|
-
</div>
|
109
|
-
<div class="tags">
|
110
|
-
|
111
|
-
|
112
|
-
</div>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
<h2>
|
121
|
-
Instance Method Summary
|
122
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
123
|
-
</h2>
|
124
|
-
|
125
|
-
<ul class="summary">
|
126
|
-
|
127
|
-
<li class="public ">
|
128
|
-
<span class="summary_signature">
|
129
|
-
|
130
|
-
<a href="#compare-instance_method" title="#compare (instance method)">#<strong>compare</strong>(comparate) ⇒ Object </a>
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
</span>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
145
|
-
|
146
|
-
</li>
|
147
|
-
|
148
|
-
|
149
|
-
</ul>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
<div id="instance_method_details" class="method_details_list">
|
155
|
-
<h2>Instance Method Details</h2>
|
156
|
-
|
157
|
-
|
158
|
-
<div class="method_details first">
|
159
|
-
<h3 class="signature first" id="compare-instance_method">
|
160
|
-
|
161
|
-
#<strong>compare</strong>(comparate) ⇒ <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
</h3><table class="source_code">
|
168
|
-
<tr>
|
169
|
-
<td>
|
170
|
-
<pre class="lines">
|
171
|
-
|
172
|
-
|
173
|
-
47
|
174
|
-
48
|
175
|
-
49</pre>
|
176
|
-
</td>
|
177
|
-
<td>
|
178
|
-
<pre class="code"><span class="info file"># File 'lib/monkey_patches.rb', line 47</span>
|
179
|
-
|
180
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_compare'>compare</span><span class='lparen'>(</span> <span class='id identifier rubyid_comparate'>comparate</span> <span class='rparen'>)</span>
|
181
|
-
<span class='id identifier rubyid_to_set'>to_set</span> <span class='op'>==</span> <span class='id identifier rubyid_comparate'>comparate</span><span class='period'>.</span><span class='id identifier rubyid_to_set'>to_set</span>
|
182
|
-
<span class='kw'>end</span></pre>
|
183
|
-
</td>
|
184
|
-
</tr>
|
185
|
-
</table>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
</div>
|
189
|
-
|
190
|
-
</div>
|
191
|
-
|
192
|
-
<div id="footer">
|
193
|
-
Generated on Sat Dec 9 20:28:07 2017 by
|
194
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
195
|
-
0.9.11 (ruby-2.2.8).
|
196
|
-
</div>
|
197
|
-
|
198
|
-
</div>
|
199
|
-
</body>
|
200
|
-
</html>
|
data/doc/Boolean.html
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Module: Boolean
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.11
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
pathId = "Boolean";
|
19
|
-
relpath = '';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="_index.html">Index (B)</a> »
|
40
|
-
|
41
|
-
|
42
|
-
<span class="title">Boolean</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Module: Boolean
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<dl>
|
78
|
-
<dt>Included in:</dt>
|
79
|
-
<dd><span class='object_link'><a href="FalseClass.html" title="FalseClass (class)">FalseClass</a></span>, <span class='object_link'><a href="TrueClass.html" title="TrueClass (class)">TrueClass</a></span></dd>
|
80
|
-
</dl>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
<dl>
|
85
|
-
<dt>Defined in:</dt>
|
86
|
-
<dd>lib/monkey_patches.rb</dd>
|
87
|
-
</dl>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<h2>Overview</h2><div class="docstring">
|
92
|
-
<div class="discussion">
|
93
|
-
|
94
|
-
<p><a
|
95
|
-
href="https://stackoverflow.com/questions/3028243/check-if-ruby-object-is-a-boolean/3028378#3028378">stackoverflow.com/questions/3028243/check-if-ruby-object-is-a-boolean/3028378#3028378</a></p>
|
96
|
-
|
97
|
-
|
98
|
-
</div>
|
99
|
-
</div>
|
100
|
-
<div class="tags">
|
101
|
-
|
102
|
-
|
103
|
-
</div>
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
</div>
|
113
|
-
|
114
|
-
<div id="footer">
|
115
|
-
Generated on Sat Dec 9 20:28:06 2017 by
|
116
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
117
|
-
0.9.11 (ruby-2.2.8).
|
118
|
-
</div>
|
119
|
-
|
120
|
-
</div>
|
121
|
-
</body>
|
122
|
-
</html>
|
data/doc/FalseClass.html
DELETED
@@ -1,132 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: FalseClass
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.11
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
pathId = "FalseClass";
|
19
|
-
relpath = '';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="_index.html">Index (F)</a> »
|
40
|
-
|
41
|
-
|
42
|
-
<span class="title">FalseClass</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Class: FalseClass
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName"><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></li>
|
76
|
-
|
77
|
-
<li class="next">FalseClass</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
<dl>
|
91
|
-
<dt>Includes:</dt>
|
92
|
-
<dd><span class='object_link'><a href="Boolean.html" title="Boolean (module)">Boolean</a></span></dd>
|
93
|
-
</dl>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<dl>
|
101
|
-
<dt>Defined in:</dt>
|
102
|
-
<dd>lib/monkey_patches.rb</dd>
|
103
|
-
</dl>
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
</div>
|
123
|
-
|
124
|
-
<div id="footer">
|
125
|
-
Generated on Sat Dec 9 20:28:07 2017 by
|
126
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
127
|
-
0.9.11 (ruby-2.2.8).
|
128
|
-
</div>
|
129
|
-
|
130
|
-
</div>
|
131
|
-
</body>
|
132
|
-
</html>
|