Index: branches/2015Q2/net-mgmt/cacti/files/patch-lib__rrd.php =================================================================== --- branches/2015Q2/net-mgmt/cacti/files/patch-lib__rrd.php (revision 390436) +++ branches/2015Q2/net-mgmt/cacti/files/patch-lib__rrd.php (nonexistent) @@ -1,35 +0,0 @@ ---- ./lib/rrd.php.orig 2014-08-11 17:34:23.000000000 -0700 -+++ ./lib/rrd.php 2014-08-11 17:34:23.000000000 -0700 -@@ -1343,20 +1343,20 @@ - $need_rrd_nl = TRUE; - - if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") { -+ # perform variable substitution first (in case this will yield an empty results or brings command injection problems) -+ $comment_arg = rrd_substitute_host_query_data($graph_variables["text_format"][$graph_item_id], $graph, $graph_item); -+ # next, compute the argument of the COMMENT statement and perform injection counter measures -+ if (trim($comment_arg) == '') { # an empty COMMENT must be treated with care -+ $comment_arg = cacti_escapeshellarg(' ' . $hardreturn[$graph_item_id]); -+ } else { -+ $comment_arg = cacti_escapeshellarg($comment_arg . $hardreturn[$graph_item_id]); -+ } -+ -+ # create rrdtool specific command line - if (read_config_option("rrdtool_version") != "rrd-1.0.x") { -- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", "\:", cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id])) . " "; -- if (trim($comment_string) == 'COMMENT:"\n"') { -- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work -- } else if (trim($comment_string) != "COMMENT:\"\"") { -- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item); -- } -+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", "\:", $comment_arg) . " "; - }else { -- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id]) . " "; -- if (trim($comment_string) == 'COMMENT:"\n"') { -- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work -- } else if (trim($comment_string) != "COMMENT:\"\"") { -- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item); -- } -+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . $comment_arg . " "; - } - }elseif (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && (!isset($graph_data_array["graph_nolegend"]))) { - $graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */ Property changes on: branches/2015Q2/net-mgmt/cacti/files/patch-lib__rrd.php ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2015Q2/net-mgmt/cacti/files/patch-include__global.php =================================================================== --- branches/2015Q2/net-mgmt/cacti/files/patch-include__global.php (revision 390436) +++ branches/2015Q2/net-mgmt/cacti/files/patch-include__global.php (revision 390437) @@ -1,11 +1,11 @@ ---- ./include/global.php.orig 2013-08-06 19:31:19.000000000 -0700 -+++ ./include/global.php 2014-08-11 18:37:08.000000000 -0700 +--- include/global.php.bak 2015-03-12 03:07:05.768314249 -0700 ++++ include/global.php 2015-03-12 03:08:04.171320391 -0700 @@ -113,7 +113,7 @@ $config["library_path"] = preg_replace("/(.*[\/])include/", "\\1lib", dirname(__FILE__)); } $config["include_path"] = dirname(__FILE__); -$config["rra_path"] = $config["base_path"] . '/rra'; +$config["rra_path"] = '/var/db/cacti/rra'; /* colors */ $colors["dark_outline"] = "454E53"; Index: branches/2015Q2/net-mgmt/cacti/files/patch-include__global_settings.php =================================================================== --- branches/2015Q2/net-mgmt/cacti/files/patch-include__global_settings.php (revision 390436) +++ branches/2015Q2/net-mgmt/cacti/files/patch-include__global_settings.php (revision 390437) @@ -1,14 +1,11 @@ ---- ./include/global_settings.php.orig 2013-08-06 19:31:19.000000000 -0700 -+++ ./include/global_settings.php 2014-08-11 18:37:08.000000000 -0700 -@@ -96,9 +96,9 @@ +--- include/global_settings.php.bak 2015-03-12 03:08:59.333297709 -0700 ++++ include/global_settings.php 2015-03-12 03:10:47.532302704 -0700 +@@ -96,7 +96,7 @@ ), "path_cactilog" => array( "friendly_name" => "Cacti Log File Path", - "description" => "The path to your Cacti log file (if blank, defaults to /log/cacti.log)", + "description" => "The path to your Cacti log file (if blank, defaults to /var/log/cacti/log)", "method" => "filepath", -- "default" => $config["base_path"] . "/log/cacti.log", -+ "default" => "/var/log/cacti/log", + "default" => $config["base_path"] . "/log/cacti.log", "max_length" => "255" - ), - "pollerpaths_header" => array( Index: branches/2015Q2/net-mgmt/cacti/files/patch-install__index.php =================================================================== --- branches/2015Q2/net-mgmt/cacti/files/patch-install__index.php (revision 390436) +++ branches/2015Q2/net-mgmt/cacti/files/patch-install__index.php (revision 390437) @@ -1,11 +1,11 @@ ---- ./install/index.php.orig 2013-08-06 19:31:19.000000000 -0700 -+++ ./install/index.php 2014-08-11 18:45:19.000000000 -0700 +--- install/index.php.bak 2015-03-12 03:12:05.409276443 -0700 ++++ install/index.php 2015-03-12 03:14:17.596295374 -0700 @@ -267,7 +267,7 @@ if (config_value_exists("path_cactilog")) { $input["path_cactilog"]["default"] = read_config_option("path_cactilog"); } else { - $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log"; + $input["path_cactilog"]["default"] = "/var/log/cacti/log"; } /* SNMP Version */ Index: branches/2015Q2/net-mgmt/cacti/files/pkg-message.in =================================================================== --- branches/2015Q2/net-mgmt/cacti/files/pkg-message.in (revision 390436) +++ branches/2015Q2/net-mgmt/cacti/files/pkg-message.in (revision 390437) @@ -1,84 +1,87 @@ ======================================================================= Cacti is now installed. If you intall it for the first time, you may have to follow this steps to make it work correctly: 1. Create the MySQL database, a cacti user, and initialize: a) CREATE DATABASE cacti; b) Create a mysql user/password for cacti: CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'password'; FLUSH PRIVILEGES; c) Add GRANTS: GRANT ALL ON cacti.* TO 'cacti'@'localhost'; FLUSH PRIVILEGES; d) Import the default cacti database: mysql --database=cacti -ucacti -p < %%PREFIX%%/%%CACTIDIR%%/cacti.sql NOTE: * Cacti does not LOCK TABLES. 2. Edit %%PREFIX%%/%%CACTIDIR%%/include/config.php from the template config.php.orig. PHP requires the time zone to be explicitly set rather that rely on the system time zone, otherwise poller complains. I added the following line to my config.php: date_default_timezone_set('America/Los_Angeles'); 3. Add the following line to cron for %%CACTIUSER%%: */5 * * * * %%LOCALBASE%%/bin/php %%PREFIX%%/%%CACTIDIR%%/poller.php > /dev/null 2>&1 4. Example Apache 2.4 configuration: LoadModule php5_module libexec/apache22/libphp5.so SetHandler application/x-httpd-php SetHandler application/x-httpd-php-source DirectoryIndex index.php DocumentRoot "/usr/local/share/cacti" Alias /cacti "/usr/local/share/cacti/" Alias /Cacti "/usr/local/share/cacti/" Require all granted AllowOverride None Order Allow,deny Allow from all 5. Open a Cacti login page in your web browser and login with admin/admin. If you update cacti, open a login page and an updating process will start automatically. NOTEs as of 10Aug2014: 1) Cacti now better supports hier(7) a) Cacti log files are now found under /var/log/cacti where you can manage them using newsyslog. b) Cacti RRD files are now found under /var/db/cacti/rra. If you have an existing Cacti installation these paths are also found in Cacti's SQL database and MUST be updated. These two SQL commands should do the trick: UPDATE settings SET value='/var/log/cacti/log' \ WHERE name='path_cactilog'; UPDATE poller_item SET rrd_path=\ REPLACE(rrd_path,'/usr/local/share/cacti/rra','/var/db/cacti/rra') \ WHERE rrd_path REGEXP '^/usr/local/share/cacti/rra'; 2) The PERL paths in the Cacti PERL scripts have been updated to /usr/local/bin. +Other Erratas: +Mount linprocfs in /compat/linux/proc will alow most scripts to work. + ======================================================================= Index: branches/2015Q2 =================================================================== --- branches/2015Q2 (revision 390436) +++ branches/2015Q2 (revision 390437) Property changes on: branches/2015Q2 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r384620