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