zabbix_sender_api 1.1.2 → 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/.gitignore +1 -0
- data/CHANGELOG.md +2 -0
- data/Gemfile +1 -0
- data/README.md +6 -2
- data/Rakefile +8 -1
- data/lib/zabbix_sender_api/api.rb +55 -7
- data/lib/zabbix_sender_api/version.rb +1 -1
- data/lib/zabbix_sender_api.rb +0 -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 +29 -8
- data/public/class_list.html +1 -1
- data/public/file.CHANGELOG.html +83 -0
- data/public/file.LICENSE.html +70 -0
- data/public/file.README.html +80 -61
- data/public/file_list.html +10 -0
- data/public/frames.html +10 -5
- data/public/images/Spectacle.Z29721.png +0 -0
- data/public/images/Spectacle.l29721.png +0 -0
- data/public/index.html +80 -61
- data/public/method_list.html +41 -17
- data/public/top-level-namespace.html +4 -4
- metadata +8 -3
data/public/ZabbixSenderApi.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: ZabbixSenderApi
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.36
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -107,7 +107,7 @@
|
|
107
107
|
<dt id="VERSION-constant" class="">VERSION =
|
108
108
|
|
109
109
|
</dt>
|
110
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1.1.
|
110
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>1.1.4</span><span class='tstring_end'>"</span></span></pre></dd>
|
111
111
|
|
112
112
|
</dl>
|
113
113
|
|
@@ -123,9 +123,9 @@
|
|
123
123
|
</div>
|
124
124
|
|
125
125
|
<div id="footer">
|
126
|
-
Generated on
|
127
|
-
<a href="
|
128
|
-
0.9.
|
126
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
127
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
128
|
+
0.9.36 (ruby-3.2.2).
|
129
129
|
</div>
|
130
130
|
|
131
131
|
</div>
|
data/public/_index.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
|
-
Documentation by YARD 0.9.
|
7
|
+
Documentation by YARD 0.9.36
|
8
8
|
|
9
9
|
</title>
|
10
10
|
|
@@ -52,7 +52,7 @@
|
|
52
52
|
<div class="clear"></div>
|
53
53
|
</div>
|
54
54
|
|
55
|
-
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.
|
55
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.36</h1>
|
56
56
|
<div id="listing">
|
57
57
|
<h1 class="alphaindex">Alphabetic Index</h1>
|
58
58
|
|
@@ -63,6 +63,12 @@
|
|
63
63
|
<li class="r1"><a href="index.html" title="README">README</a></li>
|
64
64
|
|
65
65
|
|
66
|
+
<li class="r2"><a href="file.CHANGELOG.html" title="CHANGELOG">CHANGELOG</a></li>
|
67
|
+
|
68
|
+
|
69
|
+
<li class="r1"><a href="file.LICENSE.html" title="LICENSE">LICENSE</a></li>
|
70
|
+
|
71
|
+
|
66
72
|
</ul>
|
67
73
|
|
68
74
|
<div class="clear"></div>
|
@@ -166,12 +172,12 @@
|
|
166
172
|
</ul>
|
167
173
|
|
168
174
|
|
169
|
-
<ul id="
|
170
|
-
<li class="letter">
|
175
|
+
<ul id="alpha_N" class="alpha">
|
176
|
+
<li class="letter">N</li>
|
171
177
|
<ul>
|
172
178
|
|
173
179
|
<li>
|
174
|
-
<span class='object_link'><a href="Zabbix/Sender/
|
180
|
+
<span class='object_link'><a href="Zabbix/Sender/NanosecondItemData.html" title="Zabbix::Sender::NanosecondItemData (class)">NanosecondItemData</a></span>
|
175
181
|
|
176
182
|
<small>(Zabbix::Sender)</small>
|
177
183
|
|
@@ -184,6 +190,21 @@
|
|
184
190
|
</td><td valign='top' width="33%">
|
185
191
|
|
186
192
|
|
193
|
+
<ul id="alpha_P" class="alpha">
|
194
|
+
<li class="letter">P</li>
|
195
|
+
<ul>
|
196
|
+
|
197
|
+
<li>
|
198
|
+
<span class='object_link'><a href="Zabbix/Sender/Pipe.html" title="Zabbix::Sender::Pipe (class)">Pipe</a></span>
|
199
|
+
|
200
|
+
<small>(Zabbix::Sender)</small>
|
201
|
+
|
202
|
+
</li>
|
203
|
+
|
204
|
+
</ul>
|
205
|
+
</ul>
|
206
|
+
|
207
|
+
|
187
208
|
<ul id="alpha_S" class="alpha">
|
188
209
|
<li class="letter">S</li>
|
189
210
|
<ul>
|
@@ -232,9 +253,9 @@
|
|
232
253
|
</div>
|
233
254
|
|
234
255
|
<div id="footer">
|
235
|
-
Generated on
|
236
|
-
<a href="
|
237
|
-
0.9.
|
256
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
257
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
258
|
+
0.9.36 (ruby-3.2.2).
|
238
259
|
</div>
|
239
260
|
|
240
261
|
</div>
|
data/public/class_list.html
CHANGED
@@ -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_Zabbix' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Zabbix.html" title="Zabbix (module)">Zabbix</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Zabbix::AgentConfiguration' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Zabbix/AgentConfiguration.html" title="Zabbix::AgentConfiguration (class)">AgentConfiguration</a></span> < Object<small class='search_info'>Zabbix</small></div></li><li id='object_Zabbix::Sender' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Zabbix/Sender.html" title="Zabbix::Sender (module)">Sender</a></span><small class='search_info'>Zabbix</small></div><ul><li id='object_Zabbix::Sender::Batch' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Batch.html" title="Zabbix::Sender::Batch (class)">Batch</a></span> < Object<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Connection' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Connection.html" title="Zabbix::Sender::Connection (class)">Connection</a></span> < Object<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Discovery' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Discovery.html" title="Zabbix::Sender::Discovery (class)">Discovery</a></span> < ItemData<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::ItemData' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/ItemData.html" title="Zabbix::Sender::ItemData (class)">ItemData</a></span> < Object<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Pipe' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Pipe.html" title="Zabbix::Sender::Pipe (class)">Pipe</a></span> < Connection<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Socket' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Socket.html" title="Zabbix::Sender::Socket (class)">Socket</a></span> < Connection<small class='search_info'>Zabbix::Sender</small></div></li></ul></li></ul></li><li id='object_ZabbixSenderApi' class='odd'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="ZabbixSenderApi.html" title="ZabbixSenderApi (module)">ZabbixSenderApi</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_ZabbixSenderApi::Error' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="ZabbixSenderApi/Error.html" title="ZabbixSenderApi::Error (class)">Error</a></span> < StandardError<small class='search_info'>ZabbixSenderApi</small></div></li></ul></li>
|
46
|
+
<li id='object_Zabbix' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Zabbix.html" title="Zabbix (module)">Zabbix</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Zabbix::AgentConfiguration' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Zabbix/AgentConfiguration.html" title="Zabbix::AgentConfiguration (class)">AgentConfiguration</a></span> < Object<small class='search_info'>Zabbix</small></div></li><li id='object_Zabbix::Sender' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Zabbix/Sender.html" title="Zabbix::Sender (module)">Sender</a></span><small class='search_info'>Zabbix</small></div><ul><li id='object_Zabbix::Sender::Batch' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Batch.html" title="Zabbix::Sender::Batch (class)">Batch</a></span> < Object<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Connection' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Connection.html" title="Zabbix::Sender::Connection (class)">Connection</a></span> < Object<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Discovery' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Discovery.html" title="Zabbix::Sender::Discovery (class)">Discovery</a></span> < ItemData<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::ItemData' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/ItemData.html" title="Zabbix::Sender::ItemData (class)">ItemData</a></span> < Object<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::NanosecondItemData' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/NanosecondItemData.html" title="Zabbix::Sender::NanosecondItemData (class)">NanosecondItemData</a></span> < ItemData<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Pipe' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Pipe.html" title="Zabbix::Sender::Pipe (class)">Pipe</a></span> < Connection<small class='search_info'>Zabbix::Sender</small></div></li><li id='object_Zabbix::Sender::Socket' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Zabbix/Sender/Socket.html" title="Zabbix::Sender::Socket (class)">Socket</a></span> < Connection<small class='search_info'>Zabbix::Sender</small></div></li></ul></li></ul></li><li id='object_ZabbixSenderApi' class='odd'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="ZabbixSenderApi.html" title="ZabbixSenderApi (module)">ZabbixSenderApi</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_ZabbixSenderApi::Error' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="ZabbixSenderApi/Error.html" title="ZabbixSenderApi::Error (class)">Error</a></span> < StandardError<small class='search_info'>ZabbixSenderApi</small></div></li></ul></li>
|
47
47
|
|
48
48
|
</ul>
|
49
49
|
</div>
|
@@ -0,0 +1,83 @@
|
|
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: CHANGELOG
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.36
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "CHANGELOG";
|
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: CHANGELOG</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'><h1 id="section">1.1.0</h1>
|
61
|
+
<ul>
|
62
|
+
<li>added native (socket based) sender logic (Zabbix::Sender::Socket).</li>
|
63
|
+
<li>changed Zabbix::Sender::Pipe’s open method from popen to Open3::popen3 to allow capture of stdout stderf and exitA</li>
|
64
|
+
<li>the Socket and Pipe .flush method returns status, sendBatchAtomic relays it from its internal call to flush
|
65
|
+
# 1.1.1</li>
|
66
|
+
<li>added ability to override Zabbix::AgentConfiguration search path</li>
|
67
|
+
<li>cleaned up a few issues + the docs
|
68
|
+
# 1.1.2</li>
|
69
|
+
<li>This is just a documentation fix. rubydoc.info wasn’t generating docs from the gem properly so docs are now in a gitlab “pages” site.
|
70
|
+
# 1.1.3</li>
|
71
|
+
<li>BUG fix for Discovery when using Socket mode.</li>
|
72
|
+
</ul>
|
73
|
+
</div></div>
|
74
|
+
|
75
|
+
<div id="footer">
|
76
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
77
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
78
|
+
0.9.36 (ruby-3.2.2).
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</body>
|
83
|
+
</html>
|
@@ -0,0 +1,70 @@
|
|
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: LICENSE
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.36
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "LICENSE";
|
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: LICENSE</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'>The MIT License (MIT)<br/><br/>Copyright (c) 2020 Dave Parker<br/><br/>Permission is hereby granted, free of charge, to any person obtaining a copy<br/>of this software and associated documentation files (the "Software"), to deal<br/>in the Software without restriction, including without limitation the rights<br/>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br/>copies of the Software, and to permit persons to whom the Software is<br/>furnished to do so, subject to the following conditions:<br/><br/>The above copyright notice and this permission notice shall be included in<br/>all copies or substantial portions of the Software.<br/><br/>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br/>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br/>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br/>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br/>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br/>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br/>THE SOFTWARE.</div></div>
|
61
|
+
|
62
|
+
<div id="footer">
|
63
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
64
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
65
|
+
0.9.36 (ruby-3.2.2).
|
66
|
+
</div>
|
67
|
+
|
68
|
+
</div>
|
69
|
+
</body>
|
70
|
+
</html>
|
data/public/file.README.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.36
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -57,116 +57,135 @@
|
|
57
57
|
<div class="clear"></div>
|
58
58
|
</div>
|
59
59
|
|
60
|
-
<div id="content"><div id='filecontents'>
|
61
|
-
<h1 id="label-zabbix_sender_api">zabbix_sender_api</h1>
|
60
|
+
<div id="content"><div id='filecontents'><h1 id="zabbixsenderapi-gem-versionhttpsbadgefuryiorbzabbixsenderapisvghttpsbadgefuryiorbzabbixsenderapi">zabbix_sender_api <a href="https://badge.fury.io/rb/zabbix_sender_api"><img src="https://badge.fury.io/rb/zabbix_sender_api.svg" alt="Gem Version" /></a></h1>
|
62
61
|
|
63
|
-
<p>This gem provides a model for assembling and sending data to Zabbix via its sender/trapper mechanism.
|
62
|
+
<p>This gem provides a model for assembling and sending data to Zabbix via its sender/trapper mechanism. It works both with the zabbix_sender command line utility, or by itself using a socket connection to a trapper port direct from Ruby.</p>
|
64
63
|
|
65
|
-
<p><strong>Detailed documentation for this library is
|
64
|
+
<p><strong>Detailed documentation for this library is <a href="https://svdasein.gitlab.io/zabbix_sender_api">»HERE«</a></strong></p>
|
65
|
+
|
66
|
+
<p><strong>Source repository is <a href="https://gitlab.com/svdasein/zabbix_sender_api">»HERE«</a></strong></p>
|
66
67
|
|
67
68
|
<p>Look at <a href="https://gitlab.com/svdasein/zfstozab/-/blob/master/exe/zabbix-zfs.rb">the source for the zfstozab gem</a> for a practical example how to use this api.</p>
|
68
69
|
|
69
|
-
<p>zabbix_sender_api can send data to zabbix via one of two included connection types
|
70
|
+
<p>zabbix_sender_api can send data to zabbix via one of two included connection types:</p>
|
71
|
+
|
72
|
+
<ul>
|
73
|
+
<li>zabbix_sender (this was the original and for quite some time only mode supported)</li>
|
74
|
+
<li>TCP socket connection directly to a Zabbix “trapper” port (as of vers 1.1.0)</li>
|
75
|
+
</ul>
|
70
76
|
|
71
|
-
<
|
77
|
+
<p>If you need to interact with the Zabbix REST API, you might also be interested in <a href="https://svdasein.gitlab.io/zabbix-api/">zabbix-api-simple</a></p>
|
78
|
+
|
79
|
+
<h2 id="installation">Installation</h2>
|
72
80
|
|
73
81
|
<pre class="code ruby"><code class="ruby">$ gem install zabbix_sender_api
|
74
82
|
</code></pre>
|
75
83
|
|
76
|
-
<h2 id="
|
84
|
+
<h2 id="usage">Usage</h2>
|
77
85
|
|
78
|
-
<h3 id="
|
86
|
+
<h3 id="synopsis">Synopsis</h3>
|
87
|
+
<p>```ruby
|
88
|
+
#!/usr/bin/env ruby
|
89
|
+
require ‘zabbix_sender_api’</p>
|
79
90
|
|
80
|
-
<
|
81
|
-
</span><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>zabbix_sender_api</span><span class='tstring_end'>'</span></span>
|
91
|
+
<p>sender = Zabbix::Sender::Pipe.new</p>
|
82
92
|
|
83
|
-
<
|
93
|
+
<p>rawdata = { :myFirstKey => 0, :mySecondKey => 100 }</p>
|
84
94
|
|
85
|
-
<
|
95
|
+
<p>data = Zabbix::Sender::Batch.new</p>
|
86
96
|
|
87
|
-
<
|
97
|
+
<p>rawdata.each_pair {|key,value|
|
98
|
+
data.addItemData(key: key,value: value)
|
99
|
+
}</p>
|
88
100
|
|
89
|
-
<
|
90
|
-
|
91
|
-
<span class='rbrace'>}</span>
|
92
|
-
|
93
|
-
<span class='id identifier rubyid_sender'>sender</span><span class='period'>.</span><span class='id identifier rubyid_sendBatchAtomic'>sendBatchAtomic</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
94
|
-
</code></pre>
|
101
|
+
<p>sender.sendBatchAtomic(data)
|
102
|
+
```</p>
|
95
103
|
|
96
104
|
<p>The above will execute zabbix_sender for you and send data into it as described above.</p>
|
97
105
|
|
98
106
|
<p>Alternatively you can just</p>
|
99
107
|
|
100
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
|
108
|
+
<p><code>ruby
|
109
|
+
puts data.to_senderline
|
110
|
+
</code>
|
111
|
+
… and do whatever you want w/ the stdout</p>
|
104
112
|
|
105
113
|
<p>To do low level discovery:</p>
|
106
114
|
|
107
|
-
<
|
115
|
+
<p>```ruby
|
116
|
+
disco = Zabbix::Sender::Discovery.new(key: ‘discoveryRuleKey’)</p>
|
108
117
|
|
109
|
-
<
|
118
|
+
<p>disco.add_entity(:SOMEUSEFULVALUE => ‘aValue’, :ANOTHERONE => ‘somethingElse’)</p>
|
110
119
|
|
111
|
-
<
|
112
|
-
</code></pre>
|
120
|
+
<p>data.addDiscovery(disco)</p>
|
113
121
|
|
114
|
-
<
|
122
|
+
<p>```</p>
|
115
123
|
|
116
|
-
<
|
124
|
+
<h3 id="under-the-hood">Under the hood</h3>
|
117
125
|
|
126
|
+
<h4 id="zabbixsenderpipe-method">Zabbix::Sender::Pipe method:</h4>
|
118
127
|
<p>The zabbix-sender cli utility provides a number of methods by which to insert data into zabbix.</p>
|
119
|
-
<ul><li>
|
120
|
-
<p>zabbix-sender … -s zabbixHostName -k keyName -o value (one k-v pair at a time)</p>
|
121
|
-
</li><li>
|
122
|
-
<p>zabbix-sender … -i - (series of kv pairs from stdin using zabbix-sender start time as timestamp)</p>
|
123
|
-
</li><li>
|
124
|
-
<p>zabbix-sender … -T -i - (series of kv pairs with their own embedded timestamps from stdin)</p>
|
125
|
-
</li></ul>
|
126
128
|
|
127
|
-
<
|
129
|
+
<ul>
|
130
|
+
<li>zabbix-sender … -s zabbixHostName -k keyName -o value (one k-v pair at a time)</li>
|
131
|
+
<li>zabbix-sender … -i - (series of kv pairs from stdin using zabbix-sender start time as timestamp)</li>
|
132
|
+
<li>zabbix-sender … -T -i - (series of kv pairs with their own embedded timestamps from stdin)</li>
|
133
|
+
</ul>
|
134
|
+
|
135
|
+
<p>In the latter two cases, the zabbix host name (the name of the host that zabbix is monitoring) is embedded
|
136
|
+
in the stdin data.</p>
|
128
137
|
|
129
|
-
<p>In all cases it is presumed that the zabbix server or proxy to which data should be sent is specified.
|
138
|
+
<p>In all cases it is presumed that the zabbix server or proxy to which data should be sent is specified. This can
|
139
|
+
be done either by specifying it explicitly with the -z switch, or indirectly by pointing it to a zabbix sender configuration
|
140
|
+
file with the -c switch. If you let zabbix_sender_api handle executing zabbix_sender, the target will be specified on the
|
141
|
+
command line via the -z switch.</p>
|
130
142
|
|
131
143
|
<p>zabbix_sender_api utilizes the -T -i - form, so the generated data lines look like this:</p>
|
132
144
|
|
133
|
-
<
|
134
|
-
|
135
|
-
|
145
|
+
<p><code>
|
146
|
+
"theHostBeingMonitored" myFirstKey 1551719379 0
|
147
|
+
"theHostBeingMonitored" mySecondKey 1551719379 100
|
148
|
+
</code></p>
|
136
149
|
|
137
|
-
<p>The above lines will send data to two items associated with the host theHostBeingMonitored: myFirstKey gets the value 0, and mySecondKey gets the value 100.
|
150
|
+
<p>The above lines will send data to two items associated with the host theHostBeingMonitored: myFirstKey gets the value 0, and mySecondKey gets the value 100. In both cases the
|
151
|
+
time stamp is identical but it need not be (see the exe/example.rb for specifics).</p>
|
138
152
|
|
139
153
|
<p>Low level discovery (LLD) is also possible with zabbix-sender; the format of the stdin data is not so pretty but zabbix_sender_api handles all that:</p>
|
140
154
|
|
141
|
-
<
|
142
|
-
|
155
|
+
<p><code>
|
156
|
+
"theHostBeingMonitored" discoveryRuleKey 1551719797 {"data":[{"{#SOMEUSEFULVALUE}":"aValue","{#ANOTHERONE}":"somethingElse"}]}
|
157
|
+
</code>
|
158
|
+
The above line sends an LLD discovery structure (formatted as json) to the <a href="https://www.zabbix.com/documentation/4.0/manual/discovery/low_level_discovery#discovery_rule">discovery rule</a> whose key is discoveryRuleKey. It describes one entity by passing the macro values
|
159
|
+
#SOMEUSEFULVALUE and #ANOTHERONE to the discovery rule. These ‘<a href="https://www.zabbix.com/documentation/4.0/manual/config/macros/lld_macros">lld macros</a>’ are available for use in item,trigger, and graph prototypes.</p>
|
143
160
|
|
144
|
-
<p>
|
161
|
+
<p>If you wished to use the above lld to actually do some discovery, you’d set things up in zabbix roughly like this:</p>
|
145
162
|
|
146
|
-
<p
|
163
|
+
<p><img src="images/Spectacle.Z29721.png" alt="Discovery rule configuration" />
|
164
|
+
<img src="images/Spectacle.l29721.png" alt="Item prototype configuration" /></p>
|
147
165
|
|
148
|
-
<
|
166
|
+
<h4 id="zabbixsendersocket-method">Zabbix::Sender::Socket method:</h4>
|
149
167
|
|
150
|
-
<
|
151
|
-
|
152
|
-
<p>You can switch between using the Pipe(zabbix_sender) method and the Socket(direct to zabbix via tcp socket) method very simply. Just change:</p>
|
153
|
-
|
154
|
-
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_sender'>sender</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Zabbix.html" title="Zabbix (module)">Zabbix</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Zabbix/Sender.html" title="Zabbix::Sender (module)">Sender</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Zabbix/Sender/Pipe.html" title="Zabbix::Sender::Pipe (class)">Pipe</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Zabbix/Sender/Pipe.html#initialize-instance_method" title="Zabbix::Sender::Pipe#initialize (method)">new</a></span></span>
|
155
|
-
</code></pre>
|
168
|
+
<p>You can switch between using the Pipe(zabbix_sender) method and the Socket(direct to zabbix via tcp socket) method very simply. Just change:</p>
|
156
169
|
|
157
|
-
<p
|
170
|
+
<p><code>
|
171
|
+
sender = Zabbix::Sender::Pipe.new
|
172
|
+
</code>
|
173
|
+
to
|
174
|
+
<code>
|
175
|
+
sender = Zabbix::Sender::Socket.new
|
176
|
+
</code></p>
|
158
177
|
|
159
|
-
<p>If you were specifiying a path to zabbix_sender using the Pipe method, remove that.
|
178
|
+
<p>If you were specifiying a path to zabbix_sender using the Pipe method, remove that. If you’re using a socket other than 10051 on your server/proxy, you’ll want to add the port: option</p>
|
160
179
|
|
161
|
-
<p>The socket method doesn
|
180
|
+
<p>The socket method doesn’t support sending multiple batches between flushes, so you should just use sendBatchAtomic(aBatch) with the Socket method.</p>
|
162
181
|
|
163
|
-
<p>You don
|
182
|
+
<p>You don’t have to change anything else - the rest of zabbix_sender_api works exactly the same with the Socket method, save for that it’s arguably more efficient with system resources. The only drawback might be if zabbix changes the sender protocol. At that point until this library is update to support the change you can revert to the Pipe/zabbix_sender method if needed (if they change the command line switches radically there, changes will be required in this library as well).</p>
|
164
183
|
</div></div>
|
165
184
|
|
166
185
|
<div id="footer">
|
167
|
-
Generated on
|
168
|
-
<a href="
|
169
|
-
0.9.
|
186
|
+
Generated on Fri Jan 3 16:13:55 2025 by
|
187
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
188
|
+
0.9.36 (ruby-3.2.2).
|
170
189
|
</div>
|
171
190
|
|
172
191
|
</div>
|
data/public/file_list.html
CHANGED
@@ -49,6 +49,16 @@
|
|
49
49
|
</li>
|
50
50
|
|
51
51
|
|
52
|
+
<li id="object_CHANGELOG" class="even">
|
53
|
+
<div class="item"><span class="object_link"><a href="file.CHANGELOG.html" title="CHANGELOG">CHANGELOG</a></span></div>
|
54
|
+
</li>
|
55
|
+
|
56
|
+
|
57
|
+
<li id="object_LICENSE" class="odd">
|
58
|
+
<div class="item"><span class="object_link"><a href="file.LICENSE.html" title="LICENSE">LICENSE</a></span></div>
|
59
|
+
</li>
|
60
|
+
|
61
|
+
|
52
62
|
|
53
63
|
</ul>
|
54
64
|
</div>
|
data/public/frames.html
CHANGED
@@ -2,13 +2,18 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
|
-
<title>Documentation by YARD 0.9.
|
5
|
+
<title>Documentation by YARD 0.9.36</title>
|
6
6
|
</head>
|
7
7
|
<script type="text/javascript">
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
var mainUrl = 'index.html';
|
9
|
+
try {
|
10
|
+
var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
|
11
|
+
var name = match ? match[1] : mainUrl;
|
12
|
+
var url = new URL(name, location.href);
|
13
|
+
window.top.location.replace(url.origin === location.origin ? name : mainUrl);
|
14
|
+
} catch (e) {
|
15
|
+
window.top.location.replace(mainUrl);
|
16
|
+
}
|
12
17
|
</script>
|
13
18
|
<noscript>
|
14
19
|
<h1>Oops!</h1>
|
Binary file
|
Binary file
|