调用zabbix数据库
查看zabbix中所有的模板select hostid,host,status from hosts where status=3;
查看网卡流量
/usr/bin/mysql -uzabbix -pzabbix zabbix -e "select hosts.hostid,hosts.host,items.hostid,items.key_,items.itemid,sum(items.lastvalue) from hosts,items where hosts.hostid = items.hostid and hosts.host=\"${realserver}\" and items.key_ like 'net.if.in%';"|/bin/awk '{print $NF}'|/bin/grep -v 'NULL'`
页:
[1]