Hello everyone,
one of our customers (6.0.33) has reported to us, that they see a blank screen upon entering host specifc graph configuration under:
Configuration > Hosts > Graphs
Upon closer inspection, I could gather the following information:
- This problem mainly occurs on Citrix session hosts that create loads of graphs through FS discovery (mount points in Windows are discovered as their own FS), i.e. graph discovery
- A lot of these items are no longer discovered -> Say, a host has 167 graphs, then about 80% of those graphs will be marked for deletion within the next 30 days
- Usually, the first page with a setting of about 50 rows per page is displayed correctly and all items can be interacted with as expected
- When turning to another page, the server may not return any data, causing the page to be blank. Using the web development tools I could verify that the server returns a 500 Internal Server Error
- Looking at the PHP logs, I found the following entries that correspond to a faulty "page" being attempted to be loaded:
SENSITIVE INFORMATION IS REMOVED FROM THE FOLLOWING LOG ENTRIES:
[Tue Sep 10 13:15:47.022347 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Undefined array key 56301 in /usr/share/zabbix/graphs.php on line 835, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.022397 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Trying to access array offset on value of type null in /usr/share/zabbix/graphs.php on line 835, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.022424 2024] [php:error] [pid 14019] [client x.x.x.x:56727] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/zabbix/graphs.php:835\nStack trace:\n#0 {main}\n thrown in /usr/share/zabbix/graphs.php on line 835, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023050 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Undefined array key "file" in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 381, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023111 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Undefined array key "line" in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 381, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023131 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Cannot modify header information - headers already sent in /usr/share/zabbix/include/classes/helpers/CCookieHelper.php on line 59, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023151 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in Unknown on line 0, referer: https://example.com/graphs.php?context=host&page=6
The above warning and error has led me to decrease the size of the rows per page (down to one at times for troubleshooting purposes) being displayed, which in some instances has helped solve this issue. However, it still happens if some yet unknown conditions are met.
My best guess so far is, that this error occurs when a page that is to be displayed, would only contain graphs, that are no longer discovered. Please note, that this only affects the configuration of said graphs, not solely viewing them, i.e. any of these may be viewed without any further issue under Monitoring > ...
I have, however, been unable to reproduce this, using other instances of Zabbix, using the same version and also discovering loads of file systems and therefore creating graphs based on the graph prototypes of the associated template. Hence why, I have so far refrained from filing a bug report and have considered a configuration error.
Has anyone else experienced this issue or has any insights into what specifically could be causing this (not referring to the error shown in the logs, I rudimentarily understand what it means, but am unsure where this key is coming from)? Any advice on how to continue troubleshooting and further defining this error would be much appreciated.
one of our customers (6.0.33) has reported to us, that they see a blank screen upon entering host specifc graph configuration under:
Configuration > Hosts > Graphs
Upon closer inspection, I could gather the following information:
- This problem mainly occurs on Citrix session hosts that create loads of graphs through FS discovery (mount points in Windows are discovered as their own FS), i.e. graph discovery
- A lot of these items are no longer discovered -> Say, a host has 167 graphs, then about 80% of those graphs will be marked for deletion within the next 30 days
- Usually, the first page with a setting of about 50 rows per page is displayed correctly and all items can be interacted with as expected
- When turning to another page, the server may not return any data, causing the page to be blank. Using the web development tools I could verify that the server returns a 500 Internal Server Error
- Looking at the PHP logs, I found the following entries that correspond to a faulty "page" being attempted to be loaded:
SENSITIVE INFORMATION IS REMOVED FROM THE FOLLOWING LOG ENTRIES:
[Tue Sep 10 13:15:47.022347 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Undefined array key 56301 in /usr/share/zabbix/graphs.php on line 835, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.022397 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Trying to access array offset on value of type null in /usr/share/zabbix/graphs.php on line 835, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.022424 2024] [php:error] [pid 14019] [client x.x.x.x:56727] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/zabbix/graphs.php:835\nStack trace:\n#0 {main}\n thrown in /usr/share/zabbix/graphs.php on line 835, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023050 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Undefined array key "file" in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 381, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023111 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Undefined array key "line" in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 381, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023131 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Cannot modify header information - headers already sent in /usr/share/zabbix/include/classes/helpers/CCookieHelper.php on line 59, referer: https://example.com/graphs.php?context=host&page=6
[Tue Sep 10 13:15:47.023151 2024] [php:warn] [pid 14019] [client x.x.x.x:56727] PHP Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in Unknown on line 0, referer: https://example.com/graphs.php?context=host&page=6
The above warning and error has led me to decrease the size of the rows per page (down to one at times for troubleshooting purposes) being displayed, which in some instances has helped solve this issue. However, it still happens if some yet unknown conditions are met.
My best guess so far is, that this error occurs when a page that is to be displayed, would only contain graphs, that are no longer discovered. Please note, that this only affects the configuration of said graphs, not solely viewing them, i.e. any of these may be viewed without any further issue under Monitoring > ...
I have, however, been unable to reproduce this, using other instances of Zabbix, using the same version and also discovering loads of file systems and therefore creating graphs based on the graph prototypes of the associated template. Hence why, I have so far refrained from filing a bug report and have considered a configuration error.
Has anyone else experienced this issue or has any insights into what specifically could be causing this (not referring to the error shown in the logs, I rudimentarily understand what it means, but am unsure where this key is coming from)? Any advice on how to continue troubleshooting and further defining this error would be much appreciated.