通过Navicat Premium连接mysql数据库统计zabbix中业务监控项sql语句(排除基础监控)
SELECT DISTINCT `hosts`.`host`, items.`name`, items.key_, `triggers`.description, `triggers`.expression, items.delay, functions.`function`, functions.parameter, items.history, items.trends, items.delay_flex, `hosts`.`status` FROM `hosts` INNER JOIN items ON items.hostid = `hosts`.hostid INNER JOIN functions ON functions.itemid = items.itemid INNER JOIN `triggers` ON functions.triggerid = `triggers`.triggerid, regexps INNER JOIN expressions ON expressions.regexpid = regexps.regexpid WHERE `host` like '%' and `host` not LIKE '%EMDATAGC%' and `host` not LIKE '%10.%' and `host` not LIKE '%172.18%' and `host` not like '%Template%' and items.`status`='0' and `triggers`.`status`='0' and `triggers`.flags='0' and `hosts`.`status`='0' and `items`.`name` not LIKE '%CPU%'and `items`.`name` not LIKE '%Host name%' and `items`.`name` not LIKE '%System%' and `items`.`name` not LIKE '%Number of %' and `items`.`name` not LIKE '%Agent%' and `items`.`name` not LIKE '%Processor%' and `items`.`name` not LIKE '%memory%' and `items`.`name` not LIKE '%swap%' and `items`.`name` not LIKE '%Checksum of $1%' and `items`.`name` not LIKE '%Zabbix%' and `items`.`name` not LIKE '%oracle%' and `items`.`name` not LIKE '%Context%' and `items`.`name` not LIKE '%Binlog%' and `items`.`name` not LIKE '%Slave IO%' and `items`.`name` not LIKE '%Redis%' and `items`.`name` not LIKE '%ssh-scan%' and `items`.`name` not LIKE '%/root/.ssh%' and `items`.`name` not LIKE '%OGG/%' and `host` not LIKE '%EM%' and `items`.`name` not LIKE '%/etc/sysconfig/iptables%' and `items`.`name` not LIKE '%Free disk%' and `items`.`key_` not LIKE '%OrayRemoteService.exe%';
转载于:https://blog.51cto.com/531117978/2309132