I upgraded Zabbix to 2.0.2 today (from 2.0.0) and noticed an annoying (bug?) thing on the dashboard. The "System status", "Web monitoring" and "Host status" widgets are no longer sorted by Host Group name. Instead, it appears to be some kind of random sorting. This makes it aggravating to find things.
I'm not sure if this is a bug or what, but I spent a few minutes figuring out how to get the old sorting method back. Here's what I did:
in "include/blocks.inc.php":
Change the following code in the "make_system_status", "make_hoststat_summary", and "make_webmon_overview" functions from
To this
If this is not a bug, could we at least get some way to choose how the dashboard widgets are sorted so that hacking the code like this isn't required?
I'm not sure if this is a bug or what, but I spent a few minutes figuring out how to get the old sorting method back. Here's what I did:
in "include/blocks.inc.php":
Change the following code in the "make_system_status", "make_hoststat_summary", and "make_webmon_overview" functions from
Code:
foreach($groups as &$group) {
$group['nodename'] = get_node_name_by_elid($group['groupid']);
}
unset($group);
// we need natural sort
$sortFields = array(
array('field' => 'nodename', 'order' => ZBX_SORT_UP),
array('field' => 'name', 'order' => ZBX_SORT_UP)
);
CArrayHelper::sort($groups, $sortFields);
Code:
/*foreach($groups as &$group) {
$group['nodename'] = get_node_name_by_elid($group['groupid']);
}
unset($group);
// we need natural sort
$sortFields = array(
array('field' => 'nodename', 'order' => ZBX_SORT_UP),
array('field' => 'name', 'order' => ZBX_SORT_UP)
);
CArrayHelper::sort($groups, $sortFields);*/
order_result($groups, 'name');
Comment