ZABBIX_GET(1)

πŸ“¦
version 7.4.16 Β· 4 versions
, in alpine 3.24, arch rolling, debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

✨ ZABBIX_GET ✨

okay bestie, so this is the Zabbix get utility β€” it lives in the General Commands Manual section (that's section 1, iykyk) and it is literally your little group-chat DM with a Zabbix agent. it slides in, asks for one item value, and dips. that's the whole vibe. no notes. πŸ’…


🌸 SYNOPSIS 🌸

like, here's how you actually summon her:

zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] [-t
timeout] -k item-key
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] [-t
timeout] --tls-connect cert --tls-ca-file CA-file [--tls-crl-file
CRL-file] [--tls-agent-cert-issuer cert-issuer]
[--tls-agent-cert-subject cert-subject] --tls-cert-file cert-file
--tls-key-file key-file [--tls-cipher13 cipher-string] [--tls-cipher
cipher-string] -k item-key
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] [-t
timeout] --tls-connect psk --tls-psk-identity PSK-identity
--tls-psk-file PSK-file [--tls-cipher13 cipher-string] [--tls-cipher
cipher-string] -k item-key
zabbix_get -h
zabbix_get -V
four flavours, bestie: plain, cert-encrypted, psk-encrypted, and the two "just tell me stuff" modes. pick your fighter. πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so zabbix_get is a command line utility for getting data from Zabbix agent. that's it, that's the job. she asks, the agent answers, you go about your day. iconic behavior, honestly. ✨


πŸ’– OPTIONS πŸ’–

the full menu, no skips, no skips at all:

  • -s, --host host-name-or-IP β€” Specify host name or IP address of a host. (who are we talking to, bestie?)
  • -p, --port port-number β€” Specify port number of agent running on the host. Default is 10050.
  • -I, --source-address IP-address β€” Specify source IP address. (the return address on the envelope πŸ’Œ)
  • -t, --timeout seconds β€” Specify timeout. Valid range: 1-600 seconds (default: 30)
  • -k, --key item-key β€” Specify key of item to retrieve value for. (this is THE moment, this is the whole point)
  • -P, --protocol value β€” Protocol used to communicate with agent. Values:
    • auto β€” connect using JSON protocol, fallback and retry with plaintext protocol (default)
    • json β€” connect using JSON protocol
    • plaintext β€” connect using plaintext protocol where just item key is sent (6.4.x and older releases)
  • --tls-connect value β€” How to connect to agent. 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 certificate verification.
  • --tls-crl-file CRL-file β€” Full pathname of a file containing revoked certificates.
  • --tls-agent-cert-issuer cert-issuer β€” Allowed agent certificate issuer.
  • --tls-agent-cert-subject cert-subject β€” Allowed agent 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. (do not, and I mean do not, post this one in the group chat πŸ”₯)
  • --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.
  • -h, --help β€” Display this help and exit.
  • -V, --version β€” Output version information and exit.

πŸ‘‘ EXIT STATUS πŸ‘‘

The exit status is 0 if zabbix_get successfully retrieves a value from the Zabbix agent. If value retrieval failed, the exit status is 1.

so 0 = she ate. 1 = the vibe check failed. that's the whole binary, bestie. 🫢

🌈 EXAMPLES 🌈

copy these, they're free:

zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]"
zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]"
--tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file
--tls-agent-cert-issuer "CN=Signing CA,OU=IT operations,O=Example
Corp,DC=example,DC=com" --tls-agent-cert-subject "CN=server1,OU=IT
operations,O=Example Corp,DC=example,DC=com" --tls-cert-file
/home/zabbix/zabbix_get.crt --tls-key-file /home/zabbix/zabbix_get.key
zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]"
--tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd"
--tls-psk-file /home/zabbix/zabbix_agentd.psk

first one is the chill unencrypted hangout, second is the full cert glow-up with the issuer and subject pinned down, third is the pre-shared-key era. pick whichever matches your security situation. slay in every direction. πŸ’œ


πŸŽ€ SEE ALSO πŸŽ€

Documentation

zabbix_agentd(8), zabbix_proxy(8), zabbix_sender(1), zabbix_server(8), zabbix_js(1), zabbix_agent2(8), zabbix_web_service(8)

like, go read those too, the whole family is here. no cap. 🌸


and that's the page, bestie!! this one came from Zabbix, dated 2022-01-06, and she is ZABBIX_GET(1) forever. mwah. πŸ’–βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from