trakinasdad / zabbix

0 stars 0 forks source link

Hosts por ip #2

Open trakinasdad opened 3 years ago

trakinasdad commented 3 years ago

select distinct h."name" as nome_host, i.ip, h2."name" as GRUPO_HOSTS from hosts h left join interface i on (i.hostid = h.hostid) left join hosts_groups hg on (hg.hostid = h.hostid) inner join hstgrp h2 on (h2.groupid = hg.groupid) where i.ip is not null

trakinasdad commented 3 years ago

select * from hstgrp h Este comando lista o grupos de host criados no sistema.

select * from hosts h Este comando lista todos os hosts criados no sistema, para os templates são direcionados como Hosts.

select * from interface i Este comando lista os IP das interfaces criadas no sistema

select * from items i este comando lista os items criados no sistema