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/08/16 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> | ||
- | <? | ||
- | $maint_name = " | ||
- | $computer_metrics = array( | ||
- | " | ||
- | " | ||
- | " | ||
- | ); | ||
- | |||
- | $maint_rrdfile = array( | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ) | ||
- | |||
- | ); | ||
- | |||
- | $mgroup_metrics = array( | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ), | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ) | ||
- | |||
- | ); | ||
- | |||
- | function add_ipmi_metrics ($metrics, $rrddir){ | ||
- | $alledateien = scandir($rrddir); | ||
- | foreach ($alledateien as $datei) { // Ausgabeschleife | ||
- | if (substr_compare($datei," | ||
- | $dateiinfo = pathinfo($rrddir."/" | ||
- | if($dateiinfo[' | ||
- | $metrics[$dateiinfo[' | ||
- | $metrics[$dateiinfo[' | ||
- | $metrics[$dateiinfo[' | ||
- | $metrics[$dateiinfo[' | ||
- | $metrics[$dateiinfo[' | ||
- | $metrics[$dateiinfo[' | ||
- | # | ||
- | } | ||
- | } | ||
- | }; | ||
- | return $metrics; | ||
- | } | ||
- | |||
- | function add_ipmi_metrics_cview($hostname, | ||
- | $alledateien = scandir($rrddir); | ||
- | foreach ($alledateien as $datei) { // Ausgabeschleife | ||
- | if (substr_compare($datei," | ||
- | $dateiinfo = pathinfo($rrddir."/" | ||
- | if($dateiinfo[' | ||
- | $metrics[$hostname][$dateiinfo[' | ||
- | $metrics[$hostname][$dateiinfo[' | ||
- | $metrics[$hostname][$dateiinfo[' | ||
- | $metrics[$hostname][$dateiinfo[' | ||
- | $metrics[$hostname][$dateiinfo[' | ||
- | $metrics[$hostname][$dateiinfo[' | ||
- | # | ||
- | } | ||
- | } | ||
- | }; | ||
- | return $metrics; | ||
- | } | ||
- | ?> | ||
- | |||
- | </ | ||
- | in the <GANGLIA HOME>/ | ||
- | | ||
- | 4241 Aug 13 18:27 clcpairflow_report.php | ||
- | 4247 Aug 13 18:27 clcpwaterflow_report.php | ||
- | 3011 Feb 17 2010 cpu_report.php | ||
- | 4388 Aug 6 17:06 cputemp_report.php | ||
- | 1481 Feb 17 2010 load_report.php | ||
- | 2284 Feb 17 2010 mem_report.php | ||
- | 3659 Aug 14 11:55 metric.php | ||
- | 6481 Jul 18 16:50 my_report.php | ||
- | 1109 Jul 19 11:52 network_report.php | ||
- | 1107 Feb 17 2010 packet_report.php | ||
- | 4369 Jul 19 16:12 pump1_report.php | ||
- | 4561 Jul 24 14:38 pumpdp_report.php | ||
- | 4752 Jul 24 16:34 pumptemp_report.php | ||
- | 4079 Aug 13 18:26 rows_report.php | ||
- | 4154 Aug 13 18:25 rowscool_report.php | ||
- | 4089 Aug 13 18:26 rowsfan_report.php | ||
- | 6481 Feb 17 2010 sample_report.php | ||
- | |||
- | |||
- | correction of the file metric.php in order to take new DS in to account: | ||
- | <file metric.php> | ||
- | ... | ||
- | $DSname=" | ||
- | //# the actual graph... | ||
- | if (substr_compare($metricname," | ||
- | $DSname=" | ||
- | $series | ||
- | $series .= " | ||
- | $series .= ": | ||
- | ... | ||
- | </ | ||
- | |||
- | |||
- | **in the file conf.php (in "/ | ||
- | <code php> | ||
- | ... | ||
- | include_once " | ||
- | ... | ||
- | # Set timezone | ||
- | date_default_timezone_set ( ' | ||
- | ... | ||
- | </ | ||
- | |||
- | in the template file <GANGLIA HOME>/ | ||
- | |||
- | <code php> | ||
- | ... | ||
- | <!-- START BLOCK : public --> | ||
- | < | ||
- | <table cellspacing=1 cellpadding=1 width=" | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </TD> | ||
- | |||
- | <TD ROWSPAN=2 ALIGN=" | ||
- | | ||
- | <table cellspacing=1 cellpadding=1 width=100% border=0> | ||
- | <!-- START BLOCK : graph_group --> | ||
- | < | ||
- | < | ||
- | <!-- START BLOCK : metric_graphs --> | ||
- | <A HREF=" | ||
- | < | ||
- | ALT=" | ||
- | </ | ||
- | <!-- END BLOCK : metric_graphs --> | ||
- | </ | ||
- | </ | ||
- | <!-- END BLOCK : graph_group --> | ||
- | </ | ||
- | | ||
- | </ | ||
- | <!-- END BLOCK : public --> | ||
- | ... | ||
- | </ | ||
- | |||
- | in the file <GANGLIA HOME>/ | ||
- | <code php public cluster code is altered> | ||
- | ... | ||
- | foreach ( $sorted_sources as $source => $val ) | ||
- | { | ||
- | |||
- | ... | ||
- | if (!isset($private[$source]) or !$private[$source]) | ||
- | { | ||
- | $tpl-> | ||
- | # Each block has a different namespace, so we need to redefine variables. | ||
- | $tpl-> | ||
- | if ($localtime) | ||
- | | ||
- | . date(" | ||
- | |||
- | | ||
- | | ||
- | | ||
- | | ||
- | if ($name == $maint_name){ | ||
- | foreach ($mgroup_metrics as $mname => &$mgrp) { | ||
- | $hostname = $mname; | ||
- | $tpl-> | ||
- | foreach ($mgrp as $g) { | ||
- | $tpl-> | ||
- | | ||
- | $tpl-> | ||
- | $tpl-> | ||
- | $tpl-> | ||
- | $tpl-> | ||
- | $tpl-> | ||
- | $tpl-> | ||
- | } | ||
- | } | ||
- | } else { | ||
- | if ($cluster_load) | ||
- | | ||
- | ."< | ||
- | | ||
- | $tpl-> | ||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | } | ||
- | } | ||
- | |||
- | ... | ||
- | </ | ||
- | in order to see the "last reported" | ||
- | <code php> | ||
- | if ($name == $maint_name) | ||
- | $tpl-> | ||
- | else | ||
- | $tpl-> | ||
- | </ |