Ad Widget

Collapse

use api to request all host, last triggers of each host and severity of each triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glardz95
    Junior Member
    • Oct 2019
    • 14

    #1

    use api to request all host, last triggers of each host and severity of each triggers

    hello,

    i want use api to request all host, last triggers of each host and severity of each triggers,

    i have five table in a mariadb database, i want to select last value of each name table,

    enter image description here

    i do this sql command to have host, name and severity,

    i tried this sql command :
    select host, e.name, e.severity from hosts 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) INNER JOIN events e ON (e.objectid = t.triggerid) group by hosts.hostid;
    i want last host, name and severity, i want this result in sql :

    enter image description here

    i tried in sql but its verry difficult, is it possible to do with zabbix api ?
Working...