Hello everyone!
I need to select all the problems from one especific group by severities, how can i do that? I tried with the query below but i can´t get it works.
select count(Distinct t.triggerid) as TRIGGERS_ACTIVE FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status = 0 AND i.hostid=h.hostid AND h.status=0 AND t.status = 0 AND t.value=1 AND t.priority = 3
Example:
I have a groups named:
App/System
App/System/1
App/system/2
lets supose that host group is with one item on warning state.
So, I need to query the father host group and if there any warnings on the childs my script it will return 1, if there is one high my script will return 2
If it works, I can work with dashboards, like grafana, to change color by the state of the application.
If exist warnings it will retuning 1 and my panel will be yellow, if return 2, my panel will be red
Is it possible to do that?
Thanks!
I need to select all the problems from one especific group by severities, how can i do that? I tried with the query below but i can´t get it works.
select count(Distinct t.triggerid) as TRIGGERS_ACTIVE FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status = 0 AND i.hostid=h.hostid AND h.status=0 AND t.status = 0 AND t.value=1 AND t.priority = 3
Example:
I have a groups named:
App/System
App/System/1
App/system/2
lets supose that host group is with one item on warning state.
So, I need to query the father host group and if there any warnings on the childs my script it will return 1, if there is one high my script will return 2
If it works, I can work with dashboards, like grafana, to change color by the state of the application.
If exist warnings it will retuning 1 and my panel will be yellow, if return 2, my panel will be red
Is it possible to do that?
Thanks!