1ZABBIX_SENDER(1)            General Commands Manual           ZABBIX_SENDER(1)
2
3
4

NAME

6       zabbix_sender - Zabbix sender utility
7

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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       -s, --host host
100              Specify host name the item belongs to (as registered in Zabbix
101              frontend).  Host IP address and DNS name will not work.  When
102              used together with --config, overrides Hostname parameter speci‐
103              fied in agentd configuration file.
104
105       -k, --key key
106              Specify item key to send value to.
107
108       -o, --value value
109              Specify item value.
110
111       -i, --input-file input-file
112              Load values from input file.  Specify - as <input-file> to read
113              values from standard input.  Each line of file contains white‐
114              space delimited: <hostname> <key> <value>.  Each value must be
115              specified on its own line.  Each line must contain 3 whitespace
116              delimited entries: <hostname> <key> <value>, where "hostname" is
117              the name of monitored host as registered in Zabbix frontend,
118              "key" is target item key and "value" - the value to send. Spec‐
119              ify - as <hostname> to use hostname from agent configuration
120              file or from --host argument.
121
122              An example of a line of an input file:
123
124               "Linux DB3" db.connections 43
125
126              The value type must be correctly set in item configuration of
127              Zabbix frontend.  Zabbix sender will send up to 250 values in
128              one connection.  Contents of the input file must be in the UTF-8
129              encoding.  All values from the input file are sent in a sequen‐
130              tial order top-down.  Entries must be formatted using the fol‐
131              lowing rules:
132
133
134                     • Quoted and non-quoted entries are supported.
135
136                     • Double-quote is the quoting character.
137
138                     • Entries with whitespace must be quoted.
139
140                     • Double-quote and backslash characters inside quoted en‐
141                       try must be escaped with a backslash.
142
143                     • Escaping is not supported in non-quoted entries.
144
145                     • Linefeed escape sequences (\n) are supported in quoted
146                       strings.
147
148                     • Linefeed escape sequences are trimmed from the end of
149                       an entry.
150
151
152       -T, --with-timestamps
153              This option can be only used with --input-file option.
154
155              Each line of the input file must contain 4 whitespace delimited
156              entries: <hostname> <key> <timestamp> <value>.  Timestamp should
157              be specified in Unix timestamp format.  If target item has trig‐
158              gers referencing it, all timestamps must be in an increasing or‐
159              der, otherwise event calculation will not be correct.
160
161              An example of a line of the input file:
162
163               "Linux DB3" db.connections 1429533600 43
164
165              For more details please see option --input-file.
166
167              If a timestamped value is sent for a host that is in a “no data”
168              maintenance type then this value will be dropped; however, it is
169              possible to send a timestamped value in for an expired mainte‐
170              nance period and it will be accepted.
171
172
173       -N, --with-ns
174              This option can be only used with --with-timestamps option.
175
176              Each line of the input file must contain 5 whitespace delimited
177              entries: <hostname> <key> <timestamp> <ns> <value>.
178
179              An example of a line of the input file:
180
181               "Linux DB3" db.connections 1429533600 7402561 43
182
183              For more details please see option --input-file.
184
185
186       -r, --real-time
187              Send values one by one as soon as they are received.  This can
188              be used when reading from standard input.
189
190       --tls-connect value
191              How to connect to server or proxy. Values:
192
193
194                   unencrypted connect without encryption (default)
195
196                   psk         connect using TLS and a pre-shared key
197
198                   cert        connect using TLS and a certificate
199
200       --tls-ca-file CA-file
201              Full pathname of a file containing the top-level CA(s) certifi‐
202              cates for peer certificate verification.
203
204       --tls-crl-file CRL-file
205              Full pathname of a file containing revoked certificates.
206
207       --tls-server-cert-issuer cert-issuer
208              Allowed server certificate issuer.
209
210       --tls-server-cert-subject cert-subject
211              Allowed server certificate subject.
212
213       --tls-cert-file cert-file
214              Full pathname of a file containing the certificate or certifi‐
215              cate chain.
216
217       --tls-key-file key-file
218              Full pathname of a file containing the private key.
219
220       --tls-psk-identity PSK-identity
221              PSK-identity string.
222
223       --tls-psk-file PSK-file
224              Full pathname of a file containing the pre-shared key.
225
226       --tls-cipher13 cipher-string
227              Cipher string for OpenSSL 1.1.1 or newer for TLS 1.3. Override
228              the default ciphersuite selection criteria. This option is not
229              available if OpenSSL version is less than 1.1.1.
230
231       --tls-cipher cipher-string
232              GnuTLS priority string (for TLS 1.2 and up) or OpenSSL cipher
233              string (only for TLS 1.2). Override the default ciphersuite se‐
234              lection criteria.
235
236       -v, --verbose
237              Verbose mode, -vv for more details.
238
239       -h, --help
240              Display this help and exit.
241
242       -V, --version
243              Output version information and exit.
244
245

EXIT STATUS

247       The exit status is 0 if the values were sent and all of them were suc‐
248       cessfully processed by server.  If data was sent, but processing of at
249       least one of the values failed, the exit status is 2.  If data sending
250       failed, the exit status is 1.
251
252

EXAMPLES

254       zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k mysql.queries -o
255       342.45
256              Send 342.45 as the value for mysql.queries item of monitored
257              host. Use monitored host and Zabbix server defined in agent con‐
258              figuration file.
259
260       zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -s "Monitored Host" -k
261       mysql.queries -o 342.45
262              Send 342.45 as the value for mysql.queries item of Monitored
263              Host host using Zabbix server defined in agent configuration
264              file.
265
266       zabbix_sender -z 192.168.1.113 -i data_values.txt
267              Send values from file data_values.txt to Zabbix server with IP
268              192.168.1.113.  Host names and keys are defined in the file.
269
270       echo "- hw.serial.number 1287872261 SQ4321ASDF" | zabbix_sender -c
271       /usr/local/etc/zabbix_agentd.conf -T -i -
272              Send a timestamped value from the commandline to Zabbix server,
273              specified in the agent configuration file.  Dash in the input
274              data indicates that hostname also should be used from the same
275              configuration file.
276
277       echo '"Zabbix server" trapper.item ""' | zabbix_sender -z 192.168.1.113
278       -p 10000 -i -
279              Send empty value of an item to the Zabbix server with IP address
280              192.168.1.113 on port 10000 from the commandline.  Empty values
281              must be indicated by empty double quotes.
282
283       zabbix_sender -z 192.168.1.113  -s "Monitored Host" -k mysql.queries -o
284       342.45 --tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file
285       --tls-cert-file /home/zabbix/zabbix_agentd.crt --tls-key-file
286       /home/zabbix/zabbix_agentd.key
287              Send 342.45 as the value for mysql.queries item in Monitored
288              Host host to server with IP 192.168.1.113 using TLS with cer‐
289              tificate.
290
291       zabbix_sender -z 192.168.1.113  -s "Monitored Host" -k mysql.queries -o
292       342.45 --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd"
293       --tls-psk-file /home/zabbix/zabbix_agentd.psk
294              Send 342.45 as the value for mysql.queries item in Monitored
295              Host host to server with IP 192.168.1.113 using TLS with pre-
296              shared key (PSK).
297
298

SEE ALSO

300       Documentation ⟨https://www.zabbix.com/manuals
301
302       zabbix_agentd(8), zabbix_get(1), zabbix_proxy(8), zabbix_server(8),
303       zabbix_js(1), zabbix_agent2(8)
304

AUTHOR

306       Alexei Vladishev <alex@zabbix.com>
307
308
309
310Zabbix                            2020-02-29                  ZABBIX_SENDER(1)
Impressum