]>
Commit | Line | Data |
---|---|---|
6d075ceb ER |
1 | --- cacti-0.8.7b/include/global.php~ 2008-10-05 04:29:33.131404241 +0300 |
2 | +++ cacti-0.8.7b/include/global.php 2008-10-05 04:38:29.740276226 +0300 | |
3 | @@ -101,7 +101,8 @@ | |
4 | $config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\\", "/"); | |
5 | $config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__)); | |
6 | $config["include_path"] = dirname(__FILE__); | |
7 | -$config["rra_path"] = $config["base_path"] . '/rra'; | |
219fa6fd | 8 | +$config["rra_path"] = '/var/lib/cacti/rra'; |
6d075ceb ER |
9 | +$config["log_path"] = '/var/log/cacti'; |
10 | ||
11 | /* colors */ | |
12 | $colors["dark_outline"] = "454E53"; | |
4a8ad59c SP |
13 | diff -ur cacti-0.8.7g/include/config.php cacti-0.8.7g.new//include/config.php |
14 | --- cacti-0.8.7g/include/config.php 2010-07-10 00:33:46.000000000 +0200 | |
15 | +++ cacti-0.8.7g.new//include/config.php 2010-11-15 10:12:12.503157839 +0100 | |
16 | @@ -22,7 +22,11 @@ | |
17 | +-------------------------------------------------------------------------+ | |
18 | */ | |
19 | ||
20 | -/* make sure these values refect your actual database/host/user/password */ | |
21 | +/* | |
22 | + * !!! Use /etc/webapps/cacti/config.php instead of this section !!! | |
23 | + * | |
24 | + * Make sure these values refect your actual database/host/user/password | |
25 | + | |
26 | $database_type = "mysql"; | |
27 | $database_default = "cacti"; | |
28 | $database_hostname = "localhost"; | |
29 | @@ -30,6 +34,10 @@ | |
27f26353 GS |
30 | $database_password = "cactiuser"; |
31 | $database_port = "3306"; | |
4a8ad59c SP |
32 | |
33 | + */ | |
34 | + | |
84e88c27 | 35 | +require '/etc/webapps/cacti/config.php'; |
a7a2d13b | 36 | + |
27f26353 GS |
37 | /* Default session name - Session name must contain alpha characters */ |
38 | #$cacti_session_name = "Cacti"; | |
ecc80f5d | 39 | |
6d075ceb ER |
40 | --- cacti-0.8.7b/include/global_settings.php~ 2008-10-05 04:29:33.121404239 +0300 |
41 | +++ cacti-0.8.7b/include/global_settings.php 2008-10-05 04:41:11.807395633 +0300 | |
42 | @@ -96,7 +96,7 @@ | |
43 | "friendly_name" => "Cacti Log File Path", | |
44 | "description" => "The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)", | |
45 | "method" => "filepath", | |
46 | - "default" => $config["base_path"] . "/log/cacti.log", | |
47 | + "default" => $config["log_path"] . "/cacti.log", | |
48 | "max_length" => "255" | |
49 | ), | |
50 | "pollerpaths_header" => array( | |
51 | --- cacti-0.8.7b/install/index.php~ 2008-10-05 04:29:33.113733438 +0300 | |
52 | +++ cacti-0.8.7b/install/index.php 2008-10-05 04:41:37.276839747 +0300 | |
53 | @@ -244,7 +244,7 @@ | |
54 | if (config_value_exists("path_cactilog")) { | |
55 | $input["path_cactilog"]["default"] = read_config_option("path_cactilog"); | |
56 | } else { | |
57 | - $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log"; | |
58 | + $input["path_cactilog"]["default"] = $config["log_path"] . "/cacti.log"; | |
59 | } | |
60 | ||
61 | /* SNMP Version */ | |
62 | --- cacti-0.8.7b/lib/functions.php~ 2008-10-05 04:29:33.124737562 +0300 | |
63 | +++ cacti-0.8.7b/lib/functions.php 2008-10-05 04:42:05.046758504 +0300 | |
64 | @@ -367,7 +367,7 @@ | |
65 | /* Log to Logfile */ | |
66 | if ((($logdestination == 1) || ($logdestination == 2)) && (read_config_option("log_verbosity") != POLLER_VERBOSITY_NONE)) { | |
67 | if ($logfile == "") { | |
68 | - $logfile = $config["base_path"] . "/log/cacti.log"; | |
69 | + $logfile = $config["log_path"] . "/cacti.log"; | |
70 | } | |
71 | ||
72 | /* echo the data to the log (append) */ | |
73 | --- cacti-0.8.7b/utilities.php~ 2008-10-05 04:29:33.128070807 +0300 | |
74 | +++ cacti-0.8.7b/utilities.php 2008-10-05 04:43:30.176737491 +0300 | |
75 | @@ -693,12 +693,12 @@ | |
76 | } | |
77 | ||
78 | function utilities_view_logfile() { | |
79 | - global $colors, $log_tail_lines, $page_refresh_interval; | |
80 | + global $config, $colors, $log_tail_lines, $page_refresh_interval; | |
81 | ||
82 | $logfile = read_config_option("path_cactilog"); | |
83 | ||
84 | if ($logfile == "") { | |
85 | - $logfile = "./log/rrd.log"; | |
86 | + $logfile = $config['log_path']. "/rrd.log"; | |
87 | } | |
88 | ||
89 | /* helps determine output color */ | |
90 | @@ -858,7 +858,7 @@ | |
91 | } | |
92 | ||
93 | function utilities_clear_logfile() { | |
94 | - global $colors; | |
95 | + global $config, $colors; | |
96 | ||
97 | load_current_session_value("refresh", "sess_logfile_refresh", read_config_option("log_refresh_interval")); | |
98 | ||
99 | @@ -870,7 +870,7 @@ | |
100 | $logfile = read_config_option("path_cactilog"); | |
101 | ||
102 | if ($logfile == "") { | |
103 | - $logfile = "./log/cacti.log"; | |
104 | + $logfile = $config['log_path']."/cacti.log"; | |
105 | } | |
106 | ||
107 | html_start_box("<strong>Clear Cacti Log File</strong>", "100%", $colors["header"], "1", "center", ""); | |
156a14ed ER |
108 | --- cacti/poller.php~ 2008-10-05 05:08:10.000000000 +0300 |
109 | +++ cacti/poller.php 2008-10-05 05:11:11.327705168 +0300 | |
110 | @@ -1,3 +1,4 @@ | |
111 | +#!/usr/bin/php | |
112 | <?php | |
113 | /* | |
114 | +-------------------------------------------------------------------------+ | |
115 | @@ -32,7 +32,7 @@ | |
116 | $no_http_headers = true; | |
117 | ||
118 | /* start initialization section */ | |
119 | -include(dirname(__FILE__) . "/include/global.php"); | |
120 | +require "/usr/share/cacti/include/global.php"; | |
121 | include_once($config["base_path"] . "/lib/poller.php"); | |
122 | include_once($config["base_path"] . "/lib/data_query.php"); | |
123 | include_once($config["base_path"] . "/lib/graph_export.php"); |