主機組列表
--table選項使得輸出以列表輸出,默認以text輸出
#zabbix_api hostgroup_get --table
----------------------------------------------以下為程序輸出
+-------------+------------------+
| hostgroupID | hostgroupName |
+-------------+------------------+
| 1 | Templates |
| 2 | Linux servers |
| 4 | Zabbix servers |
| 5 | Discovered hosts |
| 6 | Virtual machines |
| 7 | Hypervisors |
+-------------+------------------+
創(chuàng)建主機組
#zabbix_api hostgroup_create "ceshi"
----------------------------------------------以下為程序輸出
{"status": "OK", "output": "create hostgroup [13] OK"}
更多建議: