Hi together,
I try to create reports but when I edit the "Report Item" section I am not able to select a "Graph Name".
The drop-down menu only shows "None".
Can somebody help me out?
When I re-enter the "Report Item" secion I can see the following log message in the cacti log ....
03/24/2010 08:58:17 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=763 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
I also tried to patch the system using the patch "settings_include_functions.php.patch". The problem is that I get the following message.
RBINTNSTAT01:/srv/www/htdocs # patch -p1 -N < ./plugins/nectar/settings_include_functions.php.patch
patching file plugins/settings/include/functions.php
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file plugins/settings/include/functions.php.rej
Can the patch be the problem? It would be great if somebody could help me out. This reporting engine looks great and I would like to use it.
BR
Benjamin
Nectar Plugin (Empty Graph Name Dropdown Menu)
Moderators: Developers, Moderators
Feedback ...
Hi gandalf,
Yesterday I also tried older versions without success. Today I tried 0.24 as you proposed. I did a clean new install. First I uninstalled the old version, copied 0.24 to the plugin folder and did a new install with the plugin architecture plugin.
Afterwards I used again the patch with the command ...
RBINTNSTAT01:/srv/www/htdocs # patch -p1 -N < plugins/nectar/settings_include_functions.php.patch
patching file plugins/settings/include/functions.php
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file plugins/settings/include/functions.php.rej
This is the "functions.php.rej" I get ...
RBINTNSTAT01:/srv/www/htdocs/plugins/settings/include # less functions.php.rej
***************
*** 22,28 ****
+-------------------------------------------------------------------------+
*/
- function send_mail($to, $from, $subject, $message, $filename = '', $headers = '') {
global $config;
include_once($config["base_path"] . "/plugins/settings/include/mailer.php");
--- 22,28 ----
+-------------------------------------------------------------------------+
*/
+ function send_mail($to, $from, $subject, $message, $data_array = '', $headers = '') {
global $config;
include_once($config["base_path"] . "/plugins/settings/include/mailer.php");
***************
*** 107,130 ****
return $Mailer->error();
}
- if (is_array($filename) && !empty($filename) && strstr($message, '<GRAPH>') !==0) {
- foreach($filename as $val) {
- $graph_data_array = array("output_flag"=> RRDTOOL_OUTPUT_STDOUT);
- $data = rrdtool_function_graph($val['local_graph_id'], $val['rra_id'], $graph_data_array);
- if ($data != "") {
$cid = $Mailer->content_id();
- if ($Mailer->attach($data, $val['filename'].'.png', "image/png", "inline", $cid) == false) {
print "ERROR: " . $Mailer->error() . "\n";
return $Mailer->error();
}
$message = str_replace('<GRAPH>', "<br><br><img src='cid:$cid'>", $message);
} else {
- $message = str_replace('<GRAPH>', "<br><img src='" . $val['file'] . "'><br>Could not open!<br>" . $val['file'], $message);
}
}
}
$text = array('text' => '', 'html' => '');
- if ($filename == '') {
$message = str_replace('<br>', "\n", $message);
$message = str_replace('<BR>', "\n", $message);
$message = str_replace('</BR>', "\n", $message);
--- 107,128 ----
return $Mailer->error();
}
+ if (is_array($data_array) && !empty($data_array) && strstr($message, '<GRAPH>') !==0) {
+ foreach($data_array as $data_item) {
+ if ($data_item["attachment"] != "") {
$cid = $Mailer->content_id();
+ if ($Mailer->attach($data_item["attachment"], $data_item['filename'], $data_item["mime_type"], $data_item["inline"], $cid) == false) {
print "ERROR: " . $Mailer->error() . "\n";
return $Mailer->error();
}
$message = str_replace('<GRAPH>', "<br><br><img src='cid:$cid'>", $message);
} else {
+ $message = str_replace('<GRAPH>', "<br><img src='" . $data_item['file'] . "'><br>Could not open!<br>" . $data_item['file'], $message);
}
}
}
$text = array('text' => '', 'html' => '');
+ if ($data_array == '') {
$message = str_replace('<br>', "\n", $message);
$message = str_replace('<BR>', "\n", $message);
$message = str_replace('</BR>', "\n", $message);
Yesterday I also tried older versions without success. Today I tried 0.24 as you proposed. I did a clean new install. First I uninstalled the old version, copied 0.24 to the plugin folder and did a new install with the plugin architecture plugin.
Afterwards I used again the patch with the command ...
RBINTNSTAT01:/srv/www/htdocs # patch -p1 -N < plugins/nectar/settings_include_functions.php.patch
patching file plugins/settings/include/functions.php
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file plugins/settings/include/functions.php.rej
This is the "functions.php.rej" I get ...
RBINTNSTAT01:/srv/www/htdocs/plugins/settings/include # less functions.php.rej
***************
*** 22,28 ****
+-------------------------------------------------------------------------+
*/
- function send_mail($to, $from, $subject, $message, $filename = '', $headers = '') {
global $config;
include_once($config["base_path"] . "/plugins/settings/include/mailer.php");
--- 22,28 ----
+-------------------------------------------------------------------------+
*/
+ function send_mail($to, $from, $subject, $message, $data_array = '', $headers = '') {
global $config;
include_once($config["base_path"] . "/plugins/settings/include/mailer.php");
***************
*** 107,130 ****
return $Mailer->error();
}
- if (is_array($filename) && !empty($filename) && strstr($message, '<GRAPH>') !==0) {
- foreach($filename as $val) {
- $graph_data_array = array("output_flag"=> RRDTOOL_OUTPUT_STDOUT);
- $data = rrdtool_function_graph($val['local_graph_id'], $val['rra_id'], $graph_data_array);
- if ($data != "") {
$cid = $Mailer->content_id();
- if ($Mailer->attach($data, $val['filename'].'.png', "image/png", "inline", $cid) == false) {
print "ERROR: " . $Mailer->error() . "\n";
return $Mailer->error();
}
$message = str_replace('<GRAPH>', "<br><br><img src='cid:$cid'>", $message);
} else {
- $message = str_replace('<GRAPH>', "<br><img src='" . $val['file'] . "'><br>Could not open!<br>" . $val['file'], $message);
}
}
}
$text = array('text' => '', 'html' => '');
- if ($filename == '') {
$message = str_replace('<br>', "\n", $message);
$message = str_replace('<BR>', "\n", $message);
$message = str_replace('</BR>', "\n", $message);
--- 107,128 ----
return $Mailer->error();
}
+ if (is_array($data_array) && !empty($data_array) && strstr($message, '<GRAPH>') !==0) {
+ foreach($data_array as $data_item) {
+ if ($data_item["attachment"] != "") {
$cid = $Mailer->content_id();
+ if ($Mailer->attach($data_item["attachment"], $data_item['filename'], $data_item["mime_type"], $data_item["inline"], $cid) == false) {
print "ERROR: " . $Mailer->error() . "\n";
return $Mailer->error();
}
$message = str_replace('<GRAPH>', "<br><br><img src='cid:$cid'>", $message);
} else {
+ $message = str_replace('<GRAPH>', "<br><img src='" . $data_item['file'] . "'><br>Could not open!<br>" . $data_item['file'], $message);
}
}
}
$text = array('text' => '', 'html' => '');
+ if ($data_array == '') {
$message = str_replace('<br>', "\n", $message);
$message = str_replace('<BR>', "\n", $message);
$message = str_replace('</BR>', "\n", $message);
Update ...
Now when I add a new "Item" to a report I still can not select something from the "Graph Name" drop-down. When I press save, I see the following cacti logs.
03/25/2010 09:31:35 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=302 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:34 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=302 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:33 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=0 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:31 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=0 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:35 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=302 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:34 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=302 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:33 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=0 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
03/25/2010 09:31:31 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT graph_templates_graph.local_graph_id as id, graph_templates_graph.title_cache as name FROM graph_local LEFT JOIN graph_templates_graph ON (graph_local.id=graph_templates_graph.local_graph_id) WHERE graph_local.host_id=0 AND graph_templates_graph.graph_template_id=|arg1:graph_template_id| ORDER BY name"
Update ...
Hi again,
now I also tried to copy the "html_utility.php" from the folder plugins/nectar/0.8.7e to ./lib/
And now it can select graphs from the drop-down. This was not possible with older versions.
Something else I recognized with the new version. Now the header makes a line-break at the top of the page where the icons are positioned. I ask myself why this has been done.
I suggest that we closed this thread. If a new problems comes up. I will open a new thread.
Thx
BR
Benjamin
now I also tried to copy the "html_utility.php" from the folder plugins/nectar/0.8.7e to ./lib/
And now it can select graphs from the drop-down. This was not possible with older versions.
Something else I recognized with the new version. Now the header makes a line-break at the top of the page where the icons are positioned. I ask myself why this has been done.
I suggest that we closed this thread. If a new problems comes up. I will open a new thread.
Thx
BR
Benjamin
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Unfortunately, I have to publish v0.25. The upgrade procedure was broken (at least for some "old" revisions). Some few changes were applied to the items tab as well.gandalf wrote:Please try new version 0.24 published yesterday.
But the patch is still the same. Please investigate the *.rej file
R.
R.
Proposal ...
Hi gandalf,
it would be great if you can also change line 76 in "top_general_header.php".
A height of e.g. 17 would be better, because then we can also use small tabs.
<tr height="17" bgcolor="#a9a9a9" class="noprint">
I created my small tabs by myself.
BR
Benjamin
it would be great if you can also change line 76 in "top_general_header.php".
A height of e.g. 17 would be better, because then we can also use small tabs.
<tr height="17" bgcolor="#a9a9a9" class="noprint">
I created my small tabs by myself.
BR
Benjamin
Who is online
Users browsing this forum: No registered users and 4 guests