hello,
i try to do a sql request in zabbix database for have (host, trigger information), available and severity and (lat long), with this three information i could use worldmap in grafana,
i want something like that in SQL :
my current sql query:
SELECT host, available
FROM hosts
LEFT JOIN hosts_groups ON (hosts.hostid = hosts_groups.hostid AND hosts.host NOT LIKE '%Template%')
LEFT JOIN hstgrp ON (hstgrp.groupid = hosts_groups.groupid AND hstgrp.name = 'SEKURIT')
LEFT JOIN host_inventory ON (host_inventory.hostid = hosts.hostid)
LEFT JOIN items i ON (i.hostid = hosts.hostid)
INNER JOIN functions f ON (f.itemid = i.itemid)
#INNER JOIN triggers t ON (t.triggerid = f.triggerid AND t.value=1)
#INNER JOIN events e ON (e.objectid = t.triggerid)
GROUP BY hosts.hostid;
thanks for you any information
i try to do a sql request in zabbix database for have (host, trigger information), available and severity and (lat long), with this three information i could use worldmap in grafana,
i want something like that in SQL :
| host | trigger information | trigger information | lat | long |
| titi | host is unreachable for 5 min | 50.33 | 3.2535 | |
| toto | 67 | 9.7890 |
SELECT host, available
FROM hosts
LEFT JOIN hosts_groups ON (hosts.hostid = hosts_groups.hostid AND hosts.host NOT LIKE '%Template%')
LEFT JOIN hstgrp ON (hstgrp.groupid = hosts_groups.groupid AND hstgrp.name = 'SEKURIT')
LEFT JOIN host_inventory ON (host_inventory.hostid = hosts.hostid)
LEFT JOIN items i ON (i.hostid = hosts.hostid)
INNER JOIN functions f ON (f.itemid = i.itemid)
#INNER JOIN triggers t ON (t.triggerid = f.triggerid AND t.value=1)
#INNER JOIN events e ON (e.objectid = t.triggerid)
GROUP BY hosts.hostid;
thanks for you any information