diff --git a/AUTHORS b/AUTHORS index 9858568c..4bbfac33 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,4 @@ Federico Sacerdoti Matt Massie Vladimir Vuksan Jeff Buchbinder +Dave Rawks diff --git a/Makefile b/Makefile index f977aa33..1c71541b 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ APACHE_USER = apache # Gweb version GWEB_MAJOR_VERSION = 2 -GWEB_MINOR_VERSION = 1 -GWEB_MICRO_VERSION = 8 +GWEB_MINOR_VERSION = 2 +GWEB_MICRO_VERSION = 1 # Gweb statedir (where RRD files, Dwoo templates are stored) GWEB_STATEDIR = /var/lib diff --git a/api/events.php b/api/events.php index c9ce1b53..8fdcac9d 100644 --- a/api/events.php +++ b/api/events.php @@ -11,11 +11,11 @@ // Make timestamp, description and host_regex have been supplied before proceeding header("Content-Type: text/plain"); -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; -include_once $conf['ganglia_dir'] . "/functions.php"; -include_once $conf['ganglia_dir'] . "/lib/common_api.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/functions.php"; +include_once $conf['gweb_root'] . "/lib/common_api.php"; if ( ! $conf['overlay_events'] ) { api_return_error( "Events API is DISABLED. Please set \$conf['overlay_events'] = true to enable." ); diff --git a/api/rundeck.php b/api/rundeck.php index b405b5cc..f6c543e1 100644 --- a/api/rundeck.php +++ b/api/rundeck.php @@ -25,14 +25,14 @@ header("Content-Type: text/plain"); -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; -include_once $conf['ganglia_dir'] . "/functions.php"; -include_once $conf['ganglia_dir'] . "/get_context.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/functions.php"; +include_once $conf['gweb_root'] . "/get_context.php"; $context = "cluster"; -include_once $conf['ganglia_dir'] . "/ganglia.php"; -include_once $conf['ganglia_dir'] . "/get_ganglia.php"; +include_once $conf['gweb_root'] . "/ganglia.php"; +include_once $conf['gweb_root'] . "/get_ganglia.php"; foreach ( $metrics as $node => $metric_array ) { diff --git a/api/search.php b/api/search.php index 9f6c84a9..3b09a815 100644 --- a/api/search.php +++ b/api/search.php @@ -11,11 +11,11 @@ // will give you back the name of the cluster where host is in ///////////////////////////////////////////////////////////////////////////// -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; -include_once $conf['ganglia_dir'] . "/lib/common_api.php"; -include_once $conf['ganglia_dir'] . "/lib/functions.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/lib/common_api.php"; +include_once $conf['gweb_root'] . "/lib/functions.php"; ganglia_cache_metrics(); diff --git a/api/views.php b/api/views.php index 4f64d167..d615fc6d 100644 --- a/api/views.php +++ b/api/views.php @@ -2,11 +2,11 @@ header("Content-Type: text/json"); -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; -include_once $conf['ganglia_dir'] . "/functions.php"; -include_once $conf['ganglia_dir'] . "/lib/common_api.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/functions.php"; +include_once $conf['gweb_root'] . "/lib/common_api.php"; if ( !isset($_GET['action']) ) { api_return_error( "Error: You need to specify an action at a minimum" ); diff --git a/conf_default.php.in b/conf_default.php.in index 041c7acc..0bc72ebf 100644 --- a/conf_default.php.in +++ b/conf_default.php.in @@ -3,9 +3,9 @@ # # Gmetad-webfrontend version. Used to check for updates. # -$conf['ganglia_dir'] = dirname(__FILE__); +$conf['gweb_root'] = dirname(__FILE__); -include_once $conf['ganglia_dir'] . "/version.php"; +include_once $conf['gweb_root'] . "/version.php"; # # 'readonly': No authentication is required. All users may view all resources. No edits are allowed. @@ -31,7 +31,8 @@ $conf['gmetad_root'] = "@varstatedir@/ganglia"; $conf['rrds'] = "${conf['gmetad_root']}/rrds"; # Where Dwoo (PHP templating engine) store compiled templates -$conf['dwoo_compiled_dir'] = "${conf['gmetad_root']}/dwoo"; +$conf['dwoo_compiled_dir'] = "${conf['gweb_root']}/lib/dwoo/compiled"; +$conf['dwoo_cache_dir'] = "${conf['gweb_root']}/lib/dwoo/cache"; # Where to store web-based configuration $conf['views_dir'] = $conf['gmetad_root'] . '/conf'; diff --git a/debian/changelog b/debian/changelog index dbd965e5..0b0c9519 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,18 @@ -ganglia-webfrontend (2.2.1-1) unstable; urgency=low +ganglia-webfrontend (2.2.1) unstable; urgency=low + [ Dave Rawks ] + * More tweaks to packaging to fit with debian policy + * Moved apache config to install in apache2's conf.d + * Added a conf.php which includes from /etc/ganglia-webfrontend/conf.php + + -- Dave Rawks Thu, 29 Dec 2011 14:42:00 -0800 + +ganglia-webfrontend (2.2.0-0) unstable; urgency=low + + [ Jeff Buchbinder ] * Add debian packaging. - -- Jeff Buchbinder Sat, 13 Aug 2011 10:33:41 -0400 + [ Dave Rawks ] + * Corrected several problems with debian packaging + -- Dave Rawks Thu, 29 Dec 2011 11:27:04 -0800 diff --git a/debian/compat b/debian/compat index 7ed6ff82..7f8f011e 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +7 diff --git a/debian/ganglia-webfrontend.dirs b/debian/ganglia-webfrontend.dirs index a4016072..14965f14 100644 --- a/debian/ganglia-webfrontend.dirs +++ b/debian/ganglia-webfrontend.dirs @@ -1,2 +1,4 @@ etc/ganglia-webfrontend usr/share/ganglia-webfrontend +usr/share/ganglia-webfrontend/lib/dwoo/compiled +usr/share/ganglia-webfrontend/lib/dwoo/cache diff --git a/debian/ganglia-webfrontend.postinst b/debian/ganglia-webfrontend.postinst index 5e962efc..5068d37f 100644 --- a/debian/ganglia-webfrontend.postinst +++ b/debian/ganglia-webfrontend.postinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -x set -e @@ -11,6 +11,9 @@ if [ "$1" = "configure" ]; then autoconfigure="$RET" webserver="apache2" + chown www-data /usr/share/ganglia-webfrontend/lib/dwoo/cache + chown www-data /usr/share/ganglia-webfrontend/lib/dwoo/compiled + if [ "$autoconfigure" = true ]; then test -x /usr/sbin/$webserver || continue diff --git a/debian/ganglia-webfrontend.postrm b/debian/ganglia-webfrontend.postrm index 04f8ac15..5954caa7 100644 --- a/debian/ganglia-webfrontend.postrm +++ b/debian/ganglia-webfrontend.postrm @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/sh -x set -e diff --git a/debian/ganglia-webfrontend.templates b/debian/ganglia-webfrontend.templates index b975ee5e..ee0cec19 100644 --- a/debian/ganglia-webfrontend.templates +++ b/debian/ganglia-webfrontend.templates @@ -9,14 +9,14 @@ Template: ganglia-webfrontend/webserver Type: boolean -Default: false +Default: true _Description: Automatically configure apache2? The ganglia front-end will be unavailable until a web server is configured. Automatic configuration can be performed for the Apache 2 web server. Template: ganglia-webfrontend/restart Type: boolean -Default: false +Default: true _Description: Restart apache2? In order to activate the new configuration, the web server needs to be restarted. If you choose not to do this automatically, you should diff --git a/debian/rules b/debian/rules index cd0895f8..bdce3174 100755 --- a/debian/rules +++ b/debian/rules @@ -22,11 +22,14 @@ override_dh_auto_clean: override_dh_auto_install: dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs # Add here commands to install the package into debian/ganglia. $(MAKE) install APACHE_USER=www-data DESTDIR=$(CURDIR)/debian/tmp/usr/share/ganglia-webfrontend # Install webfrontend + mkdir -p debian/ganglia-webfrontend/etc/apache2/conf.d/ cp -f debian/apache.conf \ debian/ganglia-webfrontend/etc/ganglia-webfrontend + cp -f debian/conf.php \ + debian/ganglia-webfrontend/etc/ganglia-webfrontend diff --git a/debian/source/format b/debian/source/format index 163aaf8d..89ae9db8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) diff --git a/edit_optional_graphs.php b/edit_optional_graphs.php index f87ab78c..95e3ea3d 100644 --- a/edit_optional_graphs.php +++ b/edit_optional_graphs.php @@ -175,7 +175,7 @@ function create_radio_button($variable_name, $variable_value = "ignored") { Find available graphs by looking in the GANGLIA_DIR/graph.d directory anything that matches _report.php ----------------------------------------------------------------------- */ -if ($handle = opendir($conf['ganglia_dir'] . '/graph.d')) { +if ($handle = opendir($conf['gweb_root'] . '/graph.d')) { // If we are using RRDtool reports can be json or PHP suffixes if ( $conf['graph_engine'] == "rrdtool" ) diff --git a/eval_conf.php b/eval_conf.php index 07945003..a797ed54 100644 --- a/eval_conf.php +++ b/eval_conf.php @@ -57,6 +57,11 @@ "Please adjust \$conf['dwoo_compiled_dir']."; } +if ( ! isset($conf['dwoo_compiled_dir']) || ! is_writeable($conf['dwoo_compiled_dir']) ) { + $errors[] = "DWOO cache directory '${conf['dwoo_cache_dir']}' is not writeable.
". + "Please adjust \$conf['dwoo_cache_dir']."; +} + if( ! isSet($conf['views_dir']) || ! is_readable($conf['views_dir']) ) { $errors[] = "Views directory '${conf['views_dir']}' is not readable.
". "Please adjust \$conf['views_dir']."; diff --git a/functions.php b/functions.php index 5ab54845..1e63ea6b 100644 --- a/functions.php +++ b/functions.php @@ -1282,9 +1282,9 @@ function ganglia_cache_metrics() { } // Set up for cluster summary $context = "index_array"; - include_once $conf['ganglia_dir'] . "/functions.php"; - include_once $conf['ganglia_dir'] . "/ganglia.php"; - include_once $conf['ganglia_dir'] . "/get_ganglia.php"; + include_once $conf['gweb_root'] . "/functions.php"; + include_once $conf['gweb_root'] . "/ganglia.php"; + include_once $conf['gweb_root'] . "/get_ganglia.php"; foreach ( $index_array['cluster'] as $hostname => $elements ) { $hosts[] = $hostname; @@ -1431,7 +1431,7 @@ function retrieve_metrics_cache () { } // Set up for cluster summary $context = "index_array"; - include_once $conf['ganglia_dir'] . "/ganglia.php"; + include_once $conf['gweb_root'] . "/ganglia.php"; Gmetad($conf['ganglia_ip'], $conf['ganglia_port']); foreach ( $index_array['cluster'] as $hostname => $elements ) { diff --git a/ganglia-web/debian/ganglia-webfrontend.install b/ganglia-web/debian/ganglia-webfrontend.install new file mode 100644 index 00000000..46610018 --- /dev/null +++ b/ganglia-web/debian/ganglia-webfrontend.install @@ -0,0 +1,294 @@ +./usr/share/ganglia-webfrontend/node_legend.html +./usr/share/ganglia-webfrontend/cluster_legend.html +./usr/share/ganglia-webfrontend/var/lib/ganglia/conf/view_default.json +./usr/share/ganglia-webfrontend/var/lib/ganglia/conf/default.json +./usr/share/ganglia-webfrontend/var/lib/ganglia/conf/sql/ganglia.mysql +./usr/share/ganglia-webfrontend/decompose_graph.php +./usr/share/ganglia-webfrontend/logout.php +./usr/share/ganglia-webfrontend/get_ganglia.php +./usr/share/ganglia-webfrontend/mobile.php +./usr/share/ganglia-webfrontend/physical_view.php +./usr/share/ganglia-webfrontend/graph.php +./usr/share/ganglia-webfrontend/footer.php +./usr/share/ganglia-webfrontend/login.php +./usr/share/ganglia-webfrontend/graph_all_periods.php +./usr/share/ganglia-webfrontend/js/jquery-1.7.1.min.js +./usr/share/ganglia-webfrontend/js/jquery-ui-1.8.14.custom.min.js +./usr/share/ganglia-webfrontend/js/jquery.gangZoom.js +./usr/share/ganglia-webfrontend/js/excanvas.min.js +./usr/share/ganglia-webfrontend/js/jquery.cookie.js +./usr/share/ganglia-webfrontend/js/jquery.mobile-1.0.min.js +./usr/share/ganglia-webfrontend/js/ganglia.js +./usr/share/ganglia-webfrontend/js/jquery-ui-timepicker-addon.js +./usr/share/ganglia-webfrontend/js/jquery.flot.min.js +./usr/share/ganglia-webfrontend/js/jquery.liveSearch.js +./usr/share/ganglia-webfrontend/js/protovis-r3.2.js +./usr/share/ganglia-webfrontend/js/jquery.flot.crosshair.min.js +./usr/share/ganglia-webfrontend/js/create-flot-graphs.js +./usr/share/ganglia-webfrontend/test/GangliaAclTest.php +./usr/share/ganglia-webfrontend/test/GangliaAuthTest.php +./usr/share/ganglia-webfrontend/compare_hosts.php +./usr/share/ganglia-webfrontend/stacked.php +./usr/share/ganglia-webfrontend/graph.d/varnish_report.php +./usr/share/ganglia-webfrontend/graph.d/apache_report.json +./usr/share/ganglia-webfrontend/graph.d/cpu_report.json +./usr/share/ganglia-webfrontend/graph.d/mem_report.php +./usr/share/ganglia-webfrontend/graph.d/mem_report.json +./usr/share/ganglia-webfrontend/graph.d/load_all_report.json +./usr/share/ganglia-webfrontend/graph.d/cpu_report.php +./usr/share/ganglia-webfrontend/graph.d/metric.php +./usr/share/ganglia-webfrontend/graph.d/load_report.json +./usr/share/ganglia-webfrontend/graph.d/apache_response_report.json +./usr/share/ganglia-webfrontend/graph.d/network_report.json +./usr/share/ganglia-webfrontend/graph.d/sample_report.php +./usr/share/ganglia-webfrontend/graph.d/packet_report.json +./usr/share/ganglia-webfrontend/header.php +./usr/share/ganglia-webfrontend/autorotation.php +./usr/share/ganglia-webfrontend/css/images/form-check-on.png +./usr/share/ganglia-webfrontend/css/images/icons-36-black.png +./usr/share/ganglia-webfrontend/css/images/ajax-loader.png +./usr/share/ganglia-webfrontend/css/images/icons-36-white.png +./usr/share/ganglia-webfrontend/css/images/icon-search-black.png +./usr/share/ganglia-webfrontend/css/images/icons-18-white.png +./usr/share/ganglia-webfrontend/css/images/form-radio-on.png +./usr/share/ganglia-webfrontend/css/images/form-radio-off.png +./usr/share/ganglia-webfrontend/css/images/form-check-off.png +./usr/share/ganglia-webfrontend/css/images/icons-18-black.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-icons_cd0a0a_256x240.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-icons_222222_256x240.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-icons_454545_256x240.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-icons_2e83ff_256x240.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-icons_888888_256x240.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +./usr/share/ganglia-webfrontend/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +./usr/share/ganglia-webfrontend/css/smoothness/jquery-ui-1.8.14.custom.css +./usr/share/ganglia-webfrontend/css/jquery.liveSearch.css +./usr/share/ganglia-webfrontend/css/jquery.mobile-1.0.min.css +./usr/share/ganglia-webfrontend/ganglia.php +./usr/share/ganglia-webfrontend/actions.php +./usr/share/ganglia-webfrontend/mobile_helper.php +./usr/share/ganglia-webfrontend/functions.php +./usr/share/ganglia-webfrontend/edit_optional_graphs.php +./usr/share/ganglia-webfrontend/inspect_graph.php +./usr/share/ganglia-webfrontend/templates/default/images/grid_75-100.jpg +./usr/share/ganglia-webfrontend/templates/default/images/cluster_75-100.jpg +./usr/share/ganglia-webfrontend/templates/default/images/node_75-100.jpg +./usr/share/ganglia-webfrontend/templates/default/images/node_25-49.jpg +./usr/share/ganglia-webfrontend/templates/default/images/cluster_0-24.jpg +./usr/share/ganglia-webfrontend/templates/default/images/grid_0-24.jpg +./usr/share/ganglia-webfrontend/templates/default/images/node_50-74.jpg +./usr/share/ganglia-webfrontend/templates/default/images/grid_private.jpg +./usr/share/ganglia-webfrontend/templates/default/images/grid_overloaded.jpg +./usr/share/ganglia-webfrontend/templates/default/images/cluster_25-49.jpg +./usr/share/ganglia-webfrontend/templates/default/images/cluster_overloaded.jpg +./usr/share/ganglia-webfrontend/templates/default/images/node_overloaded.jpg +./usr/share/ganglia-webfrontend/templates/default/images/node_dead.jpg +./usr/share/ganglia-webfrontend/templates/default/images/cluster_50-74.jpg +./usr/share/ganglia-webfrontend/templates/default/images/grid_25-49.jpg +./usr/share/ganglia-webfrontend/templates/default/images/cluster_private.jpg +./usr/share/ganglia-webfrontend/templates/default/images/node_0-24.jpg +./usr/share/ganglia-webfrontend/templates/default/images/grid_50-74.jpg +./usr/share/ganglia-webfrontend/templates/default/images/logo.jpg +./usr/share/ganglia-webfrontend/templates/default/grid_tree.tpl +./usr/share/ganglia-webfrontend/templates/default/host_extra.tpl +./usr/share/ganglia-webfrontend/templates/default/physical_view.tpl +./usr/share/ganglia-webfrontend/templates/default/header-nobanner.tpl +./usr/share/ganglia-webfrontend/templates/default/show_node.tpl +./usr/share/ganglia-webfrontend/templates/default/decompose_graph.tpl +./usr/share/ganglia-webfrontend/templates/default/header.tpl +./usr/share/ganglia-webfrontend/templates/default/compare_hosts.tpl +./usr/share/ganglia-webfrontend/templates/default/meta_view.tpl +./usr/share/ganglia-webfrontend/templates/default/footer.tpl +./usr/share/ganglia-webfrontend/templates/default/views_view.tpl +./usr/share/ganglia-webfrontend/templates/default/cluster_view.tpl +./usr/share/ganglia-webfrontend/templates/default/node_extra.tpl +./usr/share/ganglia-webfrontend/templates/default/cluster_extra.tpl +./usr/share/ganglia-webfrontend/templates/default/host_view.tpl +./usr/share/ganglia-webfrontend/api/.htaccess +./usr/share/ganglia-webfrontend/api/rundeck.php +./usr/share/ganglia-webfrontend/api/search.php +./usr/share/ganglia-webfrontend/api/views.php +./usr/share/ganglia-webfrontend/api/events.php +./usr/share/ganglia-webfrontend/show_node.php +./usr/share/ganglia-webfrontend/index.php +./usr/share/ganglia-webfrontend/dash/js/jquery-1.7.1.min.js +./usr/share/ganglia-webfrontend/dash/js/jquery-ui-1.8.14.custom.min.js +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-icons_cd0a0a_256x240.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-icons_222222_256x240.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-icons_454545_256x240.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-icons_2e83ff_256x240.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-icons_888888_256x240.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +./usr/share/ganglia-webfrontend/dash/css/smoothness/jquery-ui-1.8.14.custom.css +./usr/share/ganglia-webfrontend/dash/css/dash.css +./usr/share/ganglia-webfrontend/dash/index.html +./usr/share/ganglia-webfrontend/dash/img/ajax-loader.gif +./usr/share/ganglia-webfrontend/host_view.php +./usr/share/ganglia-webfrontend/version.php +./usr/share/ganglia-webfrontend/cluster_view.php +./usr/share/ganglia-webfrontend/tattle_autocomplete.php +./usr/share/ganglia-webfrontend/meta_view.php +./usr/share/ganglia-webfrontend/eval_conf.php +./usr/share/ganglia-webfrontend/dwoo/dwooAutoload.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/helper.array.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/extends.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/isset.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/cycle.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/wordwrap.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/counter.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/dump.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/date_format.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/mailto.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/count_paragraphs.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/load_templates.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/cat.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/assign.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/count_characters.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/string_format.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/include.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/eval.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/truncate.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/return.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/spacify.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/default.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/fetch.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/whitespace.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/count_sentences.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/regex_replace.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/reverse.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/capitalize.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/escape.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/indent.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/safe.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/nl2br.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/optional.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/tif.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/replace.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/lower.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/eol.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/count_words.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/extendsCheck.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/math.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/strip_tags.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/functions/upper.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/template.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/for.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/foreach.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/section.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/topLevelBlock.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/if.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/dynamic.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/elseif.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/else.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/capture.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/loop.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/foreachelse.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/block.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/smartyinterface.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/withelse.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/a.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/auto_escape.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/forelse.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/with.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/strip.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/blocks/textformat.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/processors/pre.smarty_compat.php +./usr/share/ganglia-webfrontend/dwoo/plugins/builtin/filters/html_format.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo.compiled.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Loader.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Core.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/ITemplate.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Template/String.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Template/File.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/IDataProvider.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/ICompilable/Block.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CodeIgniter/README +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CodeIgniter/controllers/dwoowelcome.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CakePHP/README +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/CakePHP/dwoo.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/Agavi/README +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/ZendFramework/README +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/ZendFramework/View.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Adapters/ZendFramework/Dwoo.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/IElseable.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Exception.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Plugin.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Filter.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/ILoader.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Security/Policy.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Security/Exception.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Data.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Block/Plugin.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Smarty/Adapter.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/ICompiler.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Compiler.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Processor.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/Compilation/Exception.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/ICompilable.php +./usr/share/ganglia-webfrontend/dwoo/Dwoo/IPluginProxy.php +./usr/share/ganglia-webfrontend/conf_default.php +./usr/share/ganglia-webfrontend/gweb.spec +./usr/share/ganglia-webfrontend/calendar.php +./usr/share/ganglia-webfrontend/search.php +./usr/share/ganglia-webfrontend/styles.css +./usr/share/ganglia-webfrontend/views.php +./usr/share/ganglia-webfrontend/conf/view_default.json +./usr/share/ganglia-webfrontend/conf/default.json +./usr/share/ganglia-webfrontend/conf/sql/ganglia.mysql +./usr/share/ganglia-webfrontend/grid_tree.php +./usr/share/ganglia-webfrontend/nagios/check_metric.php +./usr/share/ganglia-webfrontend/nagios/check_heartbeat.sh +./usr/share/ganglia-webfrontend/nagios/check_multiple_metrics.php +./usr/share/ganglia-webfrontend/nagios/check_heartbeat.php +./usr/share/ganglia-webfrontend/nagios/check_host_regex.sh +./usr/share/ganglia-webfrontend/nagios/check_host_regex.php +./usr/share/ganglia-webfrontend/nagios/check_multiple_metrics.sh +./usr/share/ganglia-webfrontend/nagios/check_ganglia_metric.sh +./usr/share/ganglia-webfrontend/aggregate_graphs.php +./usr/share/ganglia-webfrontend/pie.php +./usr/share/ganglia-webfrontend/get_context.php +./usr/share/ganglia-webfrontend/views_view.php +./usr/share/ganglia-webfrontend/events.php +./usr/share/ganglia-webfrontend/img/calendar.gif +./usr/share/ganglia-webfrontend/img/spinner.gif +./usr/share/ganglia-webfrontend/img/access-denied.jpg +./usr/share/ganglia-webfrontend/lib/cache.php +./usr/share/ganglia-webfrontend/lib/json.php +./usr/share/ganglia-webfrontend/lib/Zend/Exception.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Assert/Interface.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Role.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Exception.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Role/Registry.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Role/Interface.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Role/Registry/Exception.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Resource/Interface.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl/Resource.php +./usr/share/ganglia-webfrontend/lib/Zend/Acl.php +./usr/share/ganglia-webfrontend/lib/common_api.php +./usr/share/ganglia-webfrontend/lib/Services/JSON.php +./usr/share/ganglia-webfrontend/lib/GangliaAcl.php +./usr/share/ganglia-webfrontend/lib/Events/Driver_Json.php +./usr/share/ganglia-webfrontend/lib/Events/Driver_Mdb2.php +./usr/share/ganglia-webfrontend/lib/GangliaAuth.php diff --git a/ganglia.php b/ganglia.php index 071b15d4..8c453055 100644 --- a/ganglia.php +++ b/ganglia.php @@ -9,9 +9,9 @@ # information as we need to make the page. # -$ganglia_dir = dirname(__FILE__); +$gweb_root = dirname(__FILE__); -include_once($ganglia_dir . "/version.php"); +include_once($gweb_root . "/version.php"); $error=""; diff --git a/graph.php b/graph.php index 0ccefd46..05eff49d 100644 --- a/graph.php +++ b/graph.php @@ -4,7 +4,7 @@ include_once "./get_context.php"; include_once "./functions.php"; -$ganglia_dir = dirname(__FILE__); +$gweb_root = dirname(__FILE__); # RFM - Added all the isset() tests to eliminate "undefined index" # messages in ssl_error_log. @@ -127,7 +127,7 @@ if( ! checkAccess( $resource, GangliaAcl::VIEW, $conf ) ) { header( "HTTP/1.1 403 Access Denied" ); header ("Content-type: image/jpg"); - echo file_get_contents( $ganglia_dir.'/img/access-denied.jpg'); + echo file_get_contents( $gweb_root.'/img/access-denied.jpg'); die(); } @@ -419,7 +419,7 @@ $report_name = sanitize($_GET['g']); - $report_definition_file = $conf['ganglia_dir'] . "/graph.d/" . $report_name . ".json"; + $report_definition_file = $conf['gweb_root'] . "/graph.d/" . $report_name . ".json"; // Check whether report is defined in graph.d directory if ( is_file($report_definition_file) ) { $graph_config = json_decode(file_get_contents($report_definition_file), TRUE); diff --git a/index.php b/index.php index c3a9b195..0b9a64b1 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,7 @@ try { - $dwoo = new Dwoo($conf['dwoo_compiled_dir']); + $dwoo = new Dwoo($conf['dwoo_compiled_dir'], $conf['dwoo_cache_dir']); } catch (Exception $e) { diff --git a/lib/Events/Driver_Json.php b/lib/Events/Driver_Json.php index 7bfc2913..c7af56e6 100644 --- a/lib/Events/Driver_Json.php +++ b/lib/Events/Driver_Json.php @@ -1,9 +1,9 @@ $elements ) { $hosts[] = $hostname; diff --git a/lib/common_api.php b/lib/common_api.php index a8c3c186..b7977e18 100644 --- a/lib/common_api.php +++ b/lib/common_api.php @@ -1,6 +1,6 @@ $host_metrics ) { diff --git a/nagios/check_host_regex.php b/nagios/check_host_regex.php index 54005db4..27152a62 100644 --- a/nagios/check_host_regex.php +++ b/nagios/check_host_regex.php @@ -21,9 +21,9 @@ # ?hreg=apache\tomcat&checks=disk_rootfs,more,10:disk_tmp,more,20 # ########################################################################################## -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; # To turn on debug set to 1 $debug = 0; @@ -56,9 +56,9 @@ error_log("DEBUG: Querying GMond for new data\n"); } $context = "cluster"; - include_once $conf['ganglia_dir'] . "/functions.php"; - include_once $conf['ganglia_dir'] . "/ganglia.php"; - include_once $conf['ganglia_dir'] . "/get_ganglia.php"; + include_once $conf['gweb_root'] . "/functions.php"; + include_once $conf['gweb_root'] . "/ganglia.php"; + include_once $conf['gweb_root'] . "/get_ganglia.php"; # Massage the metrics to minimize the cache file by caching only attributes # we care about foreach ( $metrics as $host => $host_metrics ) { diff --git a/nagios/check_metric.php b/nagios/check_metric.php index 5cad2841..2f98e6b8 100644 --- a/nagios/check_metric.php +++ b/nagios/check_metric.php @@ -11,9 +11,9 @@ # operator for critical condition e.g. less, more, equal, notequal # critical_value e.g. value for critical ########################################################################################## -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; # To turn on debug set to 1 $debug = 0; @@ -47,9 +47,9 @@ error_log("DEBUG: Querying GMond for new data\n"); } $context = "cluster"; - include_once $conf['ganglia_dir'] . "/functions.php"; - include_once $conf['ganglia_dir'] . "/ganglia.php"; - include_once $conf['ganglia_dir'] . "/get_ganglia.php"; + include_once $conf['gweb_root'] . "/functions.php"; + include_once $conf['gweb_root'] . "/ganglia.php"; + include_once $conf['gweb_root'] . "/get_ganglia.php"; # Massage the metrics to minimize the cache file by caching only attributes # we care about foreach ( $metrics as $host => $host_metrics ) { diff --git a/nagios/check_multiple_metrics.php b/nagios/check_multiple_metrics.php index 4ea4e116..56098339 100644 --- a/nagios/check_multiple_metrics.php +++ b/nagios/check_multiple_metrics.php @@ -21,9 +21,9 @@ # ?host=mytestserver.com&checks=disk_rootfs,more,10:disk_tmp,more,20 # ########################################################################################## -$conf['ganglia_dir'] = dirname(dirname(__FILE__)); +$conf['gweb_root'] = dirname(dirname(__FILE__)); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; # To turn on debug set to 1 $debug = 0; @@ -56,9 +56,9 @@ error_log("DEBUG: Querying GMond for new data\n"); } $context = "cluster"; - include_once $conf['ganglia_dir'] . "/functions.php"; - include_once $conf['ganglia_dir'] . "/ganglia.php"; - include_once $conf['ganglia_dir'] . "/get_ganglia.php"; + include_once $conf['gweb_root'] . "/functions.php"; + include_once $conf['gweb_root'] . "/ganglia.php"; + include_once $conf['gweb_root'] . "/get_ganglia.php"; # Massage the metrics to minimize the cache file by caching only attributes # we care about foreach ( $metrics as $host => $host_metrics ) { diff --git a/stacked.php b/stacked.php index 1d0449cb..a817a690 100644 --- a/stacked.php +++ b/stacked.php @@ -4,10 +4,10 @@ // Authors: Cal Henderson and Gilad Raphaelli ////////////////////////////////////////////////////////////////////////////// -$conf['ganglia_dir'] = dirname(__FILE__); +$conf['gweb_root'] = dirname(__FILE__); -include_once $conf['ganglia_dir'] . "/eval_conf.php"; -include_once $conf['ganglia_dir'] . "/functions.php"; +include_once $conf['gweb_root'] . "/eval_conf.php"; +include_once $conf['gweb_root'] . "/functions.php"; $clustername = $_GET['c']; $metricname = $_GET['m'];