icinga2 0.6.1 → 0.6.2
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/doc/Icinga2.html +151 -0
- data/doc/Logging.html +316 -0
- data/doc/_index.html +285 -0
- data/doc/class_list.html +51 -0
- data/doc/file.README.html +278 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +278 -0
- data/doc/method_list.html +523 -0
- data/doc/status.md +12 -0
- data/doc/top-level-namespace.html +110 -0
- data/examples/test.rb +143 -102
- data/lib/icinga2.rb +12 -4
- data/lib/icinga2/converts.rb +8 -8
- data/lib/icinga2/downtimes.rb +34 -14
- data/lib/icinga2/hostgroups.rb +54 -20
- data/lib/icinga2/hosts.rb +126 -65
- data/lib/icinga2/network.rb +44 -3
- data/lib/icinga2/notifications.rb +120 -25
- data/lib/icinga2/servicegroups.rb +44 -10
- data/lib/icinga2/services.rb +100 -51
- data/lib/icinga2/status.rb +16 -10
- data/lib/icinga2/tools.rb +5 -3
- data/lib/icinga2/usergroups.rb +47 -12
- data/lib/icinga2/users.rb +49 -23
- data/lib/icinga2/version.rb +6 -4
- metadata +13 -2
data/doc/_index.html
ADDED
@@ -0,0 +1,285 @@
|
|
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
|
+
Documentation by YARD 0.9.9
|
8
|
+
|
9
|
+
</title>
|
10
|
+
|
11
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8">
|
16
|
+
pathId = null;
|
17
|
+
relpath = '';
|
18
|
+
</script>
|
19
|
+
|
20
|
+
|
21
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
24
|
+
|
25
|
+
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
<div class="nav_wrap">
|
29
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
30
|
+
<div id="resizer"></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="main" tabindex="-1">
|
34
|
+
<div id="header">
|
35
|
+
<div id="menu">
|
36
|
+
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search">
|
40
|
+
|
41
|
+
<a class="full_list_link" id="class_list_link"
|
42
|
+
href="class_list.html">
|
43
|
+
|
44
|
+
<svg width="24" height="24">
|
45
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
46
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
47
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
48
|
+
</svg>
|
49
|
+
</a>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
<div class="clear"></div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.9</h1>
|
56
|
+
<div id="listing">
|
57
|
+
<h1 class="alphaindex">Alphabetic Index</h1>
|
58
|
+
|
59
|
+
<h2>File Listing</h2>
|
60
|
+
<ul id="files" class="index_inline_list">
|
61
|
+
|
62
|
+
|
63
|
+
<li class="r1"><a href="index.html" title="README">README</a></li>
|
64
|
+
|
65
|
+
|
66
|
+
</ul>
|
67
|
+
|
68
|
+
<div class="clear"></div>
|
69
|
+
<h2>Namespace Listing A-Z</h2>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<table>
|
75
|
+
<tr>
|
76
|
+
<td valign='top' width="33%">
|
77
|
+
|
78
|
+
|
79
|
+
<ul id="alpha_C" class="alpha">
|
80
|
+
<li class="letter">C</li>
|
81
|
+
<ul>
|
82
|
+
|
83
|
+
<li>
|
84
|
+
<span class='object_link'><a href="Icinga2/Client.html" title="Icinga2::Client (class)">Client</a></span>
|
85
|
+
|
86
|
+
<small>(Icinga2)</small>
|
87
|
+
|
88
|
+
</li>
|
89
|
+
|
90
|
+
<li>
|
91
|
+
<span class='object_link'><a href="Icinga2/Converts.html" title="Icinga2::Converts (module)">Converts</a></span>
|
92
|
+
|
93
|
+
<small>(Icinga2)</small>
|
94
|
+
|
95
|
+
</li>
|
96
|
+
|
97
|
+
</ul>
|
98
|
+
</ul>
|
99
|
+
|
100
|
+
|
101
|
+
<ul id="alpha_D" class="alpha">
|
102
|
+
<li class="letter">D</li>
|
103
|
+
<ul>
|
104
|
+
|
105
|
+
<li>
|
106
|
+
<span class='object_link'><a href="Icinga2/Downtimes.html" title="Icinga2::Downtimes (module)">Downtimes</a></span>
|
107
|
+
|
108
|
+
<small>(Icinga2)</small>
|
109
|
+
|
110
|
+
</li>
|
111
|
+
|
112
|
+
</ul>
|
113
|
+
</ul>
|
114
|
+
|
115
|
+
|
116
|
+
<ul id="alpha_H" class="alpha">
|
117
|
+
<li class="letter">H</li>
|
118
|
+
<ul>
|
119
|
+
|
120
|
+
<li>
|
121
|
+
<span class='object_link'><a href="Icinga2/Hostgroups.html" title="Icinga2::Hostgroups (module)">Hostgroups</a></span>
|
122
|
+
|
123
|
+
<small>(Icinga2)</small>
|
124
|
+
|
125
|
+
</li>
|
126
|
+
|
127
|
+
<li>
|
128
|
+
<span class='object_link'><a href="Icinga2/Hosts.html" title="Icinga2::Hosts (module)">Hosts</a></span>
|
129
|
+
|
130
|
+
<small>(Icinga2)</small>
|
131
|
+
|
132
|
+
</li>
|
133
|
+
|
134
|
+
</ul>
|
135
|
+
</ul>
|
136
|
+
|
137
|
+
|
138
|
+
<ul id="alpha_I" class="alpha">
|
139
|
+
<li class="letter">I</li>
|
140
|
+
<ul>
|
141
|
+
|
142
|
+
<li>
|
143
|
+
<span class='object_link'><a href="Icinga2.html" title="Icinga2 (module)">Icinga2</a></span>
|
144
|
+
|
145
|
+
</li>
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
</ul>
|
149
|
+
|
150
|
+
|
151
|
+
<ul id="alpha_L" class="alpha">
|
152
|
+
<li class="letter">L</li>
|
153
|
+
<ul>
|
154
|
+
|
155
|
+
<li>
|
156
|
+
<span class='object_link'><a href="Logging.html" title="Logging (module)">Logging</a></span>
|
157
|
+
|
158
|
+
</li>
|
159
|
+
|
160
|
+
</ul>
|
161
|
+
</ul>
|
162
|
+
|
163
|
+
|
164
|
+
<ul id="alpha_N" class="alpha">
|
165
|
+
<li class="letter">N</li>
|
166
|
+
<ul>
|
167
|
+
|
168
|
+
<li>
|
169
|
+
<span class='object_link'><a href="Icinga2/Network.html" title="Icinga2::Network (module)">Network</a></span>
|
170
|
+
|
171
|
+
<small>(Icinga2)</small>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
<li>
|
176
|
+
<span class='object_link'><a href="Icinga2/Notifications.html" title="Icinga2::Notifications (module)">Notifications</a></span>
|
177
|
+
|
178
|
+
<small>(Icinga2)</small>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
</ul>
|
183
|
+
</ul>
|
184
|
+
|
185
|
+
|
186
|
+
<ul id="alpha_S" class="alpha">
|
187
|
+
<li class="letter">S</li>
|
188
|
+
<ul>
|
189
|
+
|
190
|
+
<li>
|
191
|
+
<span class='object_link'><a href="Icinga2/Servicegroups.html" title="Icinga2::Servicegroups (module)">Servicegroups</a></span>
|
192
|
+
|
193
|
+
<small>(Icinga2)</small>
|
194
|
+
|
195
|
+
</li>
|
196
|
+
|
197
|
+
<li>
|
198
|
+
<span class='object_link'><a href="Icinga2/Services.html" title="Icinga2::Services (module)">Services</a></span>
|
199
|
+
|
200
|
+
<small>(Icinga2)</small>
|
201
|
+
|
202
|
+
</li>
|
203
|
+
|
204
|
+
<li>
|
205
|
+
<span class='object_link'><a href="Icinga2/Status.html" title="Icinga2::Status (module)">Status</a></span>
|
206
|
+
|
207
|
+
<small>(Icinga2)</small>
|
208
|
+
|
209
|
+
</li>
|
210
|
+
|
211
|
+
</ul>
|
212
|
+
</ul>
|
213
|
+
|
214
|
+
|
215
|
+
</td><td valign='top' width="33%">
|
216
|
+
|
217
|
+
|
218
|
+
<ul id="alpha_T" class="alpha">
|
219
|
+
<li class="letter">T</li>
|
220
|
+
<ul>
|
221
|
+
|
222
|
+
<li>
|
223
|
+
<span class='object_link'><a href="Icinga2/Tools.html" title="Icinga2::Tools (module)">Tools</a></span>
|
224
|
+
|
225
|
+
<small>(Icinga2)</small>
|
226
|
+
|
227
|
+
</li>
|
228
|
+
|
229
|
+
</ul>
|
230
|
+
</ul>
|
231
|
+
|
232
|
+
|
233
|
+
<ul id="alpha_U" class="alpha">
|
234
|
+
<li class="letter">U</li>
|
235
|
+
<ul>
|
236
|
+
|
237
|
+
<li>
|
238
|
+
<span class='object_link'><a href="Icinga2/Usergroups.html" title="Icinga2::Usergroups (module)">Usergroups</a></span>
|
239
|
+
|
240
|
+
<small>(Icinga2)</small>
|
241
|
+
|
242
|
+
</li>
|
243
|
+
|
244
|
+
<li>
|
245
|
+
<span class='object_link'><a href="Icinga2/Users.html" title="Icinga2::Users (module)">Users</a></span>
|
246
|
+
|
247
|
+
<small>(Icinga2)</small>
|
248
|
+
|
249
|
+
</li>
|
250
|
+
|
251
|
+
</ul>
|
252
|
+
</ul>
|
253
|
+
|
254
|
+
|
255
|
+
<ul id="alpha_V" class="alpha">
|
256
|
+
<li class="letter">V</li>
|
257
|
+
<ul>
|
258
|
+
|
259
|
+
<li>
|
260
|
+
<span class='object_link'><a href="Icinga2/Version.html" title="Icinga2::Version (module)">Version</a></span>
|
261
|
+
|
262
|
+
<small>(Icinga2)</small>
|
263
|
+
|
264
|
+
</li>
|
265
|
+
|
266
|
+
</ul>
|
267
|
+
</ul>
|
268
|
+
|
269
|
+
</td>
|
270
|
+
</tr>
|
271
|
+
</table>
|
272
|
+
|
273
|
+
</div>
|
274
|
+
|
275
|
+
</div>
|
276
|
+
|
277
|
+
<div id="footer">
|
278
|
+
Generated on Sat Jun 17 14:00:30 2017 by
|
279
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
280
|
+
0.9.9 (ruby-2.3.4).
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</body>
|
285
|
+
</html>
|
data/doc/class_list.html
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
|
+
|
17
|
+
|
18
|
+
<title>Class List</title>
|
19
|
+
<base id="base_target" target="_parent" />
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
<div id="content">
|
23
|
+
<div class="fixed_header">
|
24
|
+
<h1 id="full_list_header">Class List</h1>
|
25
|
+
<div id="full_list_nav">
|
26
|
+
|
27
|
+
<span><a target="_self" href="class_list.html">
|
28
|
+
Classes
|
29
|
+
</a></span>
|
30
|
+
|
31
|
+
<span><a target="_self" href="method_list.html">
|
32
|
+
Methods
|
33
|
+
</a></span>
|
34
|
+
|
35
|
+
<span><a target="_self" href="file_list.html">
|
36
|
+
Files
|
37
|
+
</a></span>
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="search">Search: <input type="text" /></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<ul id="full_list" class="class">
|
45
|
+
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
|
46
|
+
<li id='object_Icinga2' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Icinga2.html" title="Icinga2 (module)">Icinga2</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Icinga2::Client' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Client.html" title="Icinga2::Client (class)">Client</a></span> < Object<small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Converts' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Converts.html" title="Icinga2::Converts (module)">Converts</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Downtimes' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Downtimes.html" title="Icinga2::Downtimes (module)">Downtimes</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Hostgroups' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Hostgroups.html" title="Icinga2::Hostgroups (module)">Hostgroups</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Hosts' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Hosts.html" title="Icinga2::Hosts (module)">Hosts</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Network' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Network.html" title="Icinga2::Network (module)">Network</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Notifications' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Notifications.html" title="Icinga2::Notifications (module)">Notifications</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Servicegroups' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Servicegroups.html" title="Icinga2::Servicegroups (module)">Servicegroups</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Services' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Services.html" title="Icinga2::Services (module)">Services</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Status' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Status.html" title="Icinga2::Status (module)">Status</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Tools' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Tools.html" title="Icinga2::Tools (module)">Tools</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Usergroups' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Usergroups.html" title="Icinga2::Usergroups (module)">Usergroups</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Users' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Users.html" title="Icinga2::Users (module)">Users</a></span><small class='search_info'>Icinga2</small></div></li><li id='object_Icinga2::Version' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Version.html" title="Icinga2::Version (module)">Version</a></span><small class='search_info'>Icinga2</small></div></li></ul></li><li id='object_Logging' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Logging.html" title="Logging (module)">Logging</a></span><small class='search_info'>Top Level Namespace</small></div></li>
|
47
|
+
|
48
|
+
</ul>
|
49
|
+
</div>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,278 @@
|
|
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
|
+
File: README
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
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 = "README";
|
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="file_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> »
|
40
|
+
<span class="title">File: README</span>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div id="search">
|
45
|
+
|
46
|
+
<a class="full_list_link" id="class_list_link"
|
47
|
+
href="class_list.html">
|
48
|
+
|
49
|
+
<svg width="24" height="24">
|
50
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
51
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
52
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
</svg>
|
54
|
+
</a>
|
55
|
+
|
56
|
+
</div>
|
57
|
+
<div class="clear"></div>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<div id="content"><div id='filecontents'>
|
61
|
+
<h1 id="label-ruby-icinga2">ruby-icinga2</h1>
|
62
|
+
|
63
|
+
<p>Small Ruby Class for the Icinga2 API</p>
|
64
|
+
|
65
|
+
<h2 id="label-Requirements">Requirements</h2>
|
66
|
+
|
67
|
+
<pre class="code ruby"><code class="ruby">gem install rest-client --no-rdoc --no-ri
|
68
|
+
gem install json --no-rdoc --no-ri</code></pre>
|
69
|
+
|
70
|
+
<h2 id="label-usage">usage</h2>
|
71
|
+
|
72
|
+
<p>create an instance and get information about the Icinga2 Server</p>
|
73
|
+
|
74
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
75
|
+
<span class='symbol'>:icinga</span> <span class='op'>=></span> <span class='lbrace'>{</span>
|
76
|
+
<span class='symbol'>:host</span> <span class='op'>=></span> <span class='id identifier rubyid_icingaHost'>icingaHost</span><span class='comma'>,</span>
|
77
|
+
<span class='symbol'>:api</span> <span class='op'>=></span> <span class='lbrace'>{</span>
|
78
|
+
<span class='symbol'>:port</span> <span class='op'>=></span> <span class='id identifier rubyid_icingaApiPort'>icingaApiPort</span><span class='comma'>,</span>
|
79
|
+
<span class='symbol'>:user</span> <span class='op'>=></span> <span class='id identifier rubyid_icingaApiUser'>icingaApiUser</span><span class='comma'>,</span>
|
80
|
+
<span class='symbol'>:pass</span> <span class='op'>=></span> <span class='id identifier rubyid_icingaApiPass'>icingaApiPass</span>
|
81
|
+
<span class='rbrace'>}</span><span class='comma'>,</span>
|
82
|
+
<span class='symbol'>:cluster</span> <span class='op'>=></span> <span class='id identifier rubyid_icingaCluster'>icingaCluster</span><span class='comma'>,</span>
|
83
|
+
<span class='symbol'>:satellite</span> <span class='op'>=></span> <span class='id identifier rubyid_icingaSatellite'>icingaSatellite</span><span class='comma'>,</span>
|
84
|
+
<span class='rbrace'>}</span>
|
85
|
+
<span class='rbrace'>}</span>
|
86
|
+
|
87
|
+
<span class='id identifier rubyid_i'>i</span> <span class='op'>=</span> <span class='const'>Icinga</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_config'>config</span> <span class='rparen'>)</span>
|
88
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_application_data'>application_data</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
89
|
+
</code></pre>
|
90
|
+
|
91
|
+
<h2 id="label-Status">Status</h2>
|
92
|
+
|
93
|
+
<p>supports the following API Calls:</p>
|
94
|
+
<ul><li>
|
95
|
+
<p><a href="doc/status.md">Users</a></p>
|
96
|
+
<ul><li>
|
97
|
+
<p>application_data</p>
|
98
|
+
</li><li>
|
99
|
+
<p>cib_data</p>
|
100
|
+
</li><li>
|
101
|
+
<p>api_listener</p>
|
102
|
+
</li><li>
|
103
|
+
<p>application_data</p>
|
104
|
+
</li><li>
|
105
|
+
<p>cib_data</p>
|
106
|
+
</li><li>
|
107
|
+
<p>api_listener</p>
|
108
|
+
</li></ul>
|
109
|
+
</li><li>
|
110
|
+
<p><a href="doc/users.md">Users</a></p>
|
111
|
+
<ul><li>
|
112
|
+
<p>add_user( params = {} )</p>
|
113
|
+
</li><li>
|
114
|
+
<p>delete_user( params = {} )</p>
|
115
|
+
</li><li>
|
116
|
+
<p>users( params = {} )</p>
|
117
|
+
</li><li>
|
118
|
+
<p>exists_user?( name )</p>
|
119
|
+
</li></ul>
|
120
|
+
</li><li>
|
121
|
+
<p><a href="doc/usergroups.md">Usergroups</a></p>
|
122
|
+
<ul><li>
|
123
|
+
<p>add_usergroup( params = {} )</p>
|
124
|
+
</li><li>
|
125
|
+
<p>delete_usergroup( params = {} )</p>
|
126
|
+
</li><li>
|
127
|
+
<p>usergroups( params = {} )</p>
|
128
|
+
</li><li>
|
129
|
+
<p>exists_usergroup?( name )</p>
|
130
|
+
</li></ul>
|
131
|
+
</li><li>
|
132
|
+
<p><a href="doc/hosts.md">Hosts</a></p>
|
133
|
+
<ul><li>
|
134
|
+
<p>add_host( params = {} )</p>
|
135
|
+
</li><li>
|
136
|
+
<p>delete_host( params = {} )</p>
|
137
|
+
</li><li>
|
138
|
+
<p>hosts( params = {} )</p>
|
139
|
+
</li><li>
|
140
|
+
<p>exists_host?( name )</p>
|
141
|
+
</li><li>
|
142
|
+
<p>host_objects( params = {} )</p>
|
143
|
+
</li><li>
|
144
|
+
<p>host_problems</p>
|
145
|
+
</li><li>
|
146
|
+
<p>problem_hosts( max_items = 5 )</p>
|
147
|
+
</li><li>
|
148
|
+
<p>host_severity( host )</p>
|
149
|
+
</li></ul>
|
150
|
+
</li><li>
|
151
|
+
<p><a href="doc/hostgroups.md">Hostgroups</a></p>
|
152
|
+
<ul><li>
|
153
|
+
<p>add_hostgroup(params = {})</p>
|
154
|
+
</li><li>
|
155
|
+
<p>delete_hostgroup(params = {})</p>
|
156
|
+
</li><li>
|
157
|
+
<p>hostgroups(params = {})</p>
|
158
|
+
</li><li>
|
159
|
+
<p>exists_hostgroup?(name)</p>
|
160
|
+
</li></ul>
|
161
|
+
</li><li>
|
162
|
+
<p><a href="doc/services.md">Services</a></p>
|
163
|
+
<ul><li>
|
164
|
+
<p>add_services( host, services = {} )</p>
|
165
|
+
</li><li>
|
166
|
+
<p>unhandled_services( params = {} )</p>
|
167
|
+
</li><li>
|
168
|
+
<p>services( params = {} )</p>
|
169
|
+
</li><li>
|
170
|
+
<p>exists_service?( params = {} )</p>
|
171
|
+
</li><li>
|
172
|
+
<p>service_objects( params = {} )</p>
|
173
|
+
</li><li>
|
174
|
+
<p>service_problems</p>
|
175
|
+
</li><li>
|
176
|
+
<p>problem_services( max_items = 5 )</p>
|
177
|
+
</li><li>
|
178
|
+
<p>update_host( hash, host )</p>
|
179
|
+
</li><li>
|
180
|
+
<p>service_severity( service )</p>
|
181
|
+
</li></ul>
|
182
|
+
</li><li>
|
183
|
+
<p><a href="doc/servicegroups.md">Servicegroups</a></p>
|
184
|
+
<ul><li>
|
185
|
+
<p>add_servicegroup( params = {} )</p>
|
186
|
+
</li><li>
|
187
|
+
<p>delete_servicegroup( params = {} )</p>
|
188
|
+
</li><li>
|
189
|
+
<p>servicegroups( params = {} )</p>
|
190
|
+
</li><li>
|
191
|
+
<p>exists_servicegroup?( name )</p>
|
192
|
+
</li></ul>
|
193
|
+
</li><li>
|
194
|
+
<p><a href="doc/downtimes.md">Downtimes</a></p>
|
195
|
+
<ul><li>
|
196
|
+
<p>add_downtime( params = {} )</p>
|
197
|
+
</li><li>
|
198
|
+
<p>downtimes( params = {} )</p>
|
199
|
+
</li></ul>
|
200
|
+
</li><li>
|
201
|
+
<p><a href="doc/notifications.md">Notifications</a></p>
|
202
|
+
<ul><li>
|
203
|
+
<p>enable_host_notification( host )</p>
|
204
|
+
</li><li>
|
205
|
+
<p>disable_host_notification( host )</p>
|
206
|
+
</li><li>
|
207
|
+
<p>enable_service_notification( params = {} )</p>
|
208
|
+
</li><li>
|
209
|
+
<p>disable_service_notification( host )</p>
|
210
|
+
</li><li>
|
211
|
+
<p>enable_hostgroup_notification( group )</p>
|
212
|
+
</li><li>
|
213
|
+
<p>disable_hostgroup_notification( group )</p>
|
214
|
+
</li><li>
|
215
|
+
<p>notifications( params = {} )</p>
|
216
|
+
</li><li>
|
217
|
+
<p>host_notification( params = {} )</p>
|
218
|
+
</li><li>
|
219
|
+
<p>hostgroup_notification( params = {} )</p>
|
220
|
+
</li><li>
|
221
|
+
<p>service_notification( params = {} )</p>
|
222
|
+
</li></ul>
|
223
|
+
</li></ul>
|
224
|
+
|
225
|
+
<h2 id="label-create+a+own+gem+File">create a own gem File</h2>
|
226
|
+
|
227
|
+
<pre class="code ruby"><code class="ruby">#$ gem build icinga2.gemspec
|
228
|
+
Successfully built RubyGem
|
229
|
+
Name: icinga2
|
230
|
+
Version: 0.6.0
|
231
|
+
File: icinga2-0.6.0.gem</code></pre>
|
232
|
+
|
233
|
+
<h2 id="label-install+gem">install gem</h2>
|
234
|
+
|
235
|
+
<pre class="code ruby"><code class="ruby">#$ gem install icinga2
|
236
|
+
Successfully installed icinga2-0.6.0
|
237
|
+
1 gem installed</code></pre>
|
238
|
+
|
239
|
+
<h2 id="label-test+via+CLI">test via CLI</h2>
|
240
|
+
|
241
|
+
<pre class="code ruby"><code class="ruby">#$ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga
|
242
|
+
#$ irb
|
243
|
+
2.3.0 :001 > require 'icinga2'
|
244
|
+
=> true
|
245
|
+
2.3.0 :002 > config = { :icinga => { :host => 'localhost', :api => { :user => 'root', :pass => 'icinga' } } }
|
246
|
+
=> {:icinga=>{:host=>"localhost", :api=>{:user=>"root", :pass=>"icinga"}}}
|
247
|
+
2.3.0 :003 > i = Icinga2::Client.new( config )</code></pre>
|
248
|
+
|
249
|
+
<h2 id="label-test+via+example">test via example</h2>
|
250
|
+
|
251
|
+
<pre class="code ruby"><code class="ruby"><span class='comment'>#$ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga
|
252
|
+
</span><span class='comment'>#$ ruby examples/test.rb
|
253
|
+
</span></code></pre>
|
254
|
+
|
255
|
+
<h2 id="label-Contributing">Contributing</h2>
|
256
|
+
<ol><li>
|
257
|
+
<p>Fork it</p>
|
258
|
+
</li><li>
|
259
|
+
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
260
|
+
</li><li>
|
261
|
+
<p>Commit your changes (<code>git commit -am 'Add some
|
262
|
+
feature'</code>)</p>
|
263
|
+
</li><li>
|
264
|
+
<p>Push to the branch (<code>git push origin my-new-feature</code>)</p>
|
265
|
+
</li><li>
|
266
|
+
<p>Create new Pull Request</p>
|
267
|
+
</li></ol>
|
268
|
+
</div></div>
|
269
|
+
|
270
|
+
<div id="footer">
|
271
|
+
Generated on Sat Jun 17 14:00:30 2017 by
|
272
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
273
|
+
0.9.9 (ruby-2.3.4).
|
274
|
+
</div>
|
275
|
+
|
276
|
+
</div>
|
277
|
+
</body>
|
278
|
+
</html>
|