Get

Zabbix v7.4번역일: 2026-09-09원본 보기

개요

Zabbix get은 Zabbix 에이전트와 통신하여 필요한 정보를 가져오는 데 사용할 수 있는 명령줄 유틸리티입니다.

이 유틸리티는 주로 Zabbix 에이전트의 문제 해결에 사용됩니다.

Zabbix get처럼 동작하는 기능이 내장된 Zabbix용 Python 라이브러리도 참고하세요.

Zabbix get 실행

UNIX에서 Zabbix get을 실행하여 에이전트에서 프로세서 부하 값을 가져오는 예시입니다:

cd bin
./zabbix_get -s 127.0.0.1 -p 10050 -k system.cpu.load[all,avg1]

Zabbix get을 실행하여 웹사이트에서 문자열을 추출하는 또 다른 예시입니다:

cd bin
./zabbix_get -s 192.168.1.1 -p 10050 -k "web.page.regexp[www.example.com,,,\"USA: ([a-zA-Z0-9.-]+)\",,\1]"

여기서는 아이템 키에 공백이 포함되어 있으므로, 셸이 아이템 키를 구분할 수 있도록 따옴표를 사용합니다. 따옴표는 아이템 키의 일부가 아니며, 셸에서 제거되므로 Zabbix 에이전트에 전달되지 않습니다.

아이템 키가 지원되지 않으면 Zabbix get은 종료 코드 1을 반환합니다.

Zabbix get은 다음 명령줄 매개변수를 지원합니다:

-s --host <host name or IP>             Specify host name or IP address of a host
-p --port <port number>                 Specify port number of agent running on the host (default: 10050)
-I --source-address <IP address>        Specify source IP address
-t --timeout <seconds>                  Specify timeout. Valid range: 1-600 seconds (default: 30 seconds)
-k --key <item key>                     Specify key of item to retrieve value for
-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)
-h --help                               Display this help message
-V --version                            Display version number

--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
--tls-psk-identity <PSK-identity>       Unique, case sensitive string used to identify the pre-shared key
--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

자세한 내용은 Zabbix get 매뉴얼 페이지도 참고하세요.

Windows에서도 다음과 같이 Zabbix get을 실행할 수 있습니다:

zabbix_get.exe [options]