ZABBIX_SENDER(1)
π NAME π
zabbix_sender β the Zabbix sender utility π (it lives in the General Commands Manual, section 1, and honestly? it's iconic)
β¨ SYNOPSIS β¨
okay bestie, here's every single way you can call this thing. yes, all of them. no skipping π
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 input-file
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-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 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] -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-cipher13 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-cipher13 cipher-string] [--tls-cipher cipher-string] [-T] [-N] [-r] -i input-file
zabbix_sender -h
zabbix_sender -V
π DESCRIPTION π
so zabbix_sender is a command line utility whose whole entire job is sending monitoring data to a Zabbix server or proxy. that's it. that's the vibe. π¦
on the Zabbix server side you gotta create an item of type Zabbix trapper with a matching key first β like, the item has to already exist and be the trapper type, or this whole thing is giving nothing.
β οΈ also important bestie: incoming values will only be accepted from hosts listed in the Allowed hosts field for that item. no guest list, no entry. π«
π OPTIONS π
here we go, all of them, in order, no cap π
-c,--configconfig-file β use config-file. Zabbix sender reads its server details from the agentd configuration file. by default Zabbix sender does not read any configuration file at all. only these parameters are supported:Hostname,ServerActive,SourceIP,TLSConnect,TLSCAFile,TLSCRLFile,TLSServerCertIssuer,TLSServerCertSubject,TLSCertFile,TLSKeyFile,TLSPSKIdentityandTLSPSKFile. aHostnamedefined through theHostnameItemparameter will not be picked up β in that case you gotta pass the hostname on the command line (see the-soption). all addresses defined in the agentServerActiveconfiguration parameter get used for sending data. and if sending a batch of data fails to one address, the following batches are not sent to that address. π«Ά-z,--zabbix-serverserver β hostname or IP address of the Zabbix server. if a host is monitored by a proxy, use the proxy hostname or IP address instead. when you use this together with--config, it overrides theServerActiveentries from the agentd configuration file. π«-p,--portport β specify the port number of the Zabbix server trapper running on the server. default is10051. when used together with--config, it overrides the port entries of theServerActiveparameter from the agentd configuration file. π₯-I,--source-addressIP-address β specify the source IP address. when used together with--config, it overrides theSourceIPparameter from the agentd configuration file. π-t,--timeoutseconds β specify timeout. valid range:1-300seconds (default:60). β³-s,--hosthost β specify the host name the item belongs to (as registered in the Zabbix frontend). host IP address and DNS name will not work, so don't even try it bestie. when used together with--config, it overrides theHostnameparameter from the agentd configuration file. πΈ-k,--keykey β specify the item key to send the value to. π-o,--valuevalue β specify the item value. π₯-i,--input-fileinput-file β load values from the input file. specify-as input-file to read values from standard input. each line of the file contains whitespace-delimited:<hostname> <key> <value>. every value has to be on its own line. every line must contain 3 whitespace delimited entries:<hostname> <key> <value>, where "hostname" is the name of the monitored host as registered in the Zabbix frontend, "key" is the target item key, and "value" is the value to send. specify-as hostname to use the hostname from the agent configuration file or from the--hostargument.
an example of a line of an input file:
"Linux DB3" db.connections 43
the value type must be correctly set in the item configuration of the Zabbix frontend. Zabbix sender will send up to 250 values in one connection. the contents of the input file must be in UTF-8 encoding. all values from the input file are sent in sequential order, top-down. entries must be formatted using these 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 a 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 only be used with the--input-fileoption.
each line of the input file must contain 4 whitespace delimited entries: <hostname> <key> <timestamp> <value>. the timestamp should be specified in Unix timestamp format. if the target item has triggers referencing it, all timestamps must be in an increasing order, otherwise the 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 only be used with the--with-timestampsoption.
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-connectvalue β how to connect to the server or proxy. values:unencryptedβ connect without encryption (default)pskβ connect using TLS and a pre-shared keycertβ connect using TLS and a certificate
--tls-ca-fileCA-file β full pathname of a file containing the top-level CA(s) certificates for peer certificate verification. π--tls-crl-fileCRL-file β full pathname of a file containing revoked certificates. π«--tls-server-cert-issuercert-issuer β allowed server certificate issuer.--tls-server-cert-subjectcert-subject β allowed server certificate subject.--tls-cert-filecert-file β full pathname of a file containing the certificate or certificate chain. π--tls-key-filekey-file β full pathname of a file containing the private key. ποΈ--tls-psk-identityPSK-identity β PSK-identity string.--tls-psk-filePSK-file β full pathname of a file containing the pre-shared key. π--tls-cipher13cipher-string β cipher string for OpenSSL1.1.1or newer for TLS 1.3. overrides the default ciphersuite selection criteria. this option is not available if the OpenSSL version is less than1.1.1. π--tls-ciphercipher-string β GnuTLS priority string (for TLS 1.2 and up) or OpenSSL cipher string (only for TLS 1.2). overrides the default ciphersuite selection criteria. π-v,--verboseβ verbose mode,-vvfor 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 the server. if data was sent, but processing of at least one of the values failed, the exit status is 2. if data sending failed, the exit status is 1. π«‘
β¨ EXAMPLES β¨
Okay bestie, let's see this in action. Here are the exact moves you can pull. π
1. Sending a value with agent config
zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k mysql.queries -o 342.45
Send 342.45 as the value for the mysql.queries item of the monitored host. Use the monitored host and Zabbix server defined in the agent configuration file. π
2. Sending a value with agent config and explicit host
zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -s "Monitored Host" -k mysql.queries -o 342.45
Send 342.45 as the value for the mysql.queries item of the Monitored Host host using the Zabbix server defined in the agent configuration file. β¨
3. Sending values from a file
zabbix_sender -z 192.168.1.113 -i data_values.txt
Send values from the file data_values.txt to the Zabbix server with IP 192.168.1.113. Host names and keys are defined in the file. π
4. Sending a timestamped value from the command line
echo "- hw.serial.number 1287872261 SQ4321ASDF" | zabbix_sender -c /usr/local/etc/zabbix_agentd.conf -T -i -
Send a timestamped value from the command line to the Zabbix server specified in the agent configuration file. The dash in the input data indicates that the hostname should also be used from the same configuration file. β°
5. Sending an empty value
echo '"Zabbix server" trapper.item ""' | zabbix_sender -z 192.168.1.113 -p 10000 -i -
Send an empty value of an item to the Zabbix server with IP address 192.168.1.113 on port 10000 from the command line. Empty values must be indicated by empty double quotes. π«
6. Sending with TLS certificate
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 the mysql.queries item in the Monitored Host host to the server with IP 192.168.1.113 using TLS with a certificate. π
7. Sending with TLS PSK
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 the mysql.queries item in the Monitored Host host to the server with IP 192.168.1.113 using TLS with a pre-shared key (PSK). π
π SEE ALSO π
Like, go read the docs, bestie. π
Documentation
zabbix_agentd(8), zabbix_get(1), zabbix_proxy(8), zabbix_server(8), zabbix_js(1), zabbix_agent2(8), zabbix_web_service(8)
And that's the whole vibe! This page is from Zabbix, dated 2022-01-06, and it's the ZABBIX_SENDER(1) manual. Stay iconic, bestie! π β¨
π¦ where this page comes from
- alpine 3.24: zabbix-doc 7.4.12-r2 Β· AGPL-3.0-only
- arch rolling: zabbix-agent 7.4.16-1 Β· GPL-2.0-only
- epel 10: zabbix7.0 7.0.31-1.el10_3 Β· AGPL-3.0-only AND MIT AND GPL-2.0-or-later AND Zlib AND BSD-3-Clause AND BSD-2-Clause AND ISC
- epel 9: zabbix 1:6.0.48-1.el9 Β· GPL-2.0-only
- epel 9: zabbix7.0 7.0.31-1.el9 Β· AGPL-3.0-only AND MIT AND GPL-2.0-or-later AND Zlib AND BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 43: zabbix 1:7.4.15-1.fc43
- fedora 43: zabbix 1:7.4.16-1.fc43 Β· AGPL-3.0-only AND MIT AND GPL-2.0-or-later AND Zlib AND BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 43: zabbix 1:7.4.2-1.fc43 Β· AGPL-3.0-only AND MIT AND GPL-2.0-or-later AND Zlib AND BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 44: zabbix 1:7.4.15-1.fc44
- fedora 44: zabbix 1:7.4.16-1.fc44 Β· AGPL-3.0-only AND MIT AND GPL-2.0-or-later AND Zlib AND BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 44: zabbix 1:7.4.8-1.fc44 Β· AGPL-3.0-only AND MIT AND GPL-2.0-or-later AND Zlib AND BSD-3-Clause AND BSD-2-Clause AND ISC
- nixos 26.05: zabbix-agent 7.4.11
- nixpkgs unstable: zabbix-agent 7.4.16
- opensuse-leap 16.0: zabbix-agent 6.0.36-bp160.1.7 Β· Apache-2.0 AND GPL-2.0-or-later AND EPL-2.0 AND MPL-2.0 AND BSD-3-Clause
- opensuse-leap 16.0: zabbix-agent 6.0.36-bp160.1.7 Β· Apache-2.0 AND GPL-2.0-or-later AND EPL-2.0 AND MPL-2.0 AND BSD-3-Clause
- opensuse-leap 16.0: zabbix-agent 6.0.36-bp160.1.7 Β· Apache-2.0 AND GPL-2.0-or-later AND EPL-2.0 AND MPL-2.0 AND BSD-3-Clause
- opensuse-leap 16.0: zabbix-agent 6.0.36-bp160.1.7 Β· Apache-2.0 AND GPL-2.0-or-later AND EPL-2.0 AND MPL-2.0 AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms