Ad Widget
Collapse
Zabbix Trigger Dashboard
Collapse
X
-
Comment
-
Comment
-
Zabbix Trigger Dashboard
@stav13: use the below one
$groups = $api->hostgroupGet(array(
'output' => array('name'),
'selectHosts' => array(
'flags',
'hostid',
'name',
'maintenance_status'),
'real_hosts ' => 1,
'groupids' => 22,
'with_monitored_triggers' => 1,
'sortfield' => 'name'
));
Comment
-
Really sweet looking dashboard.
"select distinct g.name, hg.groupid from groups g join hosts_groups hg on hg.groupid = g.groupid" returns list of Host Groups to Group ID's.
I'll have a crack at adding a drop down list box on the top right which than loads the dashboard based on groupid (Host Group) selection.Comment
-
Zabbix Trigger Dashboard
@sersad:
When i try this and click on the items that are triggered, it directs me to the wrong graphs.
Its not getting the exact itemid of each item and displays the graph.
Diwahar
In Request add "selectFunctions": "extend"
The reply will contain an array "functions":"itemid"
/history.php?action=showgraph&itemids[]="itemid"Comment
-
Show only enabled hosts
Hi,
How show only enabled hosts? In my environment (zbx 2.4) the disabled hosts are also being displayed.
My "Gets":
TksPHP Code:$groups = $api->hostgroupGet(array(
'output' => array('name'),
'selectHosts' => array(
'flags',
'hostid',
'name',
'maintenance_status'),
'real_hosts ' => 1,
'with_monitored_triggers' => 1,
'sortfield' => 'name'
));
foreach($groups as $group) {
$groupIds[] = $group->groupid;
}
$triggers = $api->triggerGet(array(
'output' => array(
'priority',
'description'),
'selectHosts' => array('hostid'),
'groupids' => $groupIds,
'expandDescription' => 1,
'only_true' => 1,
'monitored' => 1,
'withLastEventUnacknowledged' => 1,
'sortfield' => 'hostname',
'active' => 1,
'sortorder' => 'DESC',
'skipDependent' => 1,
'filter' => array('value' => 1)
));
foreach($triggers as $trigger) {
foreach($trigger->hosts as $host) {
$hostTriggers[$host->hostid][] = $trigger;
}
}
Comment
-
After replacing the "flags" option from "selectHosts" parameter to "status" option I got the hosts status and show only the actives.Comment
-
Because I don't have triggers in active state my apache errorlog is growing faster with this errors (2 errors per host):
PHP Notice: Undefined variable: hostTriggers in /usr/share/zabbix/triggers/index.php on line 107
PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/share/zabbix/triggers/index.php on line 107
Changing "if (array_key_exists($hostid, $hostTriggers))" to "if (isset($hostTriggers[$hostid]))" resolved.
PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.
"isset() does not return TRUE for array keys that correspond to a NULL value, while array_key_exists() does."Comment
-
-
Zabbix Trigger Dashboard
Hi, I have tested and working perfect with latest zabbix 3.0.1.
Thanks for the developerComment
Comment