All,
I upgraded to 0.4.3 and when I did, none of my notification emails contain the graph anymore, they all report:
Error while opening;
I rolled back to 0.4.2 and everything is working fine, so it looks like there might be a bug with 0.4.3. Has anyone else seen this?
EDIT: BTW, I'm running 0.8.7g with PIA 2.9 on Windows.
THold 0.4.3 emails don't contain graphs?
Moderators: Developers, Moderators
Re: THold 0.4.3 emails don't contain graphs?
Hi,
Graph is coming but in .jpeg format earlier .png.. & it is doing via php-gd.If php-gd not Change followings in thold_functions.php
Existing:Line 1456:
data = png2jpeg(rrdtool_function_graph($val['local_graph_id'], $val['rra_id'], $graph_data_array));
Proposed:
$data = rrdtool_function_graph($val['local_graph_id'], $val['rra_id'], $graph_data_array);
Existing: Line 1459
if ($Mailer->attach($data, $val['filename'].'.jpg', 'image/jpg', 'inline', $cid) == false) {
Proposed:
if ($Mailer->attach($data, $val['filename'].'.png', 'image/png', 'inline', $cid) == false) {
Followings are the change-log:
----[ Changelog
--- 0.4.3 ---
Add support for maint plugin
Fix to allow Add Wizard to show all datasources belonging to a graph (even when in separate data templates)
Re-apply SQL speed up when polling
Several fixes to Baselining
Several fixes to CDEFs
Add customizable subjects and message body for down host alerts
After installing this thold total polling time reduced by 30 second!
Hi Jimmy,
Any selectable option for keeping the embedded mail image to .png as .jpeg reduce the quality.
Graph is coming but in .jpeg format earlier .png.. & it is doing via php-gd.If php-gd not Change followings in thold_functions.php
Existing:Line 1456:
data = png2jpeg(rrdtool_function_graph($val['local_graph_id'], $val['rra_id'], $graph_data_array));
Proposed:
$data = rrdtool_function_graph($val['local_graph_id'], $val['rra_id'], $graph_data_array);
Existing: Line 1459
if ($Mailer->attach($data, $val['filename'].'.jpg', 'image/jpg', 'inline', $cid) == false) {
Proposed:
if ($Mailer->attach($data, $val['filename'].'.png', 'image/png', 'inline', $cid) == false) {
Followings are the change-log:
----[ Changelog
--- 0.4.3 ---
Add support for maint plugin
Fix to allow Add Wizard to show all datasources belonging to a graph (even when in separate data templates)
Re-apply SQL speed up when polling
Several fixes to Baselining
Several fixes to CDEFs
Add customizable subjects and message body for down host alerts
After installing this thold total polling time reduced by 30 second!
Hi Jimmy,
Any selectable option for keeping the embedded mail image to .png as .jpeg reduce the quality.
Re: THold 0.4.3 emails don't contain graphs?
Hi. I had this problem as well and use cacti on windows.
Looking at the png2jpeg function definition at the bottom of thold_functions.php, it is using '/tmp/' for writing the temp file.
Offending line:
$fn = "/tmp/" . time() . '.png';
Proposed fix:
$fn = sys_get_temp_dir() . DIRECTORY_SEPARATOR . time() . '.png';
You need PHP >= 5.2.1 and according to the comments at http://php.net/manual/en/function.sys-get-temp-dir.php this is probably not be the best approach.
Looking at the png2jpeg function definition at the bottom of thold_functions.php, it is using '/tmp/' for writing the temp file.
Offending line:
$fn = "/tmp/" . time() . '.png';
Proposed fix:
$fn = sys_get_temp_dir() . DIRECTORY_SEPARATOR . time() . '.png';
You need PHP >= 5.2.1 and according to the comments at http://php.net/manual/en/function.sys-get-temp-dir.php this is probably not be the best approach.
Re: THold 0.4.3 emails don't contain graphs?
I am running Cacti or Windows 2003 Server and this worked for me. Thanks.dignome wrote:Hi. I had this problem as well and use cacti on windows.
Looking at the png2jpeg function definition at the bottom of thold_functions.php, it is using '/tmp/' for writing the temp file.
Offending line:
$fn = "/tmp/" . time() . '.png';
Proposed fix:
$fn = sys_get_temp_dir() . DIRECTORY_SEPARATOR . time() . '.png';
You need PHP >= 5.2.1 and according to the comments at http://php.net/manual/en/function.sys-get-temp-dir.php this is probably not be the best approach.
-willieb
Re: THold 0.4.3 emails don't contain graphs?
Many Thanks dear "dignome"dignome wrote:Hi. I had this problem as well and use cacti on windows.
Looking at the png2jpeg function definition at the bottom of thold_functions.php, it is using '/tmp/' for writing the temp file.
Offending line:
$fn = "/tmp/" . time() . '.png';
Proposed fix:
$fn = sys_get_temp_dir() . DIRECTORY_SEPARATOR . time() . '.png';
You need PHP >= 5.2.1 and according to the comments at http://php.net/manual/en/function.sys-get-temp-dir.php this is probably not be the best approach.
It works like a charm for me also
(Using Cacti on Win 2003)
cheers
Re: THold 0.4.3 emails don't contain graphs?
Thanks very much dignome!dignome wrote:Hi. I had this problem as well and use cacti on windows.
Looking at the png2jpeg function definition at the bottom of thold_functions.php, it is using '/tmp/' for writing the temp file.
Offending line:
$fn = "/tmp/" . time() . '.png';
Proposed fix:
$fn = sys_get_temp_dir() . DIRECTORY_SEPARATOR . time() . '.png';
You need PHP >= 5.2.1 and according to the comments at http://php.net/manual/en/function.sys-get-temp-dir.php this is probably not be the best approach.
Strangely never had this problem on Windows 2003 server running 0.8.8a/Thold 0.4.9, but got it when moved to Win2008 R2.
The above change fixed the "error while opening:" missing email image issue for me.
Cheers
Re: THold 0.4.3 emails don't contain graphs?
Bug created to track this issue - http://bugs.cacti.net/view.php?id=2309 as it's still present in 0.4.9
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 2 guests