Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
due_to_source_code_changing_2 [2013/07/25 15:43] noskov |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | A few new configuration files were placed in the <GANGLIA HOME>/ directory with the following content: | ||
- | <file php maintenance_conf.php> | ||
- | <? | ||
- | | ||
- | | ||
- | " | ||
- | " | ||
- | ); | ||
- | | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ); | ||
- | ?> | ||
- | </ | ||
- | in the <GANGLIA HOME>/ | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | **in the file conf.php (in "/ | ||
- | <code php> | ||
- | include_once " | ||
- | </ | ||
- | for the additional time ranges: | ||
- | <code php> | ||
- | $time_ranges = array( | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ); | ||
- | </ | ||
- | for the additional graph sizes: | ||
- | <code php> | ||
- | $graph_sizes = array( | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ), | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ), | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ), | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ), | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ), | ||
- | # this was the default value when no other size was provided. | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ) | ||
- | ); | ||
- | </ | ||
- | |||
- | **in the file graph.php (in the <GANGLIA HOME>/ | ||
- | inserted line pick the " | ||
- | |||
- | <code php> | ||
- | $customstart = isset($_GET[" | ||
- | </ | ||
- | customizing of the start and end points of the graph | ||
- | <code php> | ||
- | # Calculate time range with custom start point. | ||
- | if ($customstart) | ||
- | { | ||
- | $start = date_timestamp_get(date_create($customstart)); | ||
- | $end = $start + $time_ranges[ $range ]; | ||
- | } | ||
- | </ | ||
- | to prevent of the overwriting of our parameters: | ||
- | <code php> | ||
- | foreach (array_keys ($rrdtool_graph) as $key) { | ||
- | if (preg_match('/ | ||
- | continue; | ||
- | $value = $rrdtool_graph[$key]; | ||
- | if (preg_match('/ | ||
- | //more than alphanumerics in value, so quote it | ||
- | $value = "' | ||
- | } | ||
- | //begin of the changing | ||
- | if ($customstart){ | ||
- | | ||
- | case ' | ||
- | $value = "' | ||
- | break; | ||
- | | ||
- | case ' | ||
- | $value = "' | ||
- | break; | ||
- | } | ||
- | } | ||
- | //end of the changing | ||
- | $command .= " --$key $value"; | ||
- | } | ||
- | </ | ||
- | the correction of the graph title (line 158) | ||
- | |||
- | <code php> | ||
- | case ' | ||
- | $title | ||
- | break; | ||
- | </ | ||
- | changed to: | ||
- | <code php> | ||
- | case ' | ||
- | if($clustername != $maint_name)$title | ||
- | break; | ||
- | </ |