1ZABBIX_SENDER(1) General Commands Manual ZABBIX_SENDER(1)
2
3
4
6 zabbix_sender - Zabbix sender utility
7
9 zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host -k key
10 -o value
11 zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host] [-T]
12 [-N] [-r] -i input-file
13 zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
14 [-s host] -k key -o value
15 zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
16 [-s host] [-T] [-N] [-r] -i input-file
17 zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
18 --tls-connect cert --tls-ca-file CA-file [--tls-crl-file CRL-file]
19 [--tls-server-cert-issuer cert-issuer] [--tls-server-cert-subject
20 cert-subject] --tls-cert-file cert-file --tls-key-file key-file
21 [--tls-cipher13 cipher-string] [--tls-cipher cipher-string] -k key -o
22 value
23 zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
24 --tls-connect cert --tls-ca-file CA-file [--tls-crl-file CRL-file]
25 [--tls-server-cert-issuer cert-issuer] [--tls-server-cert-subject
26 cert-subject] --tls-cert-file cert-file --tls-key-file key-file
27 [--tls-cipher13 cipher-string] [--tls-cipher cipher-string] [-T] [-N]
28 [-r] -i input-file
29 zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
30 [-s host] --tls-connect cert --tls-ca-file CA-file [--tls-crl-file
31 CRL-file] [--tls-server-cert-issuer cert-issuer]
32 [--tls-server-cert-subject cert-subject] --tls-cert-file cert-file
33 --tls-key-file key-file [--tls-cipher13 cipher-string] [--tls-cipher
34 cipher-string] -k key -o value
35 zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
36 [-s host] --tls-connect cert --tls-ca-file CA-file [--tls-crl-file
37 CRL-file] [--tls-server-cert-issuer cert-issuer]
38 [--tls-server-cert-subject cert-subject] --tls-cert-file cert-file
39 --tls-key-file key-file [--tls-cipher13 cipher-string] [--tls-cipher
40 cipher-string] [-T] [-N] [-r] -i input-file
41 zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
42 --tls-connect psk --tls-psk-identity PSK-identity --tls-psk-file
43 PSK-file [--tls-cipher13 cipher-string] [--tls-cipher cipher-string] -k
44 key -o value
45 zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
46 --tls-connect psk --tls-psk-identity PSK-identity --tls-psk-file
47 PSK-file [--tls-cipher13 cipher-string] [--tls-cipher cipher-string]
48 [-T] [-N] [-r] -i input-file
49 zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
50 [-s host] --tls-connect psk --tls-psk-identity PSK-identity
51 --tls-psk-file PSK-file [--tls-cipher13 cipher-string] [--tls-cipher
52 cipher-string] -k key -o value
53 zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
54 [-s host] --tls-connect psk --tls-psk-identity PSK-identity
55 --tls-psk-file PSK-file [--tls-cipher13 cipher-string] [--tls-cipher
56 cipher-string] [-T] [-N] [-r] -i input-file
57 zabbix_sender -h
58 zabbix_sender -V
59
61 zabbix_sender is a command line utility for sending monitoring data to
62 Zabbix server or proxy. On the Zabbix server an item of type Zabbix
63 trapper should be created with corresponding key. Note that incoming
64 values will only be accepted from hosts specified in Allowed hosts
65 field for this item.
66
68 -c, --config config-file
69 Use config-file. Zabbix sender reads server details from the
70 agentd configuration file. By default Zabbix sender does not
71 read any configuration file. Only parameters Hostname, Server‐
72 Active, SourceIP, TLSConnect, TLSCAFile, TLSCRLFile,
73 TLSServerCertIssuer, TLSServerCertSubject, TLSCertFile, TLSKey‐
74 File, TLSPSKIdentity and TLSPSKFile are supported. All
75 addresses defined in the agent ServerActive configuration param‐
76 eter are used for sending data. If sending of batch data fails
77 to one address, the following batches are not sent to this
78 address.
79
80 -z, --zabbix-server server
81 Hostname or IP address of Zabbix server. If a host is monitored
82 by a proxy, proxy hostname or IP address should be used instead.
83 When used together with --config, overrides the entries of
84 ServerActive parameter specified in agentd configuration file.
85
86 -p, --port port
87 Specify port number of Zabbix server trapper running on the
88 server. Default is 10051. When used together with --config,
89 overrides the port entries of ServerActive parameter specified
90 in agentd configuration file.
91
92 -I, --source-address IP-address
93 Specify source IP address. When used together with --config,
94 overrides SourceIP parameter specified in agentd configuration
95 file.
96
97 -s, --host host
98 Specify host name the item belongs to (as registered in Zabbix
99 frontend). Host IP address and DNS name will not work. When
100 used together with --config, overrides Hostname parameter speci‐
101 fied in agentd configuration file.
102
103 -k, --key key
104 Specify item key to send value to.
105
106 -o, --value value
107 Specify item value.
108
109 -i, --input-file input-file
110 Load values from input file. Specify - as <input-file> to read
111 values from standard input. Each line of file contains white‐
112 space delimited: <hostname> <key> <value>. Each value must be
113 specified on its own line. Each line must contain 3 whitespace
114 delimited entries: <hostname> <key> <value>, where "hostname" is
115 the name of monitored host as registered in Zabbix frontend,
116 "key" is target item key and "value" - the value to send. Spec‐
117 ify - as <hostname> to use hostname from agent configuration
118 file or from --host argument.
119
120 An example of a line of an input file:
121
122 "Linux DB3" db.connections 43
123
124 The value type must be correctly set in item configuration of
125 Zabbix frontend. Zabbix sender will send up to 250 values in
126 one connection. Contents of the input file must be in the UTF-8
127 encoding. All values from the input file are sent in a sequen‐
128 tial order top-down. Entries must be formatted using the fol‐
129 lowing rules:
130
131
132 · Quoted and non-quoted entries are supported.
133
134 · Double-quote is the quoting character.
135
136 · Entries with whitespace must be quoted.
137
138 · Double-quote and backslash characters inside quoted
139 entry must be escaped with a backslash.
140
141 · Escaping is not supported in non-quoted entries.
142
143 · Linefeed escape sequences (\n) are supported in quoted
144 strings.
145
146 · Linefeed escape sequences are trimmed from the end of
147 an entry.
148
149
150 -T, --with-timestamps
151 This option can be only used with --input-file option.
152
153 Each line of the input file must contain 4 whitespace delimited
154 entries: <hostname> <key> <timestamp> <value>. Timestamp should
155 be specified in Unix timestamp format. If target item has trig‐
156 gers referencing it, all timestamps must be in an increasing
157 order, otherwise event calculation will not be correct.
158
159 An example of a line of the input file:
160
161 "Linux DB3" db.connections 1429533600 43
162
163 For more details please see option --input-file.
164
165 If a timestamped value is sent for a host that is in a “no data”
166 maintenance type then this value will be dropped; however, it is
167 possible to send a timestamped value in for an expired mainte‐
168 nance period and it will be accepted.
169
170
171 -N, --with-ns
172 This option can be only used with --with-timestamps option.
173
174 Each line of the input file must contain 5 whitespace delimited
175 entries: <hostname> <key> <timestamp> <ns> <value>.
176
177 An example of a line of the input file:
178
179 "Linux DB3" db.connections 1429533600 7402561 43
180
181 For more details please see option --input-file.
182
183
184 -r, --real-time
185 Send values one by one as soon as they are received. This can
186 be used when reading from standard input.
187
188 --tls-connect value
189 How to connect to server or proxy. Values:
190
191
192 unencrypted connect without encryption (default)
193
194 psk connect using TLS and a pre-shared key
195
196 cert connect using TLS and a certificate
197
198 --tls-ca-file CA-file
199 Full pathname of a file containing the top-level CA(s) certifi‐
200 cates for peer certificate verification.
201
202 --tls-crl-file CRL-file
203 Full pathname of a file containing revoked certificates.
204
205 --tls-server-cert-issuer cert-issuer
206 Allowed server certificate issuer.
207
208 --tls-server-cert-subject cert-subject
209 Allowed server certificate subject.
210
211 --tls-cert-file cert-file
212 Full pathname of a file containing the certificate or certifi‐
213 cate chain.
214
215 --tls-key-file key-file
216 Full pathname of a file containing the private key.
217
218 --tls-psk-identity PSK-identity
219 PSK-identity string.
220
221 --tls-psk-file PSK-file
222 Full pathname of a file containing the pre-shared key.
223
224 --tls-cipher13 cipher-string
225 Cipher string for OpenSSL 1.1.1 or newer for TLS 1.3. Override
226 the default ciphersuite selection criteria. This option is not
227 available if OpenSSL version is less than 1.1.1.
228
229 --tls-cipher cipher-string
230 GnuTLS priority string (for TLS 1.2 and up) or OpenSSL cipher
231 string (only for TLS 1.2). Override the default ciphersuite
232 selection criteria.
233
234 -v, --verbose
235 Verbose mode, -vv for more details.
236
237 -h, --help
238 Display this help and exit.
239
240 -V, --version
241 Output version information and exit.
242
243
245 The exit status is 0 if the values were sent and all of them were suc‐
246 cessfully processed by server. If data was sent, but processing of at
247 least one of the values failed, the exit status is 2. If data sending
248 failed, the exit status is 1.
249
250
252 zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k mysql.queries -o
253 342.45
254 Send 342.45 as the value for mysql.queries item of monitored
255 host. Use monitored host and Zabbix server defined in agent con‐
256 figuration file.
257
258 zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -s "Monitored Host" -k
259 mysql.queries -o 342.45
260 Send 342.45 as the value for mysql.queries item of Monitored
261 Host host using Zabbix server defined in agent configuration
262 file.
263
264 zabbix_sender -z 192.168.1.113 -i data_values.txt
265 Send values from file data_values.txt to Zabbix server with IP
266 192.168.1.113. Host names and keys are defined in the file.
267
268 echo "- hw.serial.number 1287872261 SQ4321ASDF" | zabbix_sender -c
269 /usr/local/etc/zabbix_agentd.conf -T -i -
270 Send a timestamped value from the commandline to Zabbix server,
271 specified in the agent configuration file. Dash in the input
272 data indicates that hostname also should be used from the same
273 configuration file.
274
275 echo '"Zabbix server" trapper.item ""' | zabbix_sender -z 192.168.1.113
276 -p 10000 -i -
277 Send empty value of an item to the Zabbix server with IP address
278 192.168.1.113 on port 10000 from the commandline. Empty values
279 must be indicated by empty double quotes.
280
281 zabbix_sender -z 192.168.1.113 -s "Monitored Host" -k mysql.queries -o
282 342.45 --tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file
283 --tls-cert-file /home/zabbix/zabbix_agentd.crt --tls-key-file
284 /home/zabbix/zabbix_agentd.key
285 Send 342.45 as the value for mysql.queries item in Monitored
286 Host host to server with IP 192.168.1.113 using TLS with cer‐
287 tificate.
288
289 zabbix_sender -z 192.168.1.113 -s "Monitored Host" -k mysql.queries -o
290 342.45 --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd"
291 --tls-psk-file /home/zabbix/zabbix_agentd.psk
292 Send 342.45 as the value for mysql.queries item in Monitored
293 Host host to server with IP 192.168.1.113 using TLS with pre-
294 shared key (PSK).
295
296
298 Documentation ⟨https://www.zabbix.com/manuals⟩
299
300 zabbix_agentd(8), zabbix_get(1), zabbix_proxy(8), zabbix_server(8),
301 zabbix_js(1), zabbix_agent2(8)
302
304 Alexei Vladishev <alex@zabbix.com>
305
306
307
308Zabbix 2020-02-29 ZABBIX_SENDER(1)