zabbix_sender_api 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/zabbix_sender_api/api.rb +54 -6
- data/lib/zabbix_sender_api/version.rb +1 -1
- data/public/Zabbix/AgentConfiguration.html +6 -6
- data/public/Zabbix/Sender/Batch.html +133 -57
- data/public/Zabbix/Sender/Connection.html +7 -7
- data/public/Zabbix/Sender/Discovery.html +43 -43
- data/public/Zabbix/Sender/ItemData.html +49 -49
- data/public/Zabbix/Sender/NanosecondItemData.html +333 -0
- data/public/Zabbix/Sender/Pipe.html +43 -39
- data/public/Zabbix/Sender/Socket.html +7 -7
- data/public/Zabbix/Sender.html +5 -5
- data/public/Zabbix.html +4 -4
- data/public/ZabbixSenderApi/Error.html +4 -4
- data/public/ZabbixSenderApi.html +5 -5
- data/public/_index.html +23 -8
- data/public/class_list.html +1 -1
- data/public/file.CHANGELOG.html +17 -23
- data/public/file.LICENSE.html +4 -4
- data/public/file.README.html +76 -66
- data/public/frames.html +10 -5
- data/public/index.html +76 -66
- data/public/method_list.html +41 -17
- data/public/top-level-namespace.html +4 -4
- metadata +4 -3
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Zabbix::Sender::Discovery
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.36
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -104,7 +104,7 @@
|
|
104
104
|
<h2>Overview</h2><div class="docstring">
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
|
-
<p>Discovery instances are a special type of ItemData that you will typically create and hang on to as you accumulate (discover) related entities. You then pass the discover instance into a Batch via addDiscovery(), which
|
107
|
+
<p>Discovery instances are a special type of ItemData that you will typically create and hang on to as you accumulate (discover) related entities. You then pass the discover instance into a Batch via addDiscovery(), which includes it in the batch of data just like an ordinary ItemData instance.</p>
|
108
108
|
|
109
109
|
|
110
110
|
</div>
|
@@ -326,13 +326,13 @@
|
|
326
326
|
<pre class="lines">
|
327
327
|
|
328
328
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
329
|
+
339
|
330
|
+
340
|
331
|
+
341
|
332
|
+
342</pre>
|
333
333
|
</td>
|
334
334
|
<td>
|
335
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
335
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 339</span>
|
336
336
|
|
337
337
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>key:</span> <span class='kw'>nil</span><span class='comma'>,</span><span class='label'>value:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timestamp:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>hostname:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
338
338
|
<span class='kw'>super</span>
|
@@ -376,12 +376,12 @@
|
|
376
376
|
<pre class="lines">
|
377
377
|
|
378
378
|
|
379
|
-
|
380
|
-
|
381
|
-
|
379
|
+
335
|
380
|
+
336
|
381
|
+
337</pre>
|
382
382
|
</td>
|
383
383
|
<td>
|
384
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
384
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 335</span>
|
385
385
|
|
386
386
|
<span class='kw'>def</span> <span class='id identifier rubyid_entities'>entities</span>
|
387
387
|
<span class='ivar'>@entities</span>
|
@@ -410,9 +410,9 @@
|
|
410
410
|
</h3><div class="docstring">
|
411
411
|
<div class="discussion">
|
412
412
|
|
413
|
-
<p>This is how you pass data to zabbix that you use to construct items from item templates. Pass in as many key-value pairs as you need. You
|
413
|
+
<p>This is how you pass data to zabbix that you use to construct items from item templates. Pass in as many key-value pairs as you need. You’ll reference these in the item prototype like #MYKEY</p>
|
414
414
|
|
415
|
-
<p>Note that the keys (which you can pass as symbols if you want) are forced to uppercase. This is here because the author once spent way too much time trying to figure out why discovery wasn
|
415
|
+
<p>Note that the keys (which you can pass as symbols if you want) are forced to uppercase. This is here because the author once spent way too much time trying to figure out why discovery wasn’t working right one day. All caps seems to fix the issue.</p>
|
416
416
|
|
417
417
|
|
418
418
|
</div>
|
@@ -426,17 +426,17 @@
|
|
426
426
|
<pre class="lines">
|
427
427
|
|
428
428
|
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
429
|
+
351
|
430
|
+
352
|
431
|
+
353
|
432
|
+
354
|
433
|
+
355
|
434
|
+
356
|
435
|
+
357
|
436
|
+
358</pre>
|
437
437
|
</td>
|
438
438
|
<td>
|
439
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
439
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 351</span>
|
440
440
|
|
441
441
|
<span class='kw'>def</span> <span class='id identifier rubyid_add_entity'>add_entity</span><span class='lparen'>(</span><span class='id identifier rubyid_aHash'>aHash</span><span class='rparen'>)</span>
|
442
442
|
<span class='comment'># just send in key value pairs - these will be the variables you can use in the discovery item prototypes
|
@@ -463,7 +463,7 @@
|
|
463
463
|
</h3><div class="docstring">
|
464
464
|
<div class="discussion">
|
465
465
|
|
466
|
-
<p>Render this discovery as the structure an external discovery script should return. You can use this if you
|
466
|
+
<p>Render this discovery as the structure an external discovery script should return. You can use this if you’re writing custom external discovery logic</p>
|
467
467
|
|
468
468
|
|
469
469
|
</div>
|
@@ -477,19 +477,19 @@
|
|
477
477
|
<pre class="lines">
|
478
478
|
|
479
479
|
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
480
|
+
363
|
481
|
+
364
|
482
|
+
365
|
483
|
+
366
|
484
|
+
367</pre>
|
485
485
|
</td>
|
486
486
|
<td>
|
487
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
487
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 363</span>
|
488
488
|
|
489
489
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_discodata'>to_discodata</span>
|
490
490
|
<span class='id identifier rubyid_disco'>disco</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>data</span><span class='tstring_end'>'</span></span><span class='op'>=></span><span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='rbrace'>}</span>
|
491
491
|
<span class='id identifier rubyid_disco'>disco</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>data</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@entities</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
|
492
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_disco'>disco</span>
|
492
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_disco'>disco</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
493
493
|
<span class='kw'>end</span></pre>
|
494
494
|
</td>
|
495
495
|
</tr>
|
@@ -522,13 +522,13 @@
|
|
522
522
|
<pre class="lines">
|
523
523
|
|
524
524
|
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
525
|
+
371
|
526
|
+
372
|
527
|
+
373
|
528
|
+
374</pre>
|
529
529
|
</td>
|
530
530
|
<td>
|
531
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
531
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 371</span>
|
532
532
|
|
533
533
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_senderline'>to_senderline</span>
|
534
534
|
<span class='ivar'>@value</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_discodata'>to_discodata</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
@@ -565,13 +565,13 @@
|
|
565
565
|
<pre class="lines">
|
566
566
|
|
567
567
|
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
568
|
+
377
|
569
|
+
378
|
570
|
+
379
|
571
|
+
380</pre>
|
572
572
|
</td>
|
573
573
|
<td>
|
574
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
574
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 377</span>
|
575
575
|
|
576
576
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_senderstruct'>to_senderstruct</span>
|
577
577
|
<span class='ivar'>@value</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_discodata'>to_discodata</span>
|
@@ -587,9 +587,9 @@
|
|
587
587
|
</div>
|
588
588
|
|
589
589
|
<div id="footer">
|
590
|
-
Generated on
|
591
|
-
<a href="
|
592
|
-
0.9.
|
590
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
591
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
592
|
+
0.9.36 (ruby-3.2.2).
|
593
593
|
</div>
|
594
594
|
|
595
595
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Zabbix::Sender::ItemData
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.36
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -112,7 +112,7 @@
|
|
112
112
|
|
113
113
|
</div><div id="subclasses">
|
114
114
|
<h2>Direct Known Subclasses</h2>
|
115
|
-
<p class="children"><span class='object_link'><a href="Discovery.html" title="Zabbix::Sender::Discovery (class)">Discovery</a></span></p>
|
115
|
+
<p class="children"><span class='object_link'><a href="Discovery.html" title="Zabbix::Sender::Discovery (class)">Discovery</a></span>, <span class='object_link'><a href="NanosecondItemData.html" title="Zabbix::Sender::NanosecondItemData (class)">NanosecondItemData</a></span></p>
|
116
116
|
</div>
|
117
117
|
|
118
118
|
|
@@ -169,7 +169,7 @@
|
|
169
169
|
|
170
170
|
|
171
171
|
<span class="summary_desc"><div class='inline'>
|
172
|
-
<p>The item key that
|
172
|
+
<p>The item key that’ll get the new value.</p>
|
173
173
|
</div></span>
|
174
174
|
|
175
175
|
</li>
|
@@ -348,15 +348,15 @@
|
|
348
348
|
<pre class="lines">
|
349
349
|
|
350
350
|
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
351
|
+
264
|
352
|
+
265
|
353
|
+
266
|
354
|
+
267
|
355
|
+
268
|
356
|
+
269</pre>
|
357
357
|
</td>
|
358
358
|
<td>
|
359
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
359
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 264</span>
|
360
360
|
|
361
361
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>key:</span> <span class='kw'>nil</span><span class='comma'>,</span><span class='label'>value:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timestamp:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>hostname:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
362
362
|
<span class='ivar'>@key</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span>
|
@@ -402,12 +402,12 @@
|
|
402
402
|
<pre class="lines">
|
403
403
|
|
404
404
|
|
405
|
-
|
406
|
-
|
407
|
-
|
405
|
+
257
|
406
|
+
258
|
407
|
+
259</pre>
|
408
408
|
</td>
|
409
409
|
<td>
|
410
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
410
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 257</span>
|
411
411
|
|
412
412
|
<span class='kw'>def</span> <span class='id identifier rubyid_hostname'>hostname</span>
|
413
413
|
<span class='ivar'>@hostname</span>
|
@@ -431,7 +431,7 @@
|
|
431
431
|
</h3><div class="docstring">
|
432
432
|
<div class="discussion">
|
433
433
|
|
434
|
-
<p>The item key that
|
434
|
+
<p>The item key that’ll get the new value</p>
|
435
435
|
|
436
436
|
|
437
437
|
</div>
|
@@ -445,12 +445,12 @@
|
|
445
445
|
<pre class="lines">
|
446
446
|
|
447
447
|
|
448
|
-
|
449
|
-
|
450
|
-
|
448
|
+
251
|
449
|
+
252
|
450
|
+
253</pre>
|
451
451
|
</td>
|
452
452
|
<td>
|
453
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
453
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 251</span>
|
454
454
|
|
455
455
|
<span class='kw'>def</span> <span class='id identifier rubyid_key'>key</span>
|
456
456
|
<span class='ivar'>@key</span>
|
@@ -488,12 +488,12 @@
|
|
488
488
|
<pre class="lines">
|
489
489
|
|
490
490
|
|
491
|
-
|
492
|
-
|
493
|
-
|
491
|
+
260
|
492
|
+
261
|
493
|
+
262</pre>
|
494
494
|
</td>
|
495
495
|
<td>
|
496
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
496
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 260</span>
|
497
497
|
|
498
498
|
<span class='kw'>def</span> <span class='id identifier rubyid_timestamp'>timestamp</span>
|
499
499
|
<span class='ivar'>@timestamp</span>
|
@@ -531,12 +531,12 @@
|
|
531
531
|
<pre class="lines">
|
532
532
|
|
533
533
|
|
534
|
-
|
535
|
-
|
536
|
-
|
534
|
+
254
|
535
|
+
255
|
536
|
+
256</pre>
|
537
537
|
</td>
|
538
538
|
<td>
|
539
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
539
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 254</span>
|
540
540
|
|
541
541
|
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
542
542
|
<span class='ivar'>@value</span>
|
@@ -579,16 +579,16 @@
|
|
579
579
|
<pre class="lines">
|
580
580
|
|
581
581
|
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
582
|
+
273
|
583
|
+
274
|
584
|
+
275
|
585
|
+
276
|
586
|
+
277
|
587
|
+
278
|
588
|
+
279</pre>
|
589
589
|
</td>
|
590
590
|
<td>
|
591
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
591
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 273</span>
|
592
592
|
|
593
593
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_senderline'>to_senderline</span>
|
594
594
|
<span class='kw'>if</span> <span class='ivar'>@timestamp</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>==</span> <span class='int'>0</span>
|
@@ -628,22 +628,22 @@
|
|
628
628
|
<pre class="lines">
|
629
629
|
|
630
630
|
|
631
|
-
273
|
632
|
-
274
|
633
|
-
275
|
634
|
-
276
|
635
|
-
277
|
636
|
-
278
|
637
|
-
279
|
638
|
-
280
|
639
|
-
281
|
640
631
|
282
|
641
632
|
283
|
642
633
|
284
|
643
|
-
285
|
634
|
+
285
|
635
|
+
286
|
636
|
+
287
|
637
|
+
288
|
638
|
+
289
|
639
|
+
290
|
640
|
+
291
|
641
|
+
292
|
642
|
+
293
|
643
|
+
294</pre>
|
644
644
|
</td>
|
645
645
|
<td>
|
646
|
-
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line
|
646
|
+
<pre class="code"><span class="info file"># File 'lib/zabbix_sender_api/api.rb', line 282</span>
|
647
647
|
|
648
648
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_senderstruct'>to_senderstruct</span>
|
649
649
|
<span class='kw'>if</span> <span class='ivar'>@timestamp</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>==</span> <span class='int'>0</span>
|
@@ -668,9 +668,9 @@
|
|
668
668
|
</div>
|
669
669
|
|
670
670
|
<div id="footer">
|
671
|
-
Generated on
|
672
|
-
<a href="
|
673
|
-
0.9.
|
671
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
672
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
673
|
+
0.9.36 (ruby-3.2.2).
|
674
674
|
</div>
|
675
675
|
|
676
676
|
</div>
|