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       [-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] [-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 -k key
21       -o value
22       zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
23       --tls-connect cert --tls-ca-file CA-file [--tls-crl-file CRL-file]
24       [--tls-server-cert-issuer cert-issuer] [--tls-server-cert-subject
25       cert-subject] --tls-cert-file cert-file --tls-key-file key-file [-T]
26       [-r] -i input-file
27       zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
28       [-s host] --tls-connect cert --tls-ca-file CA-file [--tls-crl-file
29       CRL-file] [--tls-server-cert-issuer cert-issuer]
30       [--tls-server-cert-subject cert-subject] --tls-cert-file cert-file
31       --tls-key-file key-file -k key -o value
32       zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
33       [-s host] --tls-connect cert --tls-ca-file CA-file [--tls-crl-file
34       CRL-file] [--tls-server-cert-issuer cert-issuer]
35       [--tls-server-cert-subject cert-subject] --tls-cert-file cert-file
36       --tls-key-file key-file [-T] [-r] -i input-file
37       zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
38       --tls-connect psk --tls-psk-identity PSK-identity --tls-psk-file
39       PSK-file -k key -o value
40       zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
41       --tls-connect psk --tls-psk-identity PSK-identity --tls-psk-file
42       PSK-file [-T] [-r] -i input-file
43       zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
44       [-s host] --tls-connect psk --tls-psk-identity PSK-identity
45       --tls-psk-file PSK-file -k key -o value
46       zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
47       [-s host] --tls-connect psk --tls-psk-identity PSK-identity
48       --tls-psk-file PSK-file [-T] [-r] -i input-file
49       zabbix_sender -h
50       zabbix_sender -V
51

DESCRIPTION

53       zabbix_sender is a command line utility for sending monitoring data to
54       Zabbix server or proxy.  On the Zabbix server an item of type Zabbix
55       trapper should be created with corresponding key.  Note that incoming
56       values will only be accepted from hosts specified in Allowed hosts
57       field for this item.
58

OPTIONS

60       -c, --config config-file
61              Use config-file.  Zabbix sender reads server details from the
62              agentd configuration file.  By default Zabbix sender does not
63              read any configuration file.  Only parameters Hostname, Server‐
64              Active, SourceIP, TLSConnect, TLSCAFile, TLSCRLFile,
65              TLSServerCertIssuer, TLSServerCertSubject, TLSCertFile, TLSKey‐
66              File, TLSPSKIdentity and TLSPSKFile are supported.  All
67              addresses defined in the agent ServerActive configuration param‐
68              eter are used for sending data.  If sending of batch data fails
69              to one address, the following batches are not sent to this
70              address.
71
72       -z, --zabbix-server server
73              Hostname or IP address of Zabbix server.  If a host is monitored
74              by a proxy, proxy hostname or IP address should be used instead.
75              When used together with --config, overrides the entries of
76              ServerActive parameter specified in agentd configuration file.
77
78       -p, --port port
79              Specify port number of Zabbix server trapper running on the
80              server.  Default is 10051.  When used together with --config,
81              overrides the port entries of ServerActive parameter specified
82              in agentd configuration file.
83
84       -I, --source-address IP-address
85              Specify source IP address.  When used together with --config,
86              overrides SourceIP parameter specified in agentd configuration
87              file.
88
89       -s, --host host
90              Specify host name the item belongs to (as registered in Zabbix
91              frontend).  Host IP address and DNS name will not work.  When
92              used together with --config, overrides Hostname parameter speci‐
93              fied in agentd configuration file.
94
95       -k, --key key
96              Specify item key to send value to.
97
98       -o, --value value
99              Specify item value.
100
101       -i, --input-file input-file
102              Load values from input file.  Specify - as <input-file> to read
103              values from standard input.  Each line of file contains white‐
104              space delimited: <hostname> <key> <value>.  Each value must be
105              specified on its own line.  Each line must contain 3 whitespace
106              delimited entries: <hostname> <key> <value>, where "hostname" is
107              the name of monitored host as registered in Zabbix frontend,
108              "key" is target item key and "value" - the value to send. Spec‐
109              ify - as <hostname> to use hostname from agent configuration
110              file or from --host argument.
111
112              An example of a line of an input file:
113
114               "Linux DB3" db.connections 43
115
116              The value type must be correctly set in item configuration of
117              Zabbix frontend.  Zabbix sender will send up to 250 values in
118              one connection.  Contents of the input file must be in the UTF-8
119              encoding.  All values from the input file are sent in a sequen‐
120              tial order top-down.  Entries must be formatted using the fol‐
121              lowing rules:
122
123
124                     · Quoted and non-quoted entries are supported.
125
126                     · Double-quote is the quoting character.
127
128                     · Entries with whitespace must be quoted.
129
130                     · Double-quote and backslash characters inside quoted
131                       entry must be escaped with a backslash.
132
133                     · Escaping is not supported in non-quoted entries.
134
135                     · Linefeed escape sequences (\n) are supported in quoted
136                       strings.
137
138                     · Linefeed escape sequences are trimmed from the end of
139                       an entry.
140
141
142       -T, --with-timestamps
143              This option can be only used with --input-file option.
144
145              Each line of the input file must contain 4 whitespace delimited
146              entries: <hostname> <key> <timestamp> <value>.  Timestamp should
147              be specified in Unix timestamp format.  If target item has trig‐
148              gers referencing it, all timestamps must be in an increasing
149              order, otherwise event calculation will not be correct.
150
151              An example of a line of the input file:
152
153               "Linux DB3" db.connections 1429533600 43
154
155              For more details please see option --input-file.
156
157              If a timestamped value is sent for a host that is in a “no data”
158              maintenance type then this value will be dropped; however, it is
159              possible to send a timestamped value in for an expired mainte‐
160              nance period and it will be accepted.
161
162
163       -r, --real-time
164              Send values one by one as soon as they are received.  This can
165              be used when reading from standard input.
166
167       --tls-connect value
168              How to connect to server or proxy. Values:
169
170
171                   unencrypted connect without encryption (default)
172
173                   psk         connect using TLS and a pre-shared key
174
175                   cert        connect using TLS and a certificate
176
177       --tls-ca-file CA-file
178              Full pathname of a file containing the top-level CA(s) certifi‐
179              cates for peer certificate verification.
180
181       --tls-crl-file CRL-file
182              Full pathname of a file containing revoked certificates.
183
184       --tls-server-cert-issuer cert-issuer
185              Allowed server certificate issuer.
186
187       --tls-server-cert-subject cert-subject
188              Allowed server certificate subject.
189
190       --tls-cert-file cert-file
191              Full pathname of a file containing the certificate or certifi‐
192              cate chain.
193
194       --tls-key-file key-file
195              Full pathname of a file containing the private key.
196
197       --tls-psk-identity PSK-identity
198              PSK-identity string.
199
200       --tls-psk-file PSK-file
201              Full pathname of a file containing the pre-shared key.
202
203       -v, --verbose
204              Verbose mode, -vv for more details.
205
206       -h, --help
207              Display this help and exit.
208
209       -V, --version
210              Output version information and exit.
211
212

EXIT STATUS

214       The exit status is 0 if the values were sent and all of them were suc‐
215       cessfully processed by server.  If data was sent, but processing of at
216       least one of the values failed, the exit status is 2.  If data sending
217       failed, the exit status is 1.
218
219

EXAMPLES

221       zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k mysql.queries -o
222       342.45
223              Send 342.45 as the value for mysql.queries item of monitored
224              host. Use monitored host and Zabbix server defined in agent con‐
225              figuration file.
226
227       zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -s "Monitored Host" -k
228       mysql.queries -o 342.45
229              Send 342.45 as the value for mysql.queries item of Monitored
230              Host host using Zabbix server defined in agent configuration
231              file.
232
233       zabbix_sender -z 192.168.1.113 -i data_values.txt
234              Send values from file data_values.txt to Zabbix server with IP
235              192.168.1.113.  Host names and keys are defined in the file.
236
237       echo "- hw.serial.number 1287872261 SQ4321ASDF" | zabbix_sender -c
238       /usr/local/etc/zabbix_agentd.conf -T -i -
239              Send a timestamped value from the commandline to Zabbix server,
240              specified in the agent configuration file.  Dash in the input
241              data indicates that hostname also should be used from the same
242              configuration file.
243
244       echo '"Zabbix server" trapper.item ""' | zabbix_sender -z 192.168.1.113
245       -p 10000 -i -
246              Send empty value of an item to the Zabbix server with IP address
247              192.168.1.113 on port 10000 from the commandline.  Empty values
248              must be indicated by empty double quotes.
249
250       zabbix_sender -z 192.168.1.113  -s "Monitored Host" -k mysql.queries -o
251       342.45 --tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file
252       --tls-cert-file /home/zabbix/zabbix_agentd.crt --tls-key-file
253       /home/zabbix/zabbix_agentd.key
254              Send 342.45 as the value for mysql.queries item in Monitored
255              Host host to server with IP 192.168.1.113 using TLS with cer‐
256              tificate.
257
258       zabbix_sender -z 192.168.1.113  -s "Monitored Host" -k mysql.queries -o
259       342.45 --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd"
260       --tls-psk-file /home/zabbix/zabbix_agentd.psk
261              Send 342.45 as the value for mysql.queries item in Monitored
262              Host host to server with IP 192.168.1.113 using TLS with pre-
263              shared key (PSK).
264
265

SEE ALSO

267       Documentation ⟨https://www.zabbix.com/manuals
268
269       zabbix_agentd(8), zabbix_get(8), zabbix_proxy(8), zabbix_server(8)
270

AUTHOR

272       Alexei Vladishev <alex@zabbix.com>
273
274
275
276Zabbix                            2019-07-10                  ZABBIX_SENDER(1)
Impressum