zabbix_get基础命令浅析
zabbix_get是zabbix监控系统的一个命令行工具,可以用于从zabbix服务器或代理获取数据。以下是zabbix_get的基本使用方法:
1、获取一个单独的键值对
使用以下命令可以获取一个单独的键值对:
zabbix_get -s <server_ip> -p <server_port> -k <key>
其中
<server_ip>是zabbix服务器的IP地址
<server_port>是zabbix服务器的端口号,默认为10050
<key>是要获取的键值对的键名。
例如,要获取键名为system.cpu.load[percpu,avg15]的键值对,可以使用以下命令:
zabbix_get -s 192.168.1.1 -k system.cpu.load[percpu,avg15]
2:从文件中获取多个键值对
使用以下命令可以从一个文件中获取多个键值对:
zabbix_get -s <server_ip> -p <server_port> -f <file>
其中
<server_ip>和<server_port>的含义同上
<file>是包含要获取的键值对键名的文件路径。
例如,要从keys.txt文件中获取多个键值对,可以使用以下命令:
zabbix_get -s 192.168.1.1 -f /path/to/keys.txt
在keys.txt中,每个键名应该单独一行,例如:
system.cpu.load[percpu,avg1]
system.cpu.load[percpu,avg5]
system.cpu.load[percpu,avg15]
以上是zabbix_get的基本使用方法。还有其他的一些选项可以进一步定制命令行的行为,可以使用zabbix_get –help命令查看完整的选项列表。
- Stop manually extracting OIDs! Convert MIBs into importable monitoring templates in 3 steps
- Focusing solely on device metrics leaves business health invisible? Leverage business insights for business-centric intelligent O&M
- Zabbix VS Lerwee Monitoring: Architecture & Performance
- Network visualization detection enables rapid troubleshooting
- Lerwee NMS VS Solarwinds NPM: Network Performance Monitoring (Part 2)
- New Launch|71 Templates Across 7 Categories, Constantly Updated! Not enough? DIY anytime with the template builder.