Here is the cumulative patch to fix some Zabbix graphs viewing issues. Ideas are not new, a lot of zabbix users complains on current out-of-the-box implementation:
- ZBXNEXT-1120 - Enable viewing a graph for all hosts in a given group
- ZBXNEXT-75 - Add a "show all" option for viewing all graphs for a host on one page
- ZBXNEXT-1262 - Nested host groups
- Minor graph appearance fix
This only happens when user allowed to view more than 50 groups, tweak this line if you need to change it:
include/views/monitoring.charts.php (the rest PHP code)This implements both ZBXNEXT-1120 and ZBXNEXT-75. So, now you can select host and do not specify graph to view all its graphs on one page. Or select graph to view and do not specify host (or even a group) to view this graph for multiple hosts.
As it is possible to have a lot of graphs attached to one server, or a lot of servers having the same graph (eth0 traffic) - paging is used here. Tweak this line to determine how many graphs should be displayed per page:
CWebUser::$data['rows_per_page'] = 20;
js/class.csuggest.jsThis change is for search field. You start typing servers and got list of suggestions. Pressing Enter previously just selects server from list filling in search field. You have to press Search button to do action. Now action is done automatically.
include/defines.inc.phpThis changing font to much smaller one "Calibri". You can take .ttf from Windows and place to /usr/share/zabbix/fonts/
The rest of filesMinor changes for single graph appearance to make it more clean and simplier when multiple graphs are displayed on one page. Example of single graph after change:
Also, you might want to set theme graph background to white. Unfortunately, I do not know how to do it from Web Interface, so here are DB queries:
update graph_theme set backgroundcolor='FFFFFF' where graphthemeid='1'; update graph_theme set graphbordercolor='FFFFFF' where graphthemeid='1';
This patch is not depends but meant to be applied after ZBXNEXT-599 "Logarithmic scale for Y-axis in graphs" like this:
wget https://support.zabbix.com/secure/attachment/35716/logarithmic-graphs-zabbix-2.4.5.patch wget https://github.com/sepich/zabbix/raw/master/patches/graphs.patch cd /usr/share/zabbix/ patch -p 1 -i ~/logarithmic-graphs-zabbix-2.4.5.patch patch -p 1 -i ~/graphs.patch