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

EXIT STATUS

206       The exit status is 0 if the values were sent and all of them were suc‐
207       cessfully processed by server.  If data was sent, but processing of at
208       least one of the values failed, the exit status is 2.  If data sending
209       failed, the exit status is 1.
210
211

EXAMPLES

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

SEE ALSO

259       Documentation ⟨https://www.zabbix.com/manuals
260
261       zabbix_agentd(8), zabbix_get(8), zabbix_proxy(8), zabbix_server(8)
262

AUTHOR

264       Alexei Vladishev <alex@zabbix.com>
265
266
267
268Zabbix                            2019-01-29                  ZABBIX_SENDER(1)
Impressum