# 获取主机名里面包括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