This is an old revision of the document!

A few new configuration files were placed in the <GANGLIA HOME>/ directory with the following content:

   $maint_name = "maintenance";
   $computer_metrics = array(
   $maintenance_metrics = array(

in the <GANGLIA HOME>/graph.d/ directory (files archive graph_d.zip)


in the file conf.php (in “/etc/ganglia/”) was inserted:

include_once "./maintenance_conf.php";

for the additional time ranges:

$time_ranges = array(

for the additional graph sizes:

$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 “from” url parameter:

$customstart = isset($_GET["from"]) ?  clean_number ( sanitize( $_GET["from"] ) ) : NULL;

customizing of the start and end points of the graph

# 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:

foreach (array_keys ($rrdtool_graph) as $key) {
    if (preg_match('/extras|series/', $key))
    $value = $rrdtool_graph[$key];
    if (preg_match('/\W/', $value)) {
        //more than alphanumerics in value, so quote it
        $value = "'$value'";
    //begin of the changing
    if ($customstart){
         switch ($key) {
            case 'start':
                $value = "'$start'";
            case 'end':
                $value = "'$end'";
    //end of the changing
    $command .= " --$key $value";

the correction of the graph title (line 158)

case 'cluster':
        $title  = "$clustername Cluster";

changed to:

case 'cluster':
        if($clustername != $maint_name)$title  = "$clustername Cluster";else $title  = "";
  • due_to_source_code_changing_2.1374759802.txt.gz
  • Last modified: 2013/07/25 15:43
  • by noskov