# zabbix_sender(1) - man - phpMan

[ZABBIX_SENDER(1)](https://www.chedong.com/phpMan.php/man/ZABBIXSENDER/1/markdown)                       General Commands Manual                      [ZABBIX_SENDER(1)](https://www.chedong.com/phpMan.php/man/ZABBIXSENDER/1/markdown)



## NAME
       zabbix_sender - Zabbix sender utility

## SYNOPSIS
       **zabbix**___**sender** [**-v**] **-z** _server_ [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] **-s** _host_ **-k** _key_ **-o** _value_
       **zabbix**___**sender** [**-v**] **-z** _server_ [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s** _host_] [**-T**] [**-N**] [**-r**]
### -i
       **zabbix**___**sender** [**-v**] **-c** _config-file_ [**-z** _server_] [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s**
       _host_] **-k** _key_ **-o** _value_
       **zabbix**___**sender** [**-v**] **-c** _config-file_ [**-z** _server_] [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s**
       _host_] [**-T**] [**-N**] [**-r**] **-i** _input-file_
       **zabbix**___**sender** [**-v**] **-z** _server_ [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] **-s** _host_ **--tls-connect**
       **cert** **--tls-ca-file** _CA-file_ [**--tls-crl-file** _CRL-file_] [**--tls-server-cert-issuer** _cert-issuer_]
       [**--tls-server-cert-subject** _cert-subject_] **--tls-cert-file** _cert-file_ **--tls-key-file** _key-file_
       [**--tls-cipher13** _cipher-string_] [**--tls-cipher** _cipher-string_] **-k** _key_ **-o** _value_
       **zabbix**___**sender** [**-v**] **-z** _server_ [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s** _host_] **--tls-connect**
       **cert** **--tls-ca-file** _CA-file_ [**--tls-crl-file** _CRL-file_] [**--tls-server-cert-issuer** _cert-issuer_]
       [**--tls-server-cert-subject** _cert-subject_] **--tls-cert-file** _cert-file_ **--tls-key-file** _key-file_
       [**--tls-cipher13** _cipher-string_] [**--tls-cipher** _cipher-string_] [**-T**] [**-N**] [**-r**] **-i** _input-file_
       **zabbix**___**sender** [**-v**] **-c** _config-file_ [**-z** _server_] [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s**
       _host_] **--tls-connect** **cert** **--tls-ca-file** _CA-file_ [**--tls-crl-file** _CRL-file_]
       [**--tls-server-cert-issuer** _cert-issuer_] [**--tls-server-cert-subject** _cert-subject_]
       **--tls-cert-file** _cert-file_ **--tls-key-file** _key-file_ [**--tls-cipher13** _cipher-string_] [**--tls-ci**‐‐
       **pher** _cipher-string_] **-k** _key_ **-o** _value_
       **zabbix**___**sender** [**-v**] **-c** _config-file_ [**-z** _server_] [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s**
       _host_] **--tls-connect** **cert** **--tls-ca-file** _CA-file_ [**--tls-crl-file** _CRL-file_]
       [**--tls-server-cert-issuer** _cert-issuer_] [**--tls-server-cert-subject** _cert-subject_]
       **--tls-cert-file** _cert-file_ **--tls-key-file** _key-file_ [**--tls-cipher13** _cipher-string_] [**--tls-ci**‐‐
       **pher** _cipher-string_] [**-T**] [**-N**] [**-r**] **-i** _input-file_
       **zabbix**___**sender** [**-v**] **-z** _server_ [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] **-s** _host_ **--tls-connect** **psk**
       **--tls-psk-identity** _PSK-identity_ **--tls-psk-file** _PSK-file_ [**--tls-cipher13** _cipher-string_]
       [**--tls-cipher** _cipher-string_] **-k** _key_ **-o** _value_
       **zabbix**___**sender** [**-v**] **-z** _server_ [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s** _host_] **--tls-connect**
       **psk** **--tls-psk-identity** _PSK-identity_ **--tls-psk-file** _PSK-file_ [**--tls-cipher13** _cipher-string_]
       [**--tls-cipher** _cipher-string_] [**-T**] [**-N**] [**-r**] **-i** _input-file_
       **zabbix**___**sender** [**-v**] **-c** _config-file_ [**-z** _server_] [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s**
       _host_] **--tls-connect** **psk** **--tls-psk-identity** _PSK-identity_ **--tls-psk-file** _PSK-file_ [**--tls-ci**‐‐
       **pher13** _cipher-string_] [**--tls-cipher** _cipher-string_] **-k** _key_ **-o** _value_
       **zabbix**___**sender** [**-v**] **-c** _config-file_ [**-z** _server_] [**-p** _port_] [**-I** _IP-address_] [**-t** _timeout_] [**-s**
       _host_] **--tls-connect** **psk** **--tls-psk-identity** _PSK-identity_ **--tls-psk-file** _PSK-file_ [**--tls-ci**‐‐
       **pher13** _cipher-string_] [**--tls-cipher** _cipher-string_] [**-T**] [**-N**] [**-r**] **-i** _input-file_
       **zabbix**___**sender** **-h**
       **zabbix**___**sender** **-V**

## DESCRIPTION
       **zabbix**___**sender** is a command line utility for sending monitoring data to Zabbix server or
       proxy.  On the Zabbix server an item of type **Zabbix** **trapper** should be created with corre‐
       sponding key.  Note that incoming values will only be accepted from hosts specified in **Al**‐‐
       **lowed** **hosts** field for this item.

## OPTIONS
### -c --config
              Use _config-file_.  **Zabbix** **sender** reads server details from the agentd configuration
              file.  By default **Zabbix** **sender** does not read any configuration file.  Only parameters
              **Hostname**, **ServerActive**, **SourceIP**, **TLSConnect**, **TLSCAFile**, **TLSCRLFile**, **TLSServerCertIs**‐‐
              **suer**, **TLSServerCertSubject**, **TLSCertFile**, **TLSKeyFile**, **TLSPSKIdentity** and **TLSPSKFile** are
              supported.  Hostname defined through **HostnameItem** parameter will not be picked up, in
              this case the hostname should be specified via command line (see -s option).  All ad‐
              dresses defined in the agent **ServerActive** configuration parameter are used for sending
              data.  If sending of batch data fails to one address, the following batches are not
              sent to this address.

### -z --zabbix-server
              Hostname or IP address of Zabbix server.  If a host is monitored by a proxy, proxy
              hostname or IP address should be used instead.  When used together with **--config**,
              overrides the entries of **ServerActive** parameter specified in agentd configuration
              file.

### -p --port
              Specify port number of Zabbix server trapper running on the server.  Default is 10051.
              When used together with **--config**, overrides the port entries of **ServerActive** parameter
              specified in agentd configuration file.

### -I --source-address
              Specify source IP address.  When used together with **--config**, overrides **SourceIP** pa‐
              rameter specified in agentd configuration file.

### -t --timeout
              Specify timeout. Valid range: 1-300 seconds (default: 60)

### -s --host
              Specify host name the item belongs to (as registered in Zabbix frontend).  Host IP ad‐
              dress and DNS name will not work.  When used together with **--config**, overrides **Host**‐‐
              **name** parameter specified in agentd configuration file.

### -k --key
              Specify item key to send value to.

### -o --value
              Specify item value.

### -i --input-file
              Load values from input file.  Specify **-** as **<input-file>** to read values from standard
              input.  Each line of file contains whitespace delimited: **<hostname>** **<key>** **<value>**.
              Each value must be specified on its own line.  Each line must contain 3 whitespace de‐
              limited entries: **<hostname>** **<key>** **<value>**, where "hostname" is the name of monitored
              host as registered in Zabbix frontend, "key" is target item key and "value" - the
              value to send. Specify **-** as **<hostname>** to use hostname from agent configuration file
              or from **--host** argument.

              An example of a line of an input file:

               **"Linux** **DB3"** **db.connections** **43**

              The value type must be correctly set in item configuration of Zabbix frontend.  Zabbix
              sender will send up to 250 values in one connection.  Contents of the input file must
              be in the UTF-8 encoding.  All values from the input file are sent in a sequential or‐
              der top-down.  Entries must be formatted using the following rules:


                     • Quoted and non-quoted entries are supported.

                     • Double-quote is the quoting character.

                     • Entries with whitespace must be quoted.

                     • Double-quote and backslash characters inside quoted entry must be escaped
                       with a backslash.

                     • Escaping is not supported in non-quoted entries.

                     • Linefeed escape sequences (\n) are supported in quoted strings.

                     • Linefeed escape sequences are trimmed from the end of an entry.


### -T --with-timestamps
              This option can be only used with **--input-file** option.

              Each line of the input file must contain 4 whitespace delimited entries: **<hostname>**
              **<key>** **<timestamp>** **<value>**.  Timestamp should be specified in Unix timestamp format.
              If target item has triggers referencing it, all timestamps must be in an increasing
              order, otherwise event calculation will not be correct.

              An example of a line of the input file:

               **"Linux** **DB3"** **db.connections** **1429533600** **43**

              For more details please see option **--input-file**.

              If a timestamped value is sent for a host that is in a “no data” maintenance type then
              this value will be dropped; however, it is possible to send a timestamped value in for
              an expired maintenance period and it will be accepted.


### -N --with-ns
              This option can be only used with **--with-timestamps** option.

              Each line of the input file must contain 5 whitespace delimited entries: **<hostname>**
              **<key>** **<timestamp>** **<ns>** **<value>**.

              An example of a line of the input file:

               **"Linux** **DB3"** **db.connections** **1429533600** **7402561** **43**

              For more details please see option **--input-file**.


### -r --real-time
              Send values one by one as soon as they are received.  This can be used when reading
              from standard input.

       **--tls-connect** _value_
              How to connect to server or proxy. Values:


                   **unencrypted** connect without encryption (default)

                   **psk**         connect using TLS and a pre-shared key

                   **cert**        connect using TLS and a certificate

       **--tls-ca-file** _CA-file_
              Full pathname of a file containing the top-level CA(s) certificates for peer certifi‐
              cate verification.

       **--tls-crl-file** _CRL-file_
              Full pathname of a file containing revoked certificates.

       **--tls-server-cert-issuer** _cert-issuer_
              Allowed server certificate issuer.

       **--tls-server-cert-subject** _cert-subject_
              Allowed server certificate subject.

       **--tls-cert-file** _cert-file_
              Full pathname of a file containing the certificate or certificate chain.

       **--tls-key-file** _key-file_
              Full pathname of a file containing the private key.

       **--tls-psk-identity** _PSK-identity_
              PSK-identity string.

       **--tls-psk-file** _PSK-file_
              Full pathname of a file containing the pre-shared key.

       **--tls-cipher13** _cipher-string_
              Cipher string for OpenSSL 1.1.1 or newer for TLS 1.3. Override the default ciphersuite
              selection criteria. This option is not available if OpenSSL version is less than
              1.1.1.

       **--tls-cipher** _cipher-string_
              GnuTLS priority string (for TLS 1.2 and up) or OpenSSL cipher string (only for TLS
              1.2). Override the default ciphersuite selection criteria.

### -v --verbose
              Verbose mode, **-vv** for more details.

### -h --help
              Display this help and exit.

### -V --version
              Output version information and exit.


## EXIT STATUS
       The exit status is 0 if the values were sent and all of them were successfully processed by
       server.  If data was sent, but processing of at least one of the values failed, the exit sta‐
       tus is 2.  If data sending failed, the exit status is 1.


## EXAMPLES
       **zabbix**___**sender** **-c** **/etc/zabbix/zabbix**___**agentd.conf** **-k** **mysql.queries** **-o** **342.45**
              Send **342.45** as the value for **mysql.queries** item of monitored host. Use monitored host
              and Zabbix server defined in agent configuration file.

       **zabbix**___**sender** **-c** **/etc/zabbix/zabbix**___**agentd.conf** **-s** **"Monitored** **Host"** **-k** **mysql.queries** **-o**
### 342.45
              Send **342.45** as the value for **mysql.queries** item of **Monitored** **Host** host using Zabbix
              server defined in agent configuration file.

       **zabbix**___**sender** **-z** **192.168.1.113** **-i** **data**___**values.txt**
              Send values from file **data**___**values.txt** to Zabbix server with IP **192.168.1.113**.  Host
              names and keys are defined in the file.

       **echo** **"-** **hw.serial.number** **1287872261** **SQ4321ASDF"** **|** **zabbix**___**sender** **-c** **/usr/local/etc/zab**‐‐
       **bix**___**agentd.conf** **-T** **-i** **-**
              Send a timestamped value from the commandline to Zabbix server, specified in the agent
              configuration file.  Dash in the input data indicates that hostname also should be
              used from the same configuration file.

       **echo** **'"Zabbix** **server"** **trapper.item** **""'** **|** **zabbix**___**sender** **-z** **192.168.1.113** **-p** **10000** **-i** **-**
              Send empty value of an item to the Zabbix server with IP address **192.168.1.113** on port
              **10000** from the commandline.  Empty values must be indicated by empty double quotes.

       **zabbix**___**sender** **-z** **192.168.1.113**  **-s** **"Monitored** **Host"** **-k** **mysql.queries** **-o** **342.45** **--tls-connect**
       **cert** **--tls-ca-file** **/home/zabbix/zabbix**___**ca**___**file** **--tls-cert-file** **/home/zabbix/zabbix**___**agentd.crt**
       **--tls-key-file** **/home/zabbix/zabbix**___**agentd.key**
              Send **342.45** as the value for **mysql.queries** item in **Monitored** **Host** host to server with
              IP **192.168.1.113** using TLS with certificate.

       **zabbix**___**sender** **-z** **192.168.1.113**  **-s** **"Monitored** **Host"** **-k** **mysql.queries** **-o** **342.45** **--tls-connect**
       **psk** **--tls-psk-identity** **"PSK** **ID** **Zabbix** **agentd"** **--tls-psk-file** **/home/zabbix/zabbix**___**agentd.psk**
              Send **342.45** as the value for **mysql.queries** item in **Monitored** **Host** host to server with
              IP **192.168.1.113** using TLS with pre-shared key (PSK).


## SEE ALSO
       Documentation ⟨<https://www.zabbix.com/manuals>⟩

       **zabbix**___**[agentd**(8)](https://www.chedong.com/phpMan.php/man/agentd/8/markdown), **zabbix**___**[get**(1)](https://www.chedong.com/phpMan.php/man/get/1/markdown), **zabbix**___**[proxy**(8)](https://www.chedong.com/phpMan.php/man/proxy/8/markdown), **zabbix**___**[server**(8)](https://www.chedong.com/phpMan.php/man/server/8/markdown), **zabbix**___**[js**(1)](https://www.chedong.com/phpMan.php/man/js/1/markdown), **zab**‐‐
       **bix**___**[agent2**(8)](https://www.chedong.com/phpMan.php/man/agent2/8/markdown), **zabbix**___**web**___**[service**(8)](https://www.chedong.com/phpMan.php/man/service/8/markdown)



Zabbix                                       2022-01-06                             [ZABBIX_SENDER(1)](https://www.chedong.com/phpMan.php/man/ZABBIXSENDER/1/markdown)
