调用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'`


你可能感兴趣的:(mysql,数据库,status,where,zabbix,流量)