zabbix_get命令

当zabbix获取不到数据时,提示Not Support时,我们可以用zabbix_get命令来测试获取item值。
zabbix_get命令参数较少

# zabbix_get -h
Zabbix get v2.2.1 (revision 40808) (09 December 2013)
usage: zabbix_get [-hV] -s <host name or IP> [-p <port>] [-I <IP address>] -k <key>
Options:
-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 is 10050
-I --source-address <IP address>     Specify source IP address
-k --key <key of metric>             Specify key of item to retrieve value for
-h --help                            Give this help
-V --version                         Display version number
Example: zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]"

翻译一下哈

参数说明:

-s --host: 指定客户端主机名或者IP

-p --port:客户端端口,默认10050

-I --source-address:指定源IP,写上zabbix server的ip地址即可,一般留空,服务器如果有多ip的时候,你指定一个。

-k --key:你想获取的key

举例:

zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg15]"
0.270000

猜你喜欢

转载自blog.csdn.net/huangbaokang/article/details/89214856