zabbix sql

# 获取主机名里面包括docker的 hostid

select hostid from hosts where host like '%docker%';

# 查询某个监控项

select * from items where key_='log[/proc/sys/kernel/pid_max]' limit 5 \G

# 接下来我们将上面的两个表关联

select  from items where key_='log[/proc/sys/kernel/pid_max]' and hostid in (select hostid from hosts where host like '%docker%')\G

 

posted @ 2022-03-29 16:47  Hello_worlds  阅读(82)  评论(0编辑  收藏  举报