icinga2 0.8.1.2 → 0.9.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@
43
43
 
44
44
  <ul id="full_list" class="class">
45
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> &lt; 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::Statistics' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Statistics.html" title="Icinga2::Statistics (module)">Statistics</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>
46
+ <li id='object_Array' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Boolean' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Boolean.html" title="Boolean (module)">Boolean</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_FalseClass' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="FalseClass.html" title="FalseClass (class)">FalseClass</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Hash' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Hash.html" title="Hash (class)">Hash</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><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> &lt; 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::Statistics' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Icinga2/Statistics.html" title="Icinga2::Statistics (module)">Statistics</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></ul></li><li id='object_Logging' class='even'><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><li id='object_Object' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span> &lt; BasicObject<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Time' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Time.html" title="Time (class)">Time</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_TrueClass' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="TrueClass.html" title="TrueClass (class)">TrueClass</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li>
47
47
 
48
48
  </ul>
49
49
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.4
10
10
 
11
11
  </title>
12
12
 
@@ -28,7 +28,7 @@
28
28
  </head>
29
29
  <body>
30
30
  <div class="nav_wrap">
31
- <iframe id="nav" src="file_list.html?1"></iframe>
31
+ <iframe id="nav" src="file_list.html"></iframe>
32
32
  <div id="resizer"></div>
33
33
  </div>
34
34
 
@@ -57,28 +57,44 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
+ <iframe id="search_frame" src="file_list.html"></iframe>
61
+
60
62
  <div id="content"><div id='filecontents'>
61
63
  <h1 id="label-ruby-icinga2">ruby-icinga2</h1>
62
64
 
63
- <p>Ruby Class for the Icinga2 API</p>
65
+ <p>An enhanced ruby gem to communicate with Icinga2 API</p>
66
+
67
+ <p><a href="https://badge.fury.io/rb/icinga2"><img
68
+ src="https://badge.fury.io/rb/icinga2.svg"></a></p>
69
+
70
+ <p><a href="https://travis-ci.org/bodsch/ruby-icinga2"><img
71
+ src="https://travis-ci.org/bodsch/ruby-icinga2.svg"></a> <a
72
+ href="http://ruby-gem-downloads-badge.herokuapp.com/icinga2"><img
73
+ src="http://ruby-gem-downloads-badge.herokuapp.com/icinga2"></a> <a
74
+ href="http://ruby-gem-downloads-badge.herokuapp.com/icinga2"><img
75
+ src="http://ruby-gem-downloads-badge.herokuapp.com/icinga2?type=total&metric=true&label=downloads-total"></a>
76
+ <a href="https://gemnasium.com/github.com/bodsch/ruby-icinga2"><img
77
+ src="https://gemnasium.com/badges/github.com/bodsch/ruby-icinga2.svg"></a></p>
64
78
 
65
79
  <h2 id="label-Requirements">Requirements</h2>
66
80
  <ul><li>
67
- <p>ruby version ~&gt; 2.3</p>
81
+ <p>ruby version =&gt; 2.0</p>
68
82
  </li><li>
69
83
  <p>rest-client ~&gt; 2.0</p>
70
84
  </li><li>
71
- <p>openssl ~&gt; 2.0</p>
72
- </li><li>
73
85
  <p>json ~&gt; 2.1</p>
86
+ </li><li>
87
+ <p>openssl ~&gt; 2.0 (only with ruby &gt;= 2.3)</p>
88
+ </li><li>
89
+ <p>ruby_dig (only with ruby &lt; 2.3)</p>
74
90
  </li></ul>
75
91
 
76
- <h2 id="label-install">install</h2>
92
+ <h2 id="label-Install">Install</h2>
77
93
 
78
94
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_icinga2'>icinga2</span>
79
95
  </code></pre>
80
96
 
81
- <h2 id="label-usage">usage</h2>
97
+ <h2 id="label-Usage">Usage</h2>
82
98
 
83
99
  <p>create an instance</p>
84
100
 
@@ -89,15 +105,56 @@
89
105
  <span class='symbol'>:port</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaApiPort'>icingaApiPort</span><span class='comma'>,</span>
90
106
  <span class='symbol'>:user</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaApiUser'>icingaApiUser</span><span class='comma'>,</span>
91
107
  <span class='symbol'>:pass</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaApiPass'>icingaApiPass</span>
92
- <span class='rbrace'>}</span><span class='comma'>,</span>
93
- <span class='symbol'>:cluster</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaCluster'>icingaCluster</span><span class='comma'>,</span>
94
- <span class='symbol'>:satellite</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaSatellite'>icingaSatellite</span><span class='comma'>,</span>
108
+ <span class='rbrace'>}</span>
95
109
  <span class='rbrace'>}</span>
96
110
  <span class='rbrace'>}</span>
97
111
 
98
112
  <span class='ivar'>@icinga</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>
99
113
  </code></pre>
100
114
 
115
+ <h3 id="label-Use+the+examples">Use the examples</h3>
116
+
117
+ <p>You can use the <a href="https://github.com/Icinga/icinga-vagrant">Icinga
118
+ Vagrant-Box</a> from the Icinga Team or my own <a
119
+ href="https://hub.docker.com/r/bodsch/docker-icinga2/">Docker Container</a>
120
+ as Datasource.</p>
121
+
122
+ <p><strong>Remember</strong> Change the exported Environment Variables to your
123
+ choosed Datasource!</p>
124
+
125
+ <p>you can find many examples under the directory <code>examples</code>:</p>
126
+
127
+ <pre class="code ruby"><code class="ruby"><span class='comment'>#$ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga
128
+ </span><span class='comment'>#$ ruby examples/informations.rb
129
+ </span><span class='comment'>#$ ruby examples/statistics.rb
130
+ </span><span class='comment'>#$ ruby examples/users.rb
131
+ </span></code></pre>
132
+
133
+ <p>and so on.</p>
134
+
135
+ <h3 id="label-Test+via+CLI">Test via CLI</h3>
136
+
137
+ <pre class="code ruby"><code class="ruby">#$ irb
138
+ 2.3.0 :001 &gt; require &#39;icinga2&#39;
139
+ =&gt; true
140
+ 2.3.0 :002 &gt; config = { :icinga =&gt; { :host =&gt; &#39;localhost&#39;, :api =&gt; { :user =&gt; &#39;root&#39;, :pass =&gt; &#39;icinga&#39; } } }
141
+ =&gt; {:icinga=&gt;{:host=&gt;&quot;localhost&quot;, :api=&gt;{:user=&gt;&quot;root&quot;, :pass=&gt;&quot;icinga&quot;}}}
142
+ 2.3.0 :003 &gt; i = Icinga2::Client.new( config )</code></pre>
143
+
144
+ <h2 id="label-Create+a+own+gem+file">Create a own gem file</h2>
145
+
146
+ <pre class="code ruby"><code class="ruby">#$ gem build icinga2.gemspec
147
+ Successfully built RubyGem
148
+ Name: icinga2
149
+ Version: 0.9.0
150
+ File: icinga2-0.9.0.gem</code></pre>
151
+
152
+ <h2 id="label-Install+local+gem">Install local gem</h2>
153
+
154
+ <pre class="code ruby"><code class="ruby">#$ gem install icinga2
155
+ Successfully installed icinga2-0.9.0
156
+ 1 gem installed</code></pre>
157
+
101
158
  <h2 id="label-Status">Status</h2>
102
159
 
103
160
  <p>supports the following API Calls:</p>
@@ -144,8 +201,6 @@
144
201
  </li><li>
145
202
  <p><a href="doc/hosts.md#list-host-objects">list host objects</a></p>
146
203
  </li><li>
147
- <p><a href="doc/hosts.md#hosts-adjusted">adjusted hosts state</a></p>
148
- </li><li>
149
204
  <p><a href="doc/hosts.md#count-hosts-with-problems">count of hosts with
150
205
  problems</a></p>
151
206
  </li><li>
@@ -172,17 +227,11 @@ problems</a></p>
172
227
  </li><li>
173
228
  <p><a href="doc/services.md">Services</a></p>
174
229
  <ul><li>
175
- <p><a href="doc/services.md#add-service">add service</a> (<strong>this
176
- function is not operable yet!</strong>)</p>
177
- </li><li>
178
- <p><a href="doc/services.md#delete-service">delete service</a> (<strong>not
179
- yet implemented</strong>)</p>
230
+ <p><a href="doc/services.md#add-service">add service</a></p>
180
231
  </li><li>
181
- <p><a href="doc/services.md#add-service">add service</a> (<strong>this
182
- function is not operable yet!</strong>)</p>
232
+ <p><a href="doc/services.md#delete-service">delete service</a></p>
183
233
  </li><li>
184
- <p><a href="doc/services.md#unhandled-services">list unhandled services</a>
185
- (<strong>not yet implemented</strong>)</p>
234
+ <p><a href="doc/services.md#unhandled-services">list unhandled services</a></p>
186
235
  </li><li>
187
236
  <p><a href="doc/services.md#list-services">list services</a></p>
188
237
  </li><li>
@@ -190,23 +239,20 @@ function is not operable yet!</strong>)</p>
190
239
  </li><li>
191
240
  <p><a href="doc/services.md#list-service-objects">list service objects</a></p>
192
241
  </li><li>
193
- <p><a href="doc/services.md#services-adjusted">adjusted service state</a></p>
194
- </li><li>
195
242
  <p><a href="doc/services.md#count-services-with-problems">count services with
196
243
  problems</a></p>
197
244
  </li><li>
198
245
  <p><a href="doc/services.md#list-services-with-problems">list of services with
199
246
  problems</a></p>
200
247
  </li><li>
201
- <p><a href="doc/services.md#update-host">update host</a> (<strong>this
202
- function is not operable yet!</strong>)</p>
203
- </li><li>
204
248
  <p><a href="doc/services.md#count-all-services">count of all services</a></p>
205
249
  </li><li>
206
250
  <p><a href="doc/services.md#count-all-services-handled">count all services
207
251
  with handled problems</a></p>
208
252
  </li><li>
209
253
  <p>calculate service severity (protected)</p>
254
+ </li><li>
255
+ <p>update host (private)</p>
210
256
  </li></ul>
211
257
  </li><li>
212
258
  <p><a href="doc/servicegroups.md">Servicegroups</a></p>
@@ -275,35 +321,6 @@ api</a></p>
275
321
  </li></ul>
276
322
  </li></ul>
277
323
 
278
- <h2 id="label-create+a+own+gem+File">create a own gem File</h2>
279
-
280
- <pre class="code ruby"><code class="ruby">#$ gem build icinga2.gemspec
281
- Successfully built RubyGem
282
- Name: icinga2
283
- Version: 0.6.0
284
- File: icinga2-0.6.0.gem</code></pre>
285
-
286
- <h2 id="label-install+gem">install gem</h2>
287
-
288
- <pre class="code ruby"><code class="ruby">#$ gem install icinga2
289
- Successfully installed icinga2-0.6.0
290
- 1 gem installed</code></pre>
291
-
292
- <h2 id="label-test+via+CLI">test via CLI</h2>
293
-
294
- <pre class="code ruby"><code class="ruby">#$ irb
295
- 2.3.0 :001 &gt; require &#39;icinga2&#39;
296
- =&gt; true
297
- 2.3.0 :002 &gt; config = { :icinga =&gt; { :host =&gt; &#39;localhost&#39;, :api =&gt; { :user =&gt; &#39;root&#39;, :pass =&gt; &#39;icinga&#39; } } }
298
- =&gt; {:icinga=&gt;{:host=&gt;&quot;localhost&quot;, :api=&gt;{:user=&gt;&quot;root&quot;, :pass=&gt;&quot;icinga&quot;}}}
299
- 2.3.0 :003 &gt; i = Icinga2::Client.new( config )</code></pre>
300
-
301
- <h2 id="label-test+via+example">test via example</h2>
302
-
303
- <pre class="code ruby"><code class="ruby"><span class='comment'>#$ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga
304
- </span><span class='comment'>#$ ruby examples/test.rb
305
- </span></code></pre>
306
-
307
324
  <h2 id="label-Contributing">Contributing</h2>
308
325
  <ol><li>
309
326
  <p>Fork it</p>
@@ -320,9 +337,9 @@ feature&#39;</code>)</p>
320
337
  </div></div>
321
338
 
322
339
  <div id="footer">
323
- Generated on Tue Aug 22 11:29:51 2017 by
340
+ Generated on Sun Nov 12 15:48:13 2017 by
324
341
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
325
- 0.9.9 (ruby-2.3.4).
342
+ 0.9.4 (ruby-2.2.8).
326
343
  </div>
327
344
 
328
345
  </div>
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.9</title>
5
+ <title>Documentation by YARD 0.9.4</title>
6
6
  </head>
7
7
  <script type="text/javascript" charset="utf-8">
8
8
  var match = unescape(window.location.hash).match(/^#!(.+)/);
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.9
9
+ &mdash; Documentation by YARD 0.9.4
10
10
 
11
11
  </title>
12
12
 
@@ -28,7 +28,7 @@
28
28
  </head>
29
29
  <body>
30
30
  <div class="nav_wrap">
31
- <iframe id="nav" src="class_list.html?1"></iframe>
31
+ <iframe id="nav" src="class_list.html"></iframe>
32
32
  <div id="resizer"></div>
33
33
  </div>
34
34
 
@@ -57,28 +57,44 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
+ <iframe id="search_frame" src="class_list.html"></iframe>
61
+
60
62
  <div id="content"><div id='filecontents'>
61
63
  <h1 id="label-ruby-icinga2">ruby-icinga2</h1>
62
64
 
63
- <p>Ruby Class for the Icinga2 API</p>
65
+ <p>An enhanced ruby gem to communicate with Icinga2 API</p>
66
+
67
+ <p><a href="https://badge.fury.io/rb/icinga2"><img
68
+ src="https://badge.fury.io/rb/icinga2.svg"></a></p>
69
+
70
+ <p><a href="https://travis-ci.org/bodsch/ruby-icinga2"><img
71
+ src="https://travis-ci.org/bodsch/ruby-icinga2.svg"></a> <a
72
+ href="http://ruby-gem-downloads-badge.herokuapp.com/icinga2"><img
73
+ src="http://ruby-gem-downloads-badge.herokuapp.com/icinga2"></a> <a
74
+ href="http://ruby-gem-downloads-badge.herokuapp.com/icinga2"><img
75
+ src="http://ruby-gem-downloads-badge.herokuapp.com/icinga2?type=total&metric=true&label=downloads-total"></a>
76
+ <a href="https://gemnasium.com/github.com/bodsch/ruby-icinga2"><img
77
+ src="https://gemnasium.com/badges/github.com/bodsch/ruby-icinga2.svg"></a></p>
64
78
 
65
79
  <h2 id="label-Requirements">Requirements</h2>
66
80
  <ul><li>
67
- <p>ruby version ~&gt; 2.3</p>
81
+ <p>ruby version =&gt; 2.0</p>
68
82
  </li><li>
69
83
  <p>rest-client ~&gt; 2.0</p>
70
84
  </li><li>
71
- <p>openssl ~&gt; 2.0</p>
72
- </li><li>
73
85
  <p>json ~&gt; 2.1</p>
86
+ </li><li>
87
+ <p>openssl ~&gt; 2.0 (only with ruby &gt;= 2.3)</p>
88
+ </li><li>
89
+ <p>ruby_dig (only with ruby &lt; 2.3)</p>
74
90
  </li></ul>
75
91
 
76
- <h2 id="label-install">install</h2>
92
+ <h2 id="label-Install">Install</h2>
77
93
 
78
94
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_icinga2'>icinga2</span>
79
95
  </code></pre>
80
96
 
81
- <h2 id="label-usage">usage</h2>
97
+ <h2 id="label-Usage">Usage</h2>
82
98
 
83
99
  <p>create an instance</p>
84
100
 
@@ -89,15 +105,56 @@
89
105
  <span class='symbol'>:port</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaApiPort'>icingaApiPort</span><span class='comma'>,</span>
90
106
  <span class='symbol'>:user</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaApiUser'>icingaApiUser</span><span class='comma'>,</span>
91
107
  <span class='symbol'>:pass</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaApiPass'>icingaApiPass</span>
92
- <span class='rbrace'>}</span><span class='comma'>,</span>
93
- <span class='symbol'>:cluster</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaCluster'>icingaCluster</span><span class='comma'>,</span>
94
- <span class='symbol'>:satellite</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_icingaSatellite'>icingaSatellite</span><span class='comma'>,</span>
108
+ <span class='rbrace'>}</span>
95
109
  <span class='rbrace'>}</span>
96
110
  <span class='rbrace'>}</span>
97
111
 
98
112
  <span class='ivar'>@icinga</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>
99
113
  </code></pre>
100
114
 
115
+ <h3 id="label-Use+the+examples">Use the examples</h3>
116
+
117
+ <p>You can use the <a href="https://github.com/Icinga/icinga-vagrant">Icinga
118
+ Vagrant-Box</a> from the Icinga Team or my own <a
119
+ href="https://hub.docker.com/r/bodsch/docker-icinga2/">Docker Container</a>
120
+ as Datasource.</p>
121
+
122
+ <p><strong>Remember</strong> Change the exported Environment Variables to your
123
+ choosed Datasource!</p>
124
+
125
+ <p>you can find many examples under the directory <code>examples</code>:</p>
126
+
127
+ <pre class="code ruby"><code class="ruby"><span class='comment'>#$ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga
128
+ </span><span class='comment'>#$ ruby examples/informations.rb
129
+ </span><span class='comment'>#$ ruby examples/statistics.rb
130
+ </span><span class='comment'>#$ ruby examples/users.rb
131
+ </span></code></pre>
132
+
133
+ <p>and so on.</p>
134
+
135
+ <h3 id="label-Test+via+CLI">Test via CLI</h3>
136
+
137
+ <pre class="code ruby"><code class="ruby">#$ irb
138
+ 2.3.0 :001 &gt; require &#39;icinga2&#39;
139
+ =&gt; true
140
+ 2.3.0 :002 &gt; config = { :icinga =&gt; { :host =&gt; &#39;localhost&#39;, :api =&gt; { :user =&gt; &#39;root&#39;, :pass =&gt; &#39;icinga&#39; } } }
141
+ =&gt; {:icinga=&gt;{:host=&gt;&quot;localhost&quot;, :api=&gt;{:user=&gt;&quot;root&quot;, :pass=&gt;&quot;icinga&quot;}}}
142
+ 2.3.0 :003 &gt; i = Icinga2::Client.new( config )</code></pre>
143
+
144
+ <h2 id="label-Create+a+own+gem+file">Create a own gem file</h2>
145
+
146
+ <pre class="code ruby"><code class="ruby">#$ gem build icinga2.gemspec
147
+ Successfully built RubyGem
148
+ Name: icinga2
149
+ Version: 0.9.0
150
+ File: icinga2-0.9.0.gem</code></pre>
151
+
152
+ <h2 id="label-Install+local+gem">Install local gem</h2>
153
+
154
+ <pre class="code ruby"><code class="ruby">#$ gem install icinga2
155
+ Successfully installed icinga2-0.9.0
156
+ 1 gem installed</code></pre>
157
+
101
158
  <h2 id="label-Status">Status</h2>
102
159
 
103
160
  <p>supports the following API Calls:</p>
@@ -144,8 +201,6 @@
144
201
  </li><li>
145
202
  <p><a href="doc/hosts.md#list-host-objects">list host objects</a></p>
146
203
  </li><li>
147
- <p><a href="doc/hosts.md#hosts-adjusted">adjusted hosts state</a></p>
148
- </li><li>
149
204
  <p><a href="doc/hosts.md#count-hosts-with-problems">count of hosts with
150
205
  problems</a></p>
151
206
  </li><li>
@@ -172,17 +227,11 @@ problems</a></p>
172
227
  </li><li>
173
228
  <p><a href="doc/services.md">Services</a></p>
174
229
  <ul><li>
175
- <p><a href="doc/services.md#add-service">add service</a> (<strong>this
176
- function is not operable yet!</strong>)</p>
177
- </li><li>
178
- <p><a href="doc/services.md#delete-service">delete service</a> (<strong>not
179
- yet implemented</strong>)</p>
230
+ <p><a href="doc/services.md#add-service">add service</a></p>
180
231
  </li><li>
181
- <p><a href="doc/services.md#add-service">add service</a> (<strong>this
182
- function is not operable yet!</strong>)</p>
232
+ <p><a href="doc/services.md#delete-service">delete service</a></p>
183
233
  </li><li>
184
- <p><a href="doc/services.md#unhandled-services">list unhandled services</a>
185
- (<strong>not yet implemented</strong>)</p>
234
+ <p><a href="doc/services.md#unhandled-services">list unhandled services</a></p>
186
235
  </li><li>
187
236
  <p><a href="doc/services.md#list-services">list services</a></p>
188
237
  </li><li>
@@ -190,23 +239,20 @@ function is not operable yet!</strong>)</p>
190
239
  </li><li>
191
240
  <p><a href="doc/services.md#list-service-objects">list service objects</a></p>
192
241
  </li><li>
193
- <p><a href="doc/services.md#services-adjusted">adjusted service state</a></p>
194
- </li><li>
195
242
  <p><a href="doc/services.md#count-services-with-problems">count services with
196
243
  problems</a></p>
197
244
  </li><li>
198
245
  <p><a href="doc/services.md#list-services-with-problems">list of services with
199
246
  problems</a></p>
200
247
  </li><li>
201
- <p><a href="doc/services.md#update-host">update host</a> (<strong>this
202
- function is not operable yet!</strong>)</p>
203
- </li><li>
204
248
  <p><a href="doc/services.md#count-all-services">count of all services</a></p>
205
249
  </li><li>
206
250
  <p><a href="doc/services.md#count-all-services-handled">count all services
207
251
  with handled problems</a></p>
208
252
  </li><li>
209
253
  <p>calculate service severity (protected)</p>
254
+ </li><li>
255
+ <p>update host (private)</p>
210
256
  </li></ul>
211
257
  </li><li>
212
258
  <p><a href="doc/servicegroups.md">Servicegroups</a></p>
@@ -275,35 +321,6 @@ api</a></p>
275
321
  </li></ul>
276
322
  </li></ul>
277
323
 
278
- <h2 id="label-create+a+own+gem+File">create a own gem File</h2>
279
-
280
- <pre class="code ruby"><code class="ruby">#$ gem build icinga2.gemspec
281
- Successfully built RubyGem
282
- Name: icinga2
283
- Version: 0.6.0
284
- File: icinga2-0.6.0.gem</code></pre>
285
-
286
- <h2 id="label-install+gem">install gem</h2>
287
-
288
- <pre class="code ruby"><code class="ruby">#$ gem install icinga2
289
- Successfully installed icinga2-0.6.0
290
- 1 gem installed</code></pre>
291
-
292
- <h2 id="label-test+via+CLI">test via CLI</h2>
293
-
294
- <pre class="code ruby"><code class="ruby">#$ irb
295
- 2.3.0 :001 &gt; require &#39;icinga2&#39;
296
- =&gt; true
297
- 2.3.0 :002 &gt; config = { :icinga =&gt; { :host =&gt; &#39;localhost&#39;, :api =&gt; { :user =&gt; &#39;root&#39;, :pass =&gt; &#39;icinga&#39; } } }
298
- =&gt; {:icinga=&gt;{:host=&gt;&quot;localhost&quot;, :api=&gt;{:user=&gt;&quot;root&quot;, :pass=&gt;&quot;icinga&quot;}}}
299
- 2.3.0 :003 &gt; i = Icinga2::Client.new( config )</code></pre>
300
-
301
- <h2 id="label-test+via+example">test via example</h2>
302
-
303
- <pre class="code ruby"><code class="ruby"><span class='comment'>#$ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga
304
- </span><span class='comment'>#$ ruby examples/test.rb
305
- </span></code></pre>
306
-
307
324
  <h2 id="label-Contributing">Contributing</h2>
308
325
  <ol><li>
309
326
  <p>Fork it</p>
@@ -320,9 +337,9 @@ feature&#39;</code>)</p>
320
337
  </div></div>
321
338
 
322
339
  <div id="footer">
323
- Generated on Tue Aug 22 11:29:51 2017 by
340
+ Generated on Sun Nov 12 15:48:13 2017 by
324
341
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
325
- 0.9.9 (ruby-2.3.4).
342
+ 0.9.4 (ruby-2.2.8).
326
343
  </div>
327
344
 
328
345
  </div>