├── conf ├── events.json ├── event_color.json ├── view_default.json ├── default.json └── sql │ ├── ganglia.mysql │ └── ganglia.sqlite ├── debian ├── compat ├── source │ └── format ├── docs ├── po │ ├── POTFILES.in │ ├── templates.pot │ ├── ja.po │ ├── et.po │ ├── vi.po │ ├── fi.po │ ├── gl.po │ ├── da.po │ ├── de.po │ ├── it.po │ ├── pt.po │ ├── sv.po │ ├── eu.po │ ├── ru.po │ └── fr.po ├── conf_debian.php ├── ganglia-webfrontend.dirs ├── apache.conf ├── ganglia-webfrontend.config ├── copyright ├── control ├── ganglia-webfrontend.templates ├── rules ├── ganglia-webfrontend.postrm └── ganglia-webfrontend.postinst ├── img ├── spin.gif ├── spinner.gif ├── calendar.gif ├── spin-night.gif ├── red-pointer.png ├── toggle-night.png ├── access-denied.jpg └── toggle-number.png ├── templates └── default │ ├── node_extra.tpl │ ├── cluster_extra.tpl │ ├── host_extra.tpl │ ├── images │ ├── logo.jpg │ ├── grid_0-24.jpg │ ├── node_0-24.jpg │ ├── node_dead.jpg │ ├── grid_25-49.jpg │ ├── grid_50-74.jpg │ ├── grid_75-100.jpg │ ├── node_25-49.jpg │ ├── node_50-74.jpg │ ├── node_75-100.jpg │ ├── cluster_0-24.jpg │ ├── cluster_25-49.jpg │ ├── cluster_50-74.jpg │ ├── cluster_75-100.jpg │ ├── grid_private.jpg │ ├── cluster_private.jpg │ ├── grid_overloaded.jpg │ ├── node_overloaded.jpg │ └── cluster_overloaded.jpg │ ├── cluster_refresh.tpl │ ├── cluster_overview.tpl │ ├── header-nobanner.tpl │ ├── host_overview.tpl │ ├── grid_tree.tpl │ ├── decompose_graph.tpl │ └── physical_view.tpl ├── .gitignore ├── css ├── chosen-sprite.png ├── chosen-sprite@2x.png ├── images │ ├── ajax-loader.png │ ├── form-check-on.png │ ├── form-radio-on.png │ ├── form-check-off.png │ ├── form-radio-off.png │ ├── icons-18-black.png │ ├── icons-18-white.png │ ├── icons-36-black.png │ ├── icons-36-white.png │ └── icon-search-black.png ├── smoothness │ └── images │ │ ├── animated-overlay.gif │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png ├── jquery.flot.events.css ├── jquery.liveSearch.css └── jquery.multiselect.css ├── version.php.in ├── api ├── .htaccess ├── search.php └── rundeck.php ├── AUTHORS ├── README ├── apache.conf.in ├── graph.d ├── apache_response_report.json ├── disk_report.json ├── io_report.json ├── network_report.json ├── packet_report.json ├── cpu_report.json ├── moab_jobs_report.json ├── moab_cores_report.json ├── moab_nodes_report.json ├── load_all_report.json ├── apache_report.json ├── load_report.json ├── mem_report.json └── nfs_v3_client_report.json ├── get_overlay_events.php ├── global.php ├── logout.php ├── nagios ├── warmup_ganglia_cache.php ├── warmup_metric_cache.sh ├── check_for_stuck_gmonds.sh ├── check_heartbeat.sh ├── check_value_same_everywhere.sh ├── check_multiple_metrics.sh ├── warmup_metric_cache.php ├── check_multiple_metrics_warn.sh ├── check_metric_regex.sh ├── check_host_regex.sh └── check_ganglia_metric.sh ├── test └── TestCase.php ├── dwoo ├── dwooAutoload.php ├── Dwoo │ ├── Adapters │ │ ├── CodeIgniter │ │ │ ├── controllers │ │ │ │ └── dwoowelcome.php │ │ │ ├── config │ │ │ │ └── dwootemplate.php │ │ │ ├── views │ │ │ │ ├── page.tpl │ │ │ │ └── dwoowelcome.tpl │ │ │ └── README │ │ ├── Agavi │ │ │ ├── dwoo_plugins │ │ │ │ ├── t.php │ │ │ │ └── url.php │ │ │ └── README │ │ ├── CakePHP │ │ │ └── README │ │ └── ZendFramework │ │ │ ├── Dwoo.php │ │ │ └── README │ ├── Exception.php │ ├── Security │ │ └── Exception.php │ ├── ICompilable │ │ └── Block.php │ ├── IDataProvider.php │ ├── IElseable.php │ ├── ICompilable.php │ ├── ILoader.php │ ├── Compilation │ │ └── Exception.php │ ├── Filter.php │ ├── Processor.php │ └── ICompiler.php ├── Dwoo.php ├── plugins │ └── builtin │ │ ├── functions │ │ ├── eol.php │ │ ├── isset.php │ │ ├── nl2br.php │ │ ├── optional.php │ │ ├── upper.php │ │ ├── lower.php │ │ ├── count_paragraphs.php │ │ ├── count_sentences.php │ │ ├── cat.php │ │ ├── assign.php │ │ ├── count_words.php │ │ ├── string_format.php │ │ ├── default.php │ │ ├── spacify.php │ │ ├── safe.php │ │ ├── strip_tags.php │ │ ├── indent.php │ │ ├── count_characters.php │ │ ├── wordwrap.php │ │ ├── replace.php │ │ ├── whitespace.php │ │ ├── reverse.php │ │ ├── capitalize.php │ │ ├── return.php │ │ ├── eval.php │ │ ├── regex_replace.php │ │ ├── truncate.php │ │ ├── fetch.php │ │ ├── date_format.php │ │ └── extendsCheck.php │ │ ├── blocks │ │ ├── block.php │ │ ├── topLevelBlock.php │ │ ├── forelse.php │ │ ├── withelse.php │ │ ├── foreachelse.php │ │ ├── strip.php │ │ ├── auto_escape.php │ │ └── elseif.php │ │ └── helper.array.php └── LICENSE ├── lib ├── json.php ├── common_api.php ├── Zend │ └── Acl │ │ ├── Exception.php │ │ ├── Role │ │ ├── Registry │ │ │ └── Exception.php │ │ └── Interface.php │ │ ├── Resource │ │ └── Interface.php │ │ ├── Role.php │ │ └── Resource.php ├── cache.php ├── Cache │ ├── Driver_Memcache.php │ └── Driver_Json.php └── GangliaAcl.php ├── .travis.yml ├── tattle_autocomplete.php ├── footer.php ├── host_overview.php ├── login.php ├── breakdown_report_results.php ├── cluster_legend.html ├── node_legend.html ├── get_ganglia.php ├── COPYING ├── js ├── jquery.livesearch.js ├── jquery.multiselect.filter.css └── jquery.livesearch.min.js ├── docs └── ad-hoc-views.mdown ├── TODO ├── grid_tree.php └── breakdown_reports.php /conf/events.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /conf/event_color.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | AUTHORS 2 | COPYING 3 | README 4 | TODO 5 | -------------------------------------------------------------------------------- /debian/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [type: gettext/rfc822deb] ganglia-webfrontend.templates 2 | -------------------------------------------------------------------------------- /img/spin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/spin.gif -------------------------------------------------------------------------------- /conf/view_default.json: -------------------------------------------------------------------------------- 1 | {"view_name":"default","items":[],"view_type":"standard"} 2 | -------------------------------------------------------------------------------- /img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/spinner.gif -------------------------------------------------------------------------------- /img/calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/calendar.gif -------------------------------------------------------------------------------- /img/spin-night.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/spin-night.gif -------------------------------------------------------------------------------- /templates/default/node_extra.tpl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | conf.php 2 | conf_default.php 3 | ganglia-web.spec 4 | version.php 5 | apache.conf 6 | -------------------------------------------------------------------------------- /img/red-pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/red-pointer.png -------------------------------------------------------------------------------- /img/toggle-night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/toggle-night.png -------------------------------------------------------------------------------- /templates/default/cluster_extra.tpl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/chosen-sprite.png -------------------------------------------------------------------------------- /img/access-denied.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/access-denied.jpg -------------------------------------------------------------------------------- /img/toggle-number.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/img/toggle-number.png -------------------------------------------------------------------------------- /css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /conf/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "included_reports": ["load_report","mem_report","cpu_report","network_report"] 3 | } 4 | -------------------------------------------------------------------------------- /css/images/ajax-loader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/ajax-loader.png -------------------------------------------------------------------------------- /css/images/form-check-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/form-check-on.png -------------------------------------------------------------------------------- /css/images/form-radio-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/form-radio-on.png -------------------------------------------------------------------------------- /css/images/form-check-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/form-check-off.png -------------------------------------------------------------------------------- /css/images/form-radio-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/form-radio-off.png -------------------------------------------------------------------------------- /css/images/icons-18-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/icons-18-black.png -------------------------------------------------------------------------------- /css/images/icons-18-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/icons-18-white.png -------------------------------------------------------------------------------- /css/images/icons-36-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/icons-36-black.png -------------------------------------------------------------------------------- /css/images/icons-36-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/icons-36-white.png -------------------------------------------------------------------------------- /templates/default/host_extra.tpl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /css/images/icon-search-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/images/icon-search-black.png -------------------------------------------------------------------------------- /templates/default/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/logo.jpg -------------------------------------------------------------------------------- /version.php.in: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /templates/default/images/grid_0-24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/grid_0-24.jpg -------------------------------------------------------------------------------- /templates/default/images/node_0-24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/node_0-24.jpg -------------------------------------------------------------------------------- /templates/default/images/node_dead.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/node_dead.jpg -------------------------------------------------------------------------------- /templates/default/images/grid_25-49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/grid_25-49.jpg -------------------------------------------------------------------------------- /templates/default/images/grid_50-74.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/grid_50-74.jpg -------------------------------------------------------------------------------- /templates/default/images/grid_75-100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/grid_75-100.jpg -------------------------------------------------------------------------------- /templates/default/images/node_25-49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/node_25-49.jpg -------------------------------------------------------------------------------- /templates/default/images/node_50-74.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/node_50-74.jpg -------------------------------------------------------------------------------- /templates/default/images/node_75-100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/node_75-100.jpg -------------------------------------------------------------------------------- /css/smoothness/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/animated-overlay.gif -------------------------------------------------------------------------------- /templates/default/images/cluster_0-24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/cluster_0-24.jpg -------------------------------------------------------------------------------- /templates/default/images/cluster_25-49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/cluster_25-49.jpg -------------------------------------------------------------------------------- /templates/default/images/cluster_50-74.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/cluster_50-74.jpg -------------------------------------------------------------------------------- /templates/default/images/cluster_75-100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/cluster_75-100.jpg -------------------------------------------------------------------------------- /templates/default/images/grid_private.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/grid_private.jpg -------------------------------------------------------------------------------- /templates/default/images/cluster_private.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/cluster_private.jpg -------------------------------------------------------------------------------- /templates/default/images/grid_overloaded.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/grid_overloaded.jpg -------------------------------------------------------------------------------- /templates/default/images/node_overloaded.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/node_overloaded.jpg -------------------------------------------------------------------------------- /api/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine on 2 | RewriteCond %{REQUEST_FILENAME} !-d 3 | RewriteCond %{REQUEST_FILENAME}\.php -f 4 | RewriteRule ^(.*)$ $1.php 5 | -------------------------------------------------------------------------------- /templates/default/images/cluster_overloaded.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/templates/default/images/cluster_overloaded.jpg -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /debian/conf_debian.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Federico Sacerdoti 2 | Matt Massie 3 | Vladimir Vuksan 4 | Jeff Buchbinder 5 | Dave Rawks 6 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is an attempt to make the Ganglia UI more usable. Installation instructions 2 | can be found here 3 | 4 | https://github.com/ganglia/ganglia-web/wiki#Installation 5 | -------------------------------------------------------------------------------- /css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/ganglia-web/master/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /apache.conf.in: -------------------------------------------------------------------------------- 1 | Alias /ganglia @GDESTDIR@ 2 | 3 | 4 | AllowOverride All 5 | Order allow,deny 6 | Allow from all 7 | Deny from none 8 | 9 | 10 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.dirs: -------------------------------------------------------------------------------- 1 | etc/ganglia-webfrontend 2 | usr/share/ganglia-webfrontend 3 | var/lib/ganglia-web/dwoo 4 | var/lib/ganglia-web/dwoo/compiled 5 | var/lib/ganglia-web/dwoo/cache 6 | -------------------------------------------------------------------------------- /debian/apache.conf: -------------------------------------------------------------------------------- 1 | Alias /ganglia /usr/share/ganglia-webfrontend 2 | 3 | 4 | AllowOverride All 5 | Order allow,deny 6 | Allow from all 7 | Deny from none 8 | 9 | 10 | -------------------------------------------------------------------------------- /graph.d/apache_response_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "apache_response_report", 3 | "report_type" : "template", 4 | "report_arguments" : "target=HOST_CLUSTER.apache_90th_dur.sum&target=HOST_CLUSTER.apache_avg_dur.sum" 5 | } 6 | -------------------------------------------------------------------------------- /get_overlay_events.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /global.php: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | destroyAuthCookie(); 6 | $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : 'index.php'; 7 | header("Location: $redirect_to"); 8 | ?> 9 | -------------------------------------------------------------------------------- /graph.d/disk_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "disk_report", 3 | "report_type" : "template", 4 | "title" : "Disk Report", 5 | "graphite" : "target=alias(scale(diffSeries(HOST_CLUSTER.disk_total.sum,HOST_CLUSTER.disk_free.sum),1073741824),'Used')&areaMode=stacked&colorList=5555cc" 6 | } 7 | -------------------------------------------------------------------------------- /templates/default/cluster_refresh.tpl: -------------------------------------------------------------------------------- 1 | {$localtimestamp}Overview of {$cluster} @ {$localtime}{include('cluster_overview.tpl')}{if $pie_args}./pie.php?{$pie_args}{/if}{if $heatmap_data && $overview.num_nodes > 0}{$heatmap_data}{/if}{include('cluster_host_metric_graphs.tpl')} 2 | -------------------------------------------------------------------------------- /nagios/warmup_ganglia_cache.php: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /test/TestCase.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /conf/sql/ganglia.mysql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE IF NOT EXISTS overlay_events ( 3 | `event_id` SERIAL 4 | , `description` VARCHAR(250) 5 | , `summary` VARCHAR(250) 6 | , `grid` VARCHAR(100) 7 | , `cluster` VARCHAR(100) 8 | , `host_regex` VARCHAR(100) 9 | , `start_time` BIGINT DEFAULT NULL 10 | , `end_time` BIGINT DEFAULT NULL 11 | ); 12 | 13 | -------------------------------------------------------------------------------- /dwoo/dwooAutoload.php: -------------------------------------------------------------------------------- 1 | load->library('Dwootemplate'); 13 | $this->dwootemplate->assign('itshowlate', date('H:i:s')); 14 | $this->dwootemplate->display('dwoowelcome.tpl'); 15 | } 16 | } -------------------------------------------------------------------------------- /css/jquery.liveSearch.css: -------------------------------------------------------------------------------- 1 | #jquery-live-search { 2 | background: #fff; 3 | 4 | padding: 5px 10px; 5 | max-height: 400px; 6 | overflow: auto; 7 | 8 | position: absolute; 9 | z-index: 99; 10 | 11 | border: 1px solid #A9A9A9; 12 | border-width: 0 1px 1px 1px; 13 | 14 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3); 15 | -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3); 16 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3); 17 | } 18 | -------------------------------------------------------------------------------- /conf/sql/ganglia.sqlite: -------------------------------------------------------------------------------- 1 | PRAGMA legacy_file_format=TRUE; 2 | PRAGMA foreign_keys=OFF; 3 | 4 | CREATE TABLE IF NOT EXISTS overlay_events ( 5 | `event_id` INTEGER PRIMARY KEY AUTOINCREMENT 6 | , `description` VARCHAR(250) 7 | , `summary` VARCHAR(250) 8 | , `grid` VARCHAR(100) 9 | , `cluster` VARCHAR(100) 10 | , `host_regex` VARCHAR(100) 11 | , `start_time` BIGINT DEFAULT NULL 12 | , `end_time` BIGINT DEFAULT NULL 13 | ); 14 | 15 | -------------------------------------------------------------------------------- /graph.d/cpu_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "cpu_report", 3 | "report_type" : "template", 4 | "title" : "CPU Report", 5 | "graphite" : "target=alias(HOST_CLUSTER.cpu_user.sum,'User')&target=alias(HOST_CLUSTER.cpu_nice.sum%2C'Nice')&target=alias(HOST_CLUSTER.cpu_system.sum,'System')&target=alias(HOST_CLUSTER.cpu_wio.sum,'Wait')&target=alias(HOST_CLUSTER.cpu_idle.sum%2C'Idle')&areaMode=stacked&max=100&colorList=3333bb,ffea00,dd0000,ff8a60,e2e2f2" 6 | } 7 | -------------------------------------------------------------------------------- /lib/json.php: -------------------------------------------------------------------------------- 1 | encode( $s ); 12 | } 13 | 14 | function json_decode( $s ) { 15 | $j = new Services_JSON( SERVICES_JSON_LOOSE_TYPE ); 16 | return $j->decode( $s ); 17 | } 18 | 19 | } 20 | 21 | ?> 22 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.config: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | action=$1 6 | version=$2 7 | 8 | # Source debconf library. 9 | . /usr/share/debconf/confmodule 10 | db_version 2.0 || [ 0 -lt 30 ] 11 | 12 | db_input medium ganglia-webfrontend/webserver || true 13 | db_go 14 | db_reset ganglia-webfrontend/restart || true 15 | db_subst ganglia-webfrontend/restart webserver "$webserver" 16 | db_input high ganglia-webfrontend/restart || true 17 | db_go 18 | 19 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Preston Smith on 2 | Tue, 16 Apr 2002 22:55:55 -0500. 3 | 4 | It was downloaded from http://www.ganglia.info 5 | 6 | Upstream Author: Matt Massie 7 | 8 | Copyright: 9 | 10 | Copyright (c) 2001 by Matt Massie and The Regents of the University of California 11 | . 12 | All rights reserved. 13 | 14 | On Debian GNU/Linux systems, the text of the BSD License can be found in 15 | /usr/share/common-licenses/BSD. 16 | -------------------------------------------------------------------------------- /graph.d/moab_jobs_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "moab_jobs_report", 3 | "report_type" : "standard", 4 | "title" : "Moab Jobs", 5 | "vertical_label" : "Jobs", 6 | "series" : [ 7 | { "metric": "moab_running_jobs", "color": "0000FF", "label": "Running", "type": "stack"}, 8 | { "metric": "moab_eligible_jobs", "color": "00FF00", "label": "Eligible", "type": "stack"}, 9 | { "metric": "moab_blocked_jobs", "color": "FF0000", "label": "Blocked", "type": "stack"} 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /graph.d/moab_cores_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "moab_cores_report", 3 | "report_type" : "standard", 4 | "title" : "Moab Core Utilization", 5 | "vertical_label" : "Cores", 6 | "series" : [ 7 | { "metric": "moab_allocated_cores", "color": "0000FF", "label": "In use", "type": "stack"}, 8 | { "metric": "moab_idle_cores", "color": "E2E2F2", "label": "Idle", "type": "stack"}, 9 | { "metric": "moab_up_cores", "color": "FF0000", "label": "Up", "type": "line", "line_width": "2"} 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /graph.d/moab_nodes_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "moab_nodes_report", 3 | "report_type" : "standard", 4 | "title" : "Moab Node Utilization", 5 | "vertical_label" : "Nodes", 6 | "series" : [ 7 | { "metric": "moab_allocated_nodes", "color": "0000FF", "label": "In use", "type": "stack"}, 8 | { "metric": "moab_idle_nodes", "color": "E2E2F2", "label": "Idle", "type": "stack"}, 9 | { "metric": "moab_up_nodes", "color": "FF0000", "label": "Up", "type": "line", "line_width": "2"} 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /graph.d/load_all_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "load_all_report", 3 | "report_type" : "standard", 4 | "title" : "Load All Report", 5 | "vertical_label" : "load", 6 | "series" : [ 7 | { "metric": "load_one", "color": "3333bb", "label": "Load 1", "line_width": "2", "type": "line" }, 8 | { "metric": "load_five", "color": "ffea00", "label": "Load 5", "line_width": "2", "type": "line" }, 9 | { "metric": "load_fifteen", "color": "dd0000", "label": "Load 15", "line_width": "2", "type": "line" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | sudo: false 3 | matrix: 4 | include: 5 | - php: '5.3' 6 | dist: precise 7 | - php: '5.4' 8 | - php: '5.5' 9 | - php: '5.6' 10 | - php: '7.0' 11 | - php: '7.1' 12 | - php: '7.2' 13 | - php: nightly 14 | before_script: 15 | - phpenv rehash 16 | - export PATH=$PATH:`composer config bin-dir --absolute` 17 | install: 18 | - composer self-update 19 | - composer require squizlabs/php_codesniffer 20 | - composer install 21 | script: 22 | - make sniff || echo "Completed - Returned $?" 23 | - make test 24 | -------------------------------------------------------------------------------- /nagios/warmup_metric_cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ################################################################# 4 | # This script will warmup the cache periodically (specified 5 | # by SLEEP_TIME). This is useful if you have lots of Nagios 6 | # checks 7 | ################################################################# 8 | SLEEP_TIME=11 9 | WEB_USER="www-data" 10 | 11 | SCRIPT_HOME=${0%/*} 12 | 13 | # Go into an infinite loop 14 | while [ 1 ]; do 15 | 16 | echo "Metric cache - "`date` 17 | sudo -u $WEB_USER php $SCRIPT_HOME/warmup_metric_cache.php 18 | sleep $SLEEP_TIME 19 | 20 | done 21 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | class Dwoo_Exception extends Exception 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /graph.d/apache_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "apache_report", 3 | "report_type" : "standard", 4 | "title" : "Apache HTTP codes", 5 | "vertical_label" : "req/sec", 6 | "series" : [ 7 | { "metric": "apache_200", "color": "3333bb", "label": "200", "line_width": "2", "type": "stack" }, 8 | { "metric": "apache_300", "color": "ffea00", "label": "300", "line_width": "2", "type": "stack" }, 9 | { "metric": "apache_400", "color": "dd0000", "label": "400", "line_width": "2", "type": "stack" }, 10 | { "metric": "apache_500", "color": "ff8a60", "label": "500", "line_width": "2", "type": "stack" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /templates/default/cluster_overview.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
CPUs Total:{$overview.cpu_num}
Hosts up:{$overview.num_nodes}
Hosts down:{$overview.num_dead_nodes}
 
Current Load Avg (15, 5, 1m):
  {$overview.cluster_load}
Avg Utilization (last {$overview.range}):
  {$overview.cluster_util}
9 | -------------------------------------------------------------------------------- /graph.d/load_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "load_report", 3 | "report_type" : "standard", 4 | "title" : "Load", 5 | "vertical_label" : "Loads/Procs", 6 | "series" : [ 7 | { "metric": "load_one", "color": "BBBBBB", "label": "1-min", "type": "stack" }, 8 | { "metric": "cpu_num", "color": "00FF00", "label": "Nodes", "line_width": "2", "type": "line", "ds": "num", "contexts": [ "cluster", "meta" ] }, 9 | { "metric": "cpu_num", "color": "FF0000", "label": "CPUs", "line_width": "2", "type": "line" }, 10 | { "metric": "proc_run", "color": "2030F4", "label": "Procs", "line_width": "2", "type": "line" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Security/Exception.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | class Dwoo_Security_Exception extends Dwoo_Exception 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /dwoo/Dwoo.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.1.0 14 | * @date 2010-02-28 15 | * @package Dwoo 16 | * @see Dwoo_Core 17 | */ 18 | class Dwoo extends Dwoo_Core 19 | { 20 | } -------------------------------------------------------------------------------- /graph.d/mem_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "mem_report", 3 | "report_type" : "template", 4 | "title" : "Memory Report", 5 | "graphite" : "target=alias(scale(diffSeries(HOST_CLUSTER.mem_total.sum,sumSeries(HOST_CLUSTER.mem_shared.sum,HOST_CLUSTER.mem_free.sum,HOST_CLUSTER.mem_cached.sum,HOST_CLUSTER.mem_buffers.sum)),1024),'Mem+Used')&target=alias(scale(HOST_CLUSTER.mem_shared.sum,1024),'Mem+shared')&target=alias(scale(HOST_CLUSTER.mem_cached.sum,1024),'Mem+cached')&target=alias(scale(HOST_CLUSTER.mem_buffers.sum,1024),'Mem+buffered')&target=alias(scale(diffSeries(HOST_CLUSTER.swap_total.sum,HOST_CLUSTER.swap_free.sum),1024),'Swap')&areaMode=stacked&colorList=5555cc,0000aa,33cc33,99ff33,9900CC" 6 | } 7 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/eol.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | function Dwoo_Plugin_eol_compile(Dwoo_Compiler $compiler) 18 | { 19 | return 'PHP_EOL'; 20 | } 21 | -------------------------------------------------------------------------------- /dwoo/Dwoo/ICompilable/Block.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | interface Dwoo_ICompilable_Block 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/isset.php: -------------------------------------------------------------------------------- 1 | 6 | * * var : variable to check 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_isset_compile(Dwoo_Compiler $compiler, $var) 20 | { 21 | return '('.$var.' !== null)'; 22 | } 23 | -------------------------------------------------------------------------------- /templates/default/header-nobanner.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ganglia Cluster Toolkit:: {page_title} 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | {node_menu} 17 | 19 | 20 |
23 | 24 |
25 | 26 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/nl2br.php: -------------------------------------------------------------------------------- 1 | tags 5 | *
 6 |  *  * value : the string to process
 7 |  * 
8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_nl2br_compile(Dwoo_Compiler $compiler, $value) 20 | { 21 | return 'nl2br((string) '.$value.')'; 22 | } 23 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/optional.php: -------------------------------------------------------------------------------- 1 | 7 | * * value : the variable to print 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.1.1 17 | * @date 2009-10-18 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_optional_compile(Dwoo_Compiler $compiler, $value) 21 | { 22 | return $value; 23 | } 24 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/upper.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the text to uppercase 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_upper_compile(Dwoo_Compiler $compiler, $value) 20 | { 21 | return 'mb_strtoupper((string) '.$value.', $this->charset)'; 22 | } 23 | -------------------------------------------------------------------------------- /lib/common_api.php: -------------------------------------------------------------------------------- 1 | "error", "message" => $message ); 8 | die ( json_encode($digest) ); 9 | } 10 | 11 | function api_return_ok ( $message ) { 12 | $digest = array( "status" => "ok", "message" => $message ); 13 | die ( json_encode($digest) ); 14 | } 15 | 16 | // Handle PHP error 17 | set_error_handler("ganglia_api_error_handler"); 18 | function ganglia_api_error_handler ($no, $str, $file, $line) { 19 | switch ($no) { 20 | case E_ERROR: 21 | case E_CORE_ERROR: 22 | case E_COMPILE_ERROR: 23 | case E_USER_ERROR: 24 | api_return_error( "$file [$line] : $str" ); 25 | break; 26 | } 27 | } 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /dwoo/Dwoo/IDataProvider.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | interface Dwoo_IDataProvider 18 | { 19 | /** 20 | * returns the data as an associative array that will be used in the template 21 | * 22 | * @return array 23 | */ 24 | public function getData(); 25 | } 26 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/lower.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_lower_compile(Dwoo_Compiler $compiler, $value) 20 | { 21 | return 'mb_strtolower((string) '.$value.', $this->charset)'; 22 | } 23 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/count_paragraphs.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_count_paragraphs_compile(Dwoo_Compiler $compiler, $value) 20 | { 21 | return '(preg_match_all(\'#[\r\n]+#\', '.$value.', $tmp)+1)'; 22 | } 23 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/count_sentences.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_count_sentences_compile(Dwoo_Compiler $compiler, $value) 20 | { 21 | return "preg_match_all('#[\w\pL]\.(?![\w\pL])#u', $value, \$tmp)"; 22 | } 23 | -------------------------------------------------------------------------------- /tattle_autocomplete.php: -------------------------------------------------------------------------------- 1 | $hosts ) { 15 | if ( preg_match("/$query/i", $metric_name ) ) { 16 | foreach ( $hosts as $key => $host_name ) { 17 | $clusters = $index_array['cluster'][$host_name]; 18 | foreach ($clusters as $cluster_name) { 19 | $results[] = array( "value" => $cluster_name . "_|_" . $host_name . "_|_" . $metric_name); 20 | } 21 | } 22 | } 23 | } 24 | 25 | } 26 | 27 | echo json_encode($results); 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/cat.php: -------------------------------------------------------------------------------- 1 | 6 | * * rest : two or more strings that will be merged into one 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_cat_compile(Dwoo_Compiler $compiler, $value, array $rest) 20 | { 21 | return '('.$value.').('.implode(').(', $rest).')'; 22 | } 23 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/assign.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the value that you want to save 7 | * * var : the variable name (without the leading $) 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_assign_compile(Dwoo_Compiler $compiler, $value, $var) 21 | { 22 | return '$this->assignInScope('.$value.', '.$var.')'; 23 | } 24 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/count_words.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_count_words_compile(Dwoo_Compiler $compiler, $value) 20 | { 21 | return 'preg_match_all(strcasecmp($this->charset, \'utf-8\')===0 ? \'#[\w\pL]+#u\' : \'#\w+#\', '.$value.', $tmp)'; 22 | } 23 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/string_format.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to format 7 | * * format : the format to use, see {@link http://php.net/sprintf} for details 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_string_format_compile(Dwoo_Compiler $compiler, $value, $format) 21 | { 22 | return 'sprintf('.$format.','.$value.')'; 23 | } 24 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/default.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the variable to check 7 | * * default : fallback value if the first one is empty 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_default_compile(Dwoo_Compiler $compiler, $value, $default='') 21 | { 22 | return '(($tmp = '.$value.')===null||$tmp===\'\' ? '.$default.' : $tmp)'; 23 | } 24 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | assign("webfrontend_version", $version["webfrontend"]); 5 | 6 | if (isset($_GET["hide-hf"]) && filter_input(INPUT_GET, "hide-hf", FILTER_VALIDATE_BOOLEAN, array("flags" => FILTER_NULL_ON_FAILURE))) { 7 | $data->assign("hide_footer", true); 8 | } 9 | 10 | if ($version["rrdtool"]) { 11 | $data->assign("rrdtool_version", $version["rrdtool"]); 12 | } 13 | 14 | $backend_components = array("gmetad", "gmetad-python", "gmond"); 15 | 16 | foreach ($backend_components as $backend) { 17 | if (isset($version[$backend])) { 18 | $data->assign("webbackend_component", $backend); 19 | $data->assign("webbackend_version", $version[$backend]); 20 | break; 21 | } 22 | } 23 | 24 | $data->assign("parsetime", sprintf("%.4f", $parsetime) . "s"); 25 | 26 | $dwoo->output($tpl, $data); 27 | ?> 28 | -------------------------------------------------------------------------------- /templates/default/host_overview.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 39 |
6 | 7 | 8 | {$node_msg} 9 | 10 | 11 | 12 | 13 | 14 | 15 | {foreach $s_metrics_data s_metric} 16 | 17 | 18 | 19 | {/foreach} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {foreach $c_metrics_data c_metric} 28 | 29 | 30 | 31 | {/foreach} 32 |
Time and String Metrics
{$s_metric.value}
 
Constant Metrics
{$c_metric.value}
33 | 34 |
35 | {if isset($extra)} 36 | {include(file="$extra")} 37 | {/if} 38 |
40 | 41 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: ganglia-webfrontend 2 | Section: net 3 | Priority: optional 4 | Maintainer: Jeff Buchbinder 5 | Homepage: http://www.ganglia.info/ 6 | Build-Depends: debhelper (>= 7.0.0), rsync, build-essential 7 | Standards-Version: 3.8.4 8 | Vcs-Git: git://github.com/vvuksan/ganglia-misc.git 9 | Vcs-Browser: http://github.com/vvuksan/ganglia-misc 10 | 11 | Package: ganglia-webfrontend 12 | Architecture: all 13 | Depends: ${misc:Depends}, apache | apache-ssl | apache-perl | apache2, php5 | php5-cgi | libapache2-mod-php5, rrdtool, debconf (>= 0.5) 14 | Recommends: gmetad, php5-gd 15 | Description: cluster monitoring toolkit - web front-end 16 | Ganglia is a scalable, real-time cluster monitoring environment 17 | that collects cluster statistics in an open and well-defined XML 18 | format. 19 | . 20 | This package contains the PHP-based web front-end, which displays 21 | information gathered by 'gmetad'. 22 | 23 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/spacify.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * * space_char : the character(s) to insert between each character 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_spacify_compile(Dwoo_Compiler $compiler, $value, $space_char=' ') 21 | { 22 | return 'implode('.$space_char.', str_split('.$value.', 1))'; 23 | } 24 | -------------------------------------------------------------------------------- /dwoo/Dwoo/IElseable.php: -------------------------------------------------------------------------------- 1 | 15 | * @copyright Copyright (c) 2008, Jordi Boggiano 16 | * @license http://dwoo.org/LICENSE Modified BSD License 17 | * @link http://dwoo.org/ 18 | * @version 1.0.0 19 | * @date 2008-10-23 20 | * @package Dwoo 21 | */ 22 | interface Dwoo_IElseable 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/safe.php: -------------------------------------------------------------------------------- 1 | 6 | * * var : the variable to pass through untouched 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | function Dwoo_Plugin_safe_compile(Dwoo_Compiler $compiler, $var) 20 | { 21 | return preg_replace('#\(is_string\(\$tmp=(.+)\) \? htmlspecialchars\(\$tmp, ENT_QUOTES, \$this->charset\) : \$tmp\)#', '$1', $var); 22 | } 23 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php: -------------------------------------------------------------------------------- 1 | Agavi specific plugin 5 | * 6 | * uses AgaviTranslationManager to localize a string 7 | * 8 | *
 9 |  *  * string : the string to localize
10 |  * 
11 | * 12 | * Examples: 13 | * 14 | * {t "Hello"} 15 | * {t $header} 16 | * 17 | * 18 | * This software is provided 'as-is', without any express or implied warranty. 19 | * In no event will the authors be held liable for any damages arising from the use of this software. 20 | * 21 | * @author Jordi Boggiano 22 | * @copyright Copyright (c) 2008, Jordi Boggiano 23 | * @license http://dwoo.org/LICENSE Modified BSD License 24 | * @link http://dwoo.org/ 25 | * @version 1.0.0 26 | * @date 2008-10-23 27 | * @package Dwoo 28 | */ 29 | function Dwoo_Plugin_t_compile(Dwoo_Compiler $compiler, $string) 30 | { 31 | return '$this->data[\'tm\']->_('.$string.')'; 32 | } -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.templates: -------------------------------------------------------------------------------- 1 | # These templates have been reviewed by the debian-l10n-english 2 | # team 3 | # 4 | # If modifications/additions/rewording are needed, please ask 5 | # debian-l10n-english@lists.debian.org for advice. 6 | # 7 | # Even minor modifications require translation updates and such 8 | # changes should be coordinated with translators and reviewers. 9 | 10 | Template: ganglia-webfrontend/webserver 11 | Type: boolean 12 | Default: true 13 | _Description: Automatically configure apache2? 14 | The ganglia front-end will be unavailable until a web server is configured. 15 | Automatic configuration can be performed for the Apache 2 web server. 16 | 17 | Template: ganglia-webfrontend/restart 18 | Type: boolean 19 | Default: true 20 | _Description: Restart apache2? 21 | In order to activate the new configuration, the web server needs 22 | to be restarted. If you choose not to do this automatically, you should 23 | do so manually at the first opportunity. 24 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/strip_tags.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * * addspace : if true, a space is added in place of every removed tag 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_strip_tags_compile(Dwoo_Compiler $compiler, $value, $addspace=true) 21 | { 22 | if ($addspace==='true') { 23 | return "preg_replace('#<[^>]*>#', ' ', $value)"; 24 | } else { 25 | return "strip_tags($value)"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | # Uncomment this to turn on verbose mode. 4 | export DH_VERBOSE=1 5 | 6 | %: 7 | dh $@ 8 | 9 | override_dh_auto_configure: 10 | dh_testdir 11 | 12 | override_dh_auto_build: 13 | dh_testdir 14 | # Add here commands to compile the package. 15 | $(MAKE) APACHE_USER=www-data DESTDIR=$(CURDIR)/debian/ganglia-webfrontend 16 | 17 | override_dh_auto_clean: 18 | dh_testdir 19 | dh_testroot 20 | $(MAKE) clean 21 | 22 | override_dh_auto_install: 23 | dh_testdir 24 | dh_testroot 25 | dh_prep 26 | dh_installdirs 27 | # Add here commands to install the package into debian/ganglia. 28 | $(MAKE) install APACHE_USER=www-data DESTDIR=$(CURDIR)/debian/ganglia-webfrontend 29 | # Install webfrontend 30 | mkdir -p debian/ganglia-webfrontend/etc/apache2/conf.d/ 31 | cp -f debian/apache.conf \ 32 | debian/ganglia-webfrontend/etc/ganglia-webfrontend 33 | cp -f debian/conf_debian.php \ 34 | debian/ganglia-webfrontend/usr/share/ganglia-webfrontend/conf.php 35 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/indent.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to indent 7 | * * by : how many characters should be inserted before each line 8 | * * char : the character(s) to insert 9 | * 10 | * This software is provided 'as-is', without any express or implied warranty. 11 | * In no event will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * @author Jordi Boggiano 14 | * @copyright Copyright (c) 2008, Jordi Boggiano 15 | * @license http://dwoo.org/LICENSE Modified BSD License 16 | * @link http://dwoo.org/ 17 | * @version 1.0.0 18 | * @date 2008-10-23 19 | * @package Dwoo 20 | */ 21 | function Dwoo_Plugin_indent_compile(Dwoo_Compiler $compiler, $value, $by=4, $char=' ') 22 | { 23 | return "preg_replace('#^#m', '".str_repeat(substr($char, 1, -1), trim($by, '"\''))."', $value)"; 24 | } 25 | -------------------------------------------------------------------------------- /host_overview.php: -------------------------------------------------------------------------------- 1 | There was an error initializing the Dwoo PHP Templating Engine: " . 13 | $e->getMessage() . 14 | "

The compile directory should be owned and writable by the apache user."; 15 | exit; 16 | } 17 | 18 | $tpl = new Dwoo_Template_File( template("host_overview.tpl") ); 19 | $data = new Dwoo_Data(); 20 | getHostOverViewData($hostname, 21 | $metrics, 22 | $cluster, 23 | $hosts_up, 24 | $hosts_down, 25 | $always_timestamp, 26 | $always_constant, 27 | $data); 28 | $dwoo->output($tpl, $data); 29 | ?> 30 | -------------------------------------------------------------------------------- /templates/default/grid_tree.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
{$self} Grid Tree
6 | 7 |
8 | 9 | 10 | 11 | {if isset($parentgrid)} 12 | 17 | {/if} 18 | 19 | 20 | 21 | 36 | 37 | 38 |
13 | 14 | {$parents} 15 |
16 |
22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | {$children} 32 | 33 |
26 | {$self} 27 |
34 | 35 |
39 |
40 | 41 |

42 |


43 | Legend: 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
 This Grid.
 A Remote Grid.
52 | 53 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/count_characters.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to process 7 | * * count_spaces : if true, the white-space characters are counted as well 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_count_characters_compile(Dwoo_Compiler $compiler, $value, $count_spaces=false) 21 | { 22 | if ($count_spaces==='false') { 23 | return 'preg_match_all(\'#[^\s\pZ]#u\', '.$value.', $tmp)'; 24 | } else { 25 | return 'mb_strlen('.$value.', $this->charset)'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/wordwrap.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the text to wrap 7 | * * length : maximum line length 8 | * * break : the character(s) to use to break the line 9 | * * cut : if true, the line is cut at the exact length instead of breaking at the nearest space 10 | * 11 | * This software is provided 'as-is', without any express or implied warranty. 12 | * In no event will the authors be held liable for any damages arising from the use of this software. 13 | * 14 | * @author Jordi Boggiano 15 | * @copyright Copyright (c) 2008, Jordi Boggiano 16 | * @license http://dwoo.org/LICENSE Modified BSD License 17 | * @link http://dwoo.org/ 18 | * @version 1.0.0 19 | * @date 2008-10-23 20 | * @package Dwoo 21 | */ 22 | function Dwoo_Plugin_wordwrap_compile(Dwoo_Compiler $compiler, $value, $length=80, $break="\n", $cut=false) 23 | { 24 | return 'wordwrap('.$value.','.$length.','.$break.','.$cut.')'; 25 | } 26 | -------------------------------------------------------------------------------- /dwoo/Dwoo/ICompilable.php: -------------------------------------------------------------------------------- 1 | public static function compile(Dwoo_Compiler $compiler, $arg, $arg, ...), 9 | * which replaces the process() method (that means compile() should have all arguments it requires). 10 | * 11 | * This software is provided 'as-is', without any express or implied warranty. 12 | * In no event will the authors be held liable for any damages arising from the use of this software. 13 | * 14 | * @author Jordi Boggiano 15 | * @copyright Copyright (c) 2008, Jordi Boggiano 16 | * @license http://dwoo.org/LICENSE Modified BSD License 17 | * @link http://dwoo.org/ 18 | * @version 1.0.0 19 | * @date 2008-10-23 20 | * @package Dwoo 21 | */ 22 | interface Dwoo_ICompilable 23 | { 24 | // this replaces the process function 25 | //public static function compile(Dwoo_Compiler $compiler, $arg, $arg, ...); 26 | } 27 | -------------------------------------------------------------------------------- /api/search.php: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/replace.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to search into 7 | * * search : the string to search for 8 | * * replace : the string to use as a replacement 9 | * 10 | * This software is provided 'as-is', without any express or implied warranty. 11 | * In no event will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * @author Jordi Boggiano 14 | * @copyright Copyright (c) 2008, Jordi Boggiano 15 | * @license http://dwoo.org/LICENSE Modified BSD License 16 | * @link http://dwoo.org/ 17 | * @version 1.0.0 18 | * @date 2008-10-23 19 | * @package Dwoo 20 | */ 21 | function Dwoo_Plugin_replace_compile(Dwoo_Compiler $compiler, $value, $search, $replace, $case_sensitive = true) 22 | { 23 | if ($case_sensitive == 'false' || (bool)$case_sensitive === false) { 24 | return 'str_ireplace('.$search.', '.$replace.', '.$value.')'; 25 | } else { 26 | return 'str_replace('.$search.', '.$replace.', '.$value.')'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | setAuthCookie($_SERVER['REMOTE_USER']); 7 | $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : 'index.php'; 8 | header("Location: $redirect_to"); 9 | die(); 10 | } 11 | ?> 12 | 13 | 14 | Authentication Failed 15 | 16 | 17 |

We were unable to log you in.

18 |
19 | 20 | $conf['auth_system'] is not defined.
Please notify an administrator. 21 | 22 | Authentication is disabled by Ganglia configuration.
23 | $conf['auth_system'] = ''; 24 | 25 | Authentication is not configured correctly. The web server must provide an authenticated username. 26 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/whitespace.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the text to process 7 | * * with : the replacement string, note that any number of consecutive white-space characters will be replaced by a single replacement string 8 | * 9 | * Example : 10 | * 11 | * 12 | * {"a b c d 13 | * 14 | * e"|whitespace} 15 | * 16 | * results in : a b c d e 17 | * 18 | * 19 | * This software is provided 'as-is', without any express or implied warranty. 20 | * In no event will the authors be held liable for any damages arising from the use of this software. 21 | * 22 | * @author Jordi Boggiano 23 | * @copyright Copyright (c) 2008, Jordi Boggiano 24 | * @license http://dwoo.org/LICENSE Modified BSD License 25 | * @link http://dwoo.org/ 26 | * @version 1.0.0 27 | * @date 2008-10-23 28 | * @package Dwoo 29 | */ 30 | function Dwoo_Plugin_whitespace_compile(Dwoo_Compiler $compiler, $value, $with=' ') 31 | { 32 | return "preg_replace('#\s+#'.(strcasecmp(\$this->charset, 'utf-8')===0?'u':''), $with, $value)"; 33 | } 34 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.postrm: -------------------------------------------------------------------------------- 1 | #! /bin/sh -x 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | db_version 2.0 || [ $? -lt 30 ] 7 | 8 | if [ "$1" = "purge" ]; then 9 | 10 | db_get ganglia-webfrontend/webserver || true 11 | 12 | if [ "$RET" = "true" ]; then 13 | webserver="apache2" 14 | 15 | if [ -h /etc/$webserver/conf.d/ganglia-webfrontend ]; then 16 | rm -f /etc/$webserver/conf.d/ganglia-webfrontend 17 | fi 18 | 19 | if [ -x /usr/sbin/$webserver ]; then 20 | db_reset ganglia-webfrontend/restart 21 | db_input high ganglia-webfrontend/restart || true 22 | db_go 23 | 24 | # Restart apache2 if requested 25 | db_get ganglia-webfrontend/restart 26 | if [ "$RET" = "true" ]; then 27 | if [ -x /usr/sbin/invoke-rc.d ]; then 28 | invoke-rc.d $webserver restart 29 | else 30 | /etc/init.d/$webserver restart 31 | fi 32 | fi 33 | fi 34 | fi 35 | 36 | rmdir --ignore-fail-on-non-empty /etc/ganglia-webfrontend || true 37 | 38 | db_purge 39 | 40 | fi 41 | 42 | #DEBHELPER# 43 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/reverse.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string or array to reverse 7 | * * preserve_keys : if value is an array and this is true, then the array keys are left intact 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.0.0 17 | * @date 2008-10-23 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_reverse(Dwoo_Core $dwoo, $value, $preserve_keys=false) 21 | { 22 | if (is_array($value)) { 23 | return array_reverse($value, $preserve_keys); 24 | } elseif(($charset=$dwoo->getCharset()) === 'iso-8859-1') { 25 | return strrev((string) $value); 26 | } else { 27 | $strlen = mb_strlen($value); 28 | $out = ''; 29 | while ($strlen--) { 30 | $out .= mb_substr($value, $strlen, 1, $charset); 31 | } 32 | return $out; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dwoo/Dwoo/ILoader.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | interface Dwoo_ILoader 18 | { 19 | /** 20 | * loads a plugin file 21 | * 22 | * the second parameter is used to avoid permanent rehashing when using php functions, 23 | * however this means that if you have add a plugin that overrides a php function you have 24 | * to delete the classpath.cache file(s) by hand to force a rehash of the plugins 25 | * 26 | * @param string $class the plugin name, without the Dwoo_Plugin_ prefix 27 | * @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true 28 | */ 29 | public function loadPlugin($class, $forceRehash = true); 30 | } 31 | -------------------------------------------------------------------------------- /lib/Zend/Acl/Exception.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | class Dwoo_Compilation_Exception extends Dwoo_Exception 18 | { 19 | protected $compiler; 20 | protected $template; 21 | 22 | public function __construct(Dwoo_Compiler $compiler, $message) 23 | { 24 | $this->compiler = $compiler; 25 | $this->template = $compiler->getDwoo()->getTemplate(); 26 | parent::__construct('Compilation error at line '.$compiler->getLine().' in "'.$this->template->getResourceName().':'.$this->template->getResourceIdentifier().'" : '.$message); 27 | } 28 | 29 | public function getCompiler() 30 | { 31 | return $this->compiler; 32 | } 33 | 34 | public function getTemplate() 35 | { 36 | return $this->template; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/CakePHP/README: -------------------------------------------------------------------------------- 1 | // CakePHP Dwoo bridge - v0.2 2 | // ------------------------ 3 | // Installation : 4 | // ------------------------ 5 | // 1. Download and install the dwoo library, preferably on the 6 | // 'vendors' directory of CakePHP. However you can place it 7 | // anywhere you want; if you do, make sure to change the App::import 8 | // line in dwoo.php to include the dwoo library properly. 9 | // 10 | // 2. Place this file in the app/views directory, or on cake/libs/view. 11 | // 12 | // 3. Create the app/tmp/dwoo/cache and app/tmp/dwoo/compile directories 13 | // and make sure they are writable. 14 | // ------------------------ 15 | // Usage example : 16 | // ------------------------ 17 | 18 | // In your controller class you need to change the view property to 19 | // use Dwoo at some point in the execution using : 20 | 21 | $this->view = 'Dwoo'; 22 | 23 | // Or you can also override the view property in your AppController class as such : 24 | 25 | class AppController extends Controller { 26 | public $view = 'Dwoo'; 27 | } 28 | 29 | // If you want another template extension (default is .tpl) you must 30 | // edit the dwoo.php file at line 44 and change it to : 31 | $this->ext = ".html"; 32 | 33 | //{include $templatedir."index.tpl"} -------------------------------------------------------------------------------- /dwoo/Dwoo/Filter.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | abstract class Dwoo_Filter 18 | { 19 | /** 20 | * the dwoo instance that runs this filter 21 | * 22 | * @var Dwoo 23 | */ 24 | protected $dwoo; 25 | 26 | /** 27 | * constructor, if you override it, call parent::__construct($dwoo); or assign 28 | * the dwoo instance yourself if you need it 29 | * 30 | * @param Dwoo_Core $dwoo the dwoo instance that runs this plugin 31 | */ 32 | public function __construct(Dwoo_Core $dwoo) 33 | { 34 | $this->dwoo = $dwoo; 35 | } 36 | 37 | /** 38 | * processes the input and returns it filtered 39 | * 40 | * @param string $input the template to process 41 | * @return string 42 | */ 43 | abstract public function process($input); 44 | } 45 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | db_version 2.0 || [ $? -lt 30 ] 7 | 8 | if [ "$1" = "configure" ]; then 9 | 10 | db_get ganglia-webfrontend/webserver 11 | autoconfigure="$RET" 12 | webserver="apache2" 13 | 14 | chown www-data /var/lib/ganglia-web/dwoo/cache 15 | chown www-data /var/lib/ganglia-web/dwoo/compiled 16 | 17 | if [ "$autoconfigure" = true ]; then 18 | test -x /usr/sbin/$webserver || continue 19 | 20 | # Auto-configure module dependencies 21 | a2enmod php5 || true 22 | a2enmod cgi || true 23 | 24 | if [ ! -f /etc/$webserver/conf.d/ganglia-webfrontend -a ! -h /etc/$webserver/conf.d/ganglia-webfrontend ]; then 25 | ln -s /etc/ganglia-webfrontend/apache.conf /etc/$webserver/conf.d/ganglia-webfrontend 26 | fi 27 | 28 | # Restart apache2 if requested 29 | db_get ganglia-webfrontend/restart 30 | if [ "$RET" = "true" ]; then 31 | if [ -x /usr/sbin/invoke-rc.d ]; then 32 | invoke-rc.d $webserver restart 33 | else 34 | /etc/init.d/$webserver restart 35 | fi 36 | fi 37 | 38 | fi 39 | 40 | fi 41 | 42 | #DEBHELPER# 43 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | {block "title"}Here come the title{/block} 4 | 5 | 53 | 54 | 55 | {block "content"}Here comes the content{/block} 56 | 57 | -------------------------------------------------------------------------------- /lib/Zend/Acl/Role/Registry/Exception.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | class Dwoo_Plugin_block extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 20 | { 21 | public function init($name='') 22 | { 23 | } 24 | 25 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 26 | { 27 | return ''; 28 | } 29 | 30 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 31 | { 32 | return $content; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Processor.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | abstract class Dwoo_Processor 18 | { 19 | /** 20 | * the compiler instance that runs this processor 21 | * 22 | * @var Dwoo 23 | */ 24 | protected $compiler; 25 | 26 | /** 27 | * constructor, if you override it, call parent::__construct($dwoo); or assign 28 | * the dwoo instance yourself if you need it 29 | * 30 | * @param Dwoo_Core $dwoo the dwoo instance that runs this plugin 31 | */ 32 | public function __construct(Dwoo_Compiler $compiler) 33 | { 34 | $this->compiler = $compiler; 35 | } 36 | 37 | /** 38 | * processes the input and returns it filtered 39 | * 40 | * @param string $input the template to process 41 | * @return string 42 | */ 43 | abstract public function process($input); 44 | } 45 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/topLevelBlock.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | final class Dwoo_Plugin_topLevelBlock extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 18 | { 19 | public function init() 20 | { 21 | } 22 | 23 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 24 | { 25 | return '/* end template head */ ob_start(); /* template body */ '.Dwoo_Compiler::PHP_CLOSE; 26 | } 27 | 28 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 29 | { 30 | return $content . Dwoo_Compiler::PHP_OPEN.' /* end template body */'."\n".'return $this->buffer . ob_get_clean();'; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/Zend/Acl/Role/Interface.php: -------------------------------------------------------------------------------- 1 | Breakdown 2 | 3 | $host_metrics ) { 23 | 24 | if ( preg_match("/" . $host_reg . "/", $hostname) ) { 25 | if ( isset($host_metrics[$metric]) ) { 26 | $metric_value = $host_metrics[$metric]["VAL"]; 27 | $results_array[$metric_value][] = $hostname; 28 | } 29 | } 30 | 31 | } 32 | 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | $members ) { 47 | 48 | print "" . 49 | ""; 51 | 52 | } 53 | 54 | ?> 55 | 56 |
Value#Members
" . $metric_value . "" . count($members) . 50 | "" . join(",", $members) . "
57 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/ZendFramework/Dwoo.php: -------------------------------------------------------------------------------- 1 | 11 | * @author Marc Hodgins 12 | * @copyright Copyright (c) 2010, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.2.0 16 | * @date 2010-02-28 17 | * @package Dwoo 18 | */ 19 | class Dwoo_Adapters_ZendFramework_Dwoo extends Dwoo_Core 20 | { 21 | /** 22 | * Redirects all unknown properties to plugin proxy 23 | * to support $this->viewVariable from within templates 24 | * 25 | * @param string $name Property name 26 | * @return mixed 27 | */ 28 | public function __get($name) 29 | { 30 | if (isset($this->getPluginProxy()->view->$name)) { 31 | return $this->getPluginProxy()->view->$name; 32 | } 33 | $trace = debug_backtrace(); 34 | trigger_error('Undefined property via __get(): ' . $name . 35 | ' in ' . $trace[0]['file'] . 36 | ' on line ' . $trace[0]['line'], E_USER_NOTICE); 37 | return null; 38 | } 39 | } -------------------------------------------------------------------------------- /lib/Zend/Acl/Resource/Interface.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to capitalize 7 | * * numwords : if true, the words containing numbers are capitalized as well 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.1.0 17 | * @date 2009-07-18 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_capitalize(Dwoo_Core $dwoo, $value, $numwords=false) 21 | { 22 | if ($numwords || preg_match('#^[^0-9]+$#',$value)) 23 | { 24 | return mb_convert_case((string) $value,MB_CASE_TITLE, $dwoo->getCharset()); 25 | } else { 26 | $bits = explode(' ', (string) $value); 27 | $out = ''; 28 | while (list(,$v) = each($bits)) { 29 | if (preg_match('#^[^0-9]+$#', $v)) { 30 | $out .= ' '.mb_convert_case($v, MB_CASE_TITLE, $dwoo->getCharset()); 31 | } else { 32 | $out .= ' '.$v; 33 | } 34 | } 35 | 36 | return substr($out, 1); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl: -------------------------------------------------------------------------------- 1 | {extends "page.tpl"} 2 | 3 | {block "title"} 4 | Welcome to Dwoo-ed CodeIgniter 5 | {/block} 6 | 7 | {block "content"} 8 |

Welcome to Dwoo-ed CodeIgniter!

9 | 10 |

The page you are looking at is being generated dynamically by CodeIgniter in combination with the 'Smarty-killer' Dwoo template engine. 11 | The page is rendered at {$itshowlate} by the Dwoo_compiler.

12 | 13 |

If you would like to edit this page you'll find it located at:

14 | application/views/dwoowelcome.tpl 15 | 16 |

The corresponding controller for this page is found at:

17 | application/controllers/dwoowelcome.php 18 | 19 |

The library for Dwoo integration can be found at:

20 | application/libraries/Dwootemplate.php 21 | 22 |

If you are exploring Dwoo for the very first time, you should start by reading the {anchor uri='http://dwoo.org/' title='Dwoo website'}.

23 |

If you are exploring CodeIgniter for the very first time, you should start by reading the {anchor uri='http://codeigniter.com/user_guide/' title='User Guide'}.

24 | 25 |
26 | Usage:
27 | $this->load->library('Dwootemplate');
28 | $this->dwootemplate->assign('test', 'test');
29 | $this->dwootemplate->display('dwoowelcome.tpl');
30 | 
31 | {/block} -------------------------------------------------------------------------------- /dwoo/plugins/builtin/helper.array.php: -------------------------------------------------------------------------------- 1 | 6 | * * rest : any number of variables, strings or anything that you want to store in the array 7 | * 8 | * Example : 9 | * 10 | * 11 | * {array(a, b, c)} results in array(0=>'a', 1=>'b', 2=>'c') 12 | * {array(a=foo, b=5, c=array(4,5))} results in array('a'=>'foo', 'b'=>5, 'c'=>array(0=>4, 1=>5)) 13 | * 14 | * 15 | * This software is provided 'as-is', without any express or implied warranty. 16 | * In no event will the authors be held liable for any damages arising from the use of this software. 17 | * 18 | * @author Jordi Boggiano 19 | * @copyright Copyright (c) 2008, Jordi Boggiano 20 | * @license http://dwoo.org/LICENSE Modified BSD License 21 | * @link http://dwoo.org/ 22 | * @version 1.0.0 23 | * @date 2008-10-23 24 | * @package Dwoo 25 | */ 26 | function Dwoo_Plugin_array_compile(Dwoo_Compiler $compiler, array $rest=array()) 27 | { 28 | $out = array(); 29 | foreach ($rest as $key => $value) { 30 | if (!is_numeric($key) && !strstr($key, '$this->scope')) { 31 | $key = "'".$key."'"; 32 | } 33 | $out[] = $key.'=>'.$value; 34 | } 35 | return 'array('.implode(', ', $out).')'; 36 | } -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/Agavi/README: -------------------------------------------------------------------------------- 1 | // ------------------------ 2 | // Install notes : 3 | // ------------------------ 4 | 5 | - drop dwoo's directory in app/lib/renderer (create if needed) 6 | 7 | - add a renderer to app/config/output_types.xml as such : 8 | 9 | 10 | ro 11 | rq 12 | ct 13 | us 14 | tm 15 | rd 16 | 17 | true 18 | %core.lib_dir%/dwoo_plugins 19 | 20 | 21 | - add the renderer to app/config/autoload.xml as such : 22 | %core.lib_dir%/renderer/dwoo/Dwoo/Adapter/Agavi/DwooRenderer.php 23 | 24 | - you can copy the /Dwoo/Adapters/Agavi/dwoo_plugins directory to your agavi app's 25 | lib directory, or change the plugin_dir parameter in the output_types.xml file. 26 | these plugins are agavi-specific helpers that shortens the syntax to call common 27 | agavi helpers (i18n, routing, ..) 28 | -------------------------------------------------------------------------------- /cluster_legend.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ganglia Cluster Toolkit:: Cluster Image Legend 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
Ganglia Cluster Image Legend
Cluster ImageMeaning
RedOver 100% Utilization. Utilization is: (1 min load) / (number of CPUs in cluster) * 100%.
Orange75-100%
Yellow50-74%
Green25-49%
Blue0-24%
GreyA private cluster.
35 | 36 |

37 | Back 38 |

39 | 40 | 41 | -------------------------------------------------------------------------------- /nagios/check_for_stuck_gmonds.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_for_stuck_gmonds.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ $# -gt 0 ]; then 22 | CHECK_ARGS=$1 23 | shift 24 | for ARG in "$@" 25 | do 26 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 27 | done 28 | fi 29 | 30 | RESULT=`curl -s ${GANGLIA_URL}?${CHECK_ARGS}` 31 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 32 | 33 | IFS='|' 34 | for x in $EXIT_CODE; do 35 | case $x in 36 | OK) 37 | echo $RESULT 38 | exit 0;; 39 | WARNING) 40 | echo $RESULT 41 | exit 1;; 42 | CRITICAL) 43 | echo $RESULT 44 | exit 2;; 45 | *) 46 | echo $RESULT 47 | exit 3;; 48 | esac 49 | done 50 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/ZendFramework/README: -------------------------------------------------------------------------------- 1 | // ------------------------ 2 | // Usage example : 3 | // ------------------------ 4 | // Note that you might need to manually include 'lib/Dwoo.php', 5 | // 'lib/Dwoo/Adapters/ZendFramework/View.php', 6 | // 'lib/Dwoo/Adapters/ZendFramework/Dwoo.php', and 7 | // 'lib/Dwoo/Adapters/ZendFramework/PluginProxy.php' for this to 8 | // work as expected, depending on your ZF setup 9 | // 10 | // If anyone writes a more advanced how-to please let me know 11 | // ------------------------ 12 | 13 | $view = new Dwoo_Adapters_ZendFramework_View(array( 14 | 'compileDir' => 'path/to/compile_dir' // set to null or remove this line to use defaults 15 | 'cacheDir' => 'path/to/cache_dir' // set to null or remove this line to use defaults 16 | )); 17 | 18 | // This allows you to use ZF's helpers as if they were Dwoo plugins (i.e. {doctype} will call the doctype helper) 19 | // This also allows you to use $this->variable to access view variables from within templates 20 | 21 | $view->setPluginProxy(new Dwoo_Adapters_ZendFramework_PluginProxy(new Zend_View())); 22 | 23 | 24 | // 1. example - used with the Zend Controller 25 | 26 | $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view); 27 | 28 | Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); 29 | 30 | 31 | // 2. example - used manually 32 | 33 | $view->assign('foo', 'bar'); 34 | $view->display('foobar.phtml'); -------------------------------------------------------------------------------- /lib/cache.php: -------------------------------------------------------------------------------- 1 | 0) { 34 | $index_array['hosts'] = array_keys($index_array['cluster']); 35 | g_cache_serialize($index_array); 36 | } 37 | } 38 | 39 | ?> 40 | -------------------------------------------------------------------------------- /node_legend.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ganglia Cluster Toolkit:: Node Image Legend 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 |
Ganglia Node Image Legend
Node ImageMeaning
RedOver 100% Utilization. Utilization is: (1 min load) / (number of CPUs) * 100%.
Orange75-100%
Yellow50-74%
Green25-49%
Blue0-24%
CrossbonesThe node is dead. We consider a node dead 33 | when the reporting node has not heard from it in 60 sec. 34 |
37 | 38 |

39 | Back 40 |

41 | 42 | 43 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/return.php: -------------------------------------------------------------------------------- 1 | 6 | * * file : the resource name of the template 7 | * * cache_time : cache length in seconds 8 | * * cache_id : cache identifier for the included template 9 | * * compile_id : compilation identifier for the included template 10 | * * data : data to feed into the included template, it can be any array and will default to $_root (the current data) 11 | * * assign : if set, the output of the included template will be saved in this variable instead of being output 12 | * * rest : any additional parameter/value provided will be added to the data array 13 | * 14 | * This software is provided 'as-is', without any express or implied warranty. 15 | * In no event will the authors be held liable for any damages arising from the use of this software. 16 | * 17 | * @author Jordi Boggiano 18 | * @copyright Copyright (c) 2008, Jordi Boggiano 19 | * @license http://dwoo.org/LICENSE Modified BSD License 20 | * @link http://dwoo.org/ 21 | * @version 1.1.0 22 | * @date 2009-07-18 23 | * @package Dwoo 24 | */ 25 | function Dwoo_Plugin_return_compile(Dwoo_Compiler $compiler, array $rest = array()) 26 | { 27 | $out = array(); 28 | foreach ($rest as $var => $val) { 29 | $out[] = '$this->setReturnValue('.var_export($var, true).', '.$val.')'; 30 | } 31 | return '('.implode('.', $out).')'; 32 | } -------------------------------------------------------------------------------- /lib/Cache/Driver_Memcache.php: -------------------------------------------------------------------------------- 1 | get( 'ganglia_cache_' . gethostname() ) !== FALSE; 7 | } // end function g_cache_exists 8 | 9 | function g_cache_serialize($data) { 10 | global $conf; 11 | $mc = g_get_memcache(); 12 | $mc->set( 'ganglia_cache_' . gethostname(), $data ); 13 | $mc->set( 'ganglia_cache_timestamp_' . gethostname(), time() ); 14 | } // end function g_cache_serialize 15 | 16 | function g_cache_deserialize() { 17 | global $conf; 18 | $mc = g_get_memcache(); 19 | $index_array = $mc->get( 'ganglia_cache_' . gethostname() ); 20 | return $index_array; 21 | } // end function g_cache_deserialize 22 | 23 | function g_cache_expire () { 24 | global $conf; 25 | $mc = g_get_memcache(); 26 | return time() - $mc->get( 'ganglia_cache_timestamp_' . gethostname() ); 27 | } // end function g_cache_expire 28 | 29 | function g_get_memcache() { 30 | global $conf; 31 | if (!$GLOBALS['__memcached_pool']) { 32 | $GLOBALS['__memcached_pool'] = new Memcached(); 33 | $GLOBALS['__memcached_pool']->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT); 34 | foreach ($conf['memcached_servers'] as $server) { 35 | list($host, $port) = explode(':', $server); 36 | $GLOBALS['__memcached_pool']->addServer( $host, (int)$port ); 37 | } 38 | } 39 | return $GLOBALS['__memcached_pool']; 40 | } // end function g_get_memcache 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/forelse.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | class Dwoo_Plugin_forelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 18 | { 19 | public function init() 20 | { 21 | } 22 | 23 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 24 | { 25 | $with =& $compiler->findBlock('for', true); 26 | 27 | $params['initialized'] = true; 28 | $compiler->injectBlock($type, $params); 29 | 30 | return ''; 31 | } 32 | 33 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 34 | { 35 | if (!isset($params['initialized'])) { 36 | return ''; 37 | } 38 | 39 | $block =& $compiler->getCurrentBlock(); 40 | $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; 41 | return ''; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/withelse.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | class Dwoo_Plugin_withelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 18 | { 19 | public function init() 20 | { 21 | } 22 | 23 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 24 | { 25 | $with =& $compiler->findBlock('with', true); 26 | 27 | $params['initialized'] = true; 28 | $compiler->injectBlock($type, $params); 29 | 30 | return ''; 31 | } 32 | 33 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 34 | { 35 | if (!isset($params['initialized'])) { 36 | return ''; 37 | } 38 | 39 | $block =& $compiler->getCurrentBlock(); 40 | $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; 41 | return ''; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/eval.php: -------------------------------------------------------------------------------- 1 | 13 | * * var : the string to use as a template 14 | * * assign : if set, the output of the template will be saved in this variable instead of being output 15 | * 16 | * This software is provided 'as-is', without any express or implied warranty. 17 | * In no event will the authors be held liable for any damages arising from the use of this software. 18 | * 19 | * @author Jordi Boggiano 20 | * @copyright Copyright (c) 2008, Jordi Boggiano 21 | * @license http://dwoo.org/LICENSE Modified BSD License 22 | * @link http://dwoo.org/ 23 | * @version 1.0.0 24 | * @date 2008-10-23 25 | * @package Dwoo 26 | */ 27 | function Dwoo_Plugin_eval(Dwoo_Core $dwoo, $var, $assign = null) 28 | { 29 | if ($var == '') { 30 | return; 31 | } 32 | 33 | $tpl = new Dwoo_Template_String($var); 34 | $clone = clone $dwoo; 35 | $out = $clone->get($tpl, $dwoo->readVar('_parent')); 36 | 37 | if ($assign !== null) { 38 | $dwoo->assignInScope($out, $assign); 39 | } else { 40 | return $out; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /nagios/check_heartbeat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_heartbeat.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Sample invocation $0 host=localhost.localdomain threshold=20" 31 | exit 1 32 | fi 33 | 34 | RESULT=`curl -s "${GANGLIA_URL}?${CHECK_ARGS}"` 35 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 36 | 37 | IFS='|' 38 | for x in $EXIT_CODE; do 39 | case $x in 40 | OK) 41 | echo $RESULT 42 | exit 0;; 43 | WARNING) 44 | echo $RESULT 45 | exit 1;; 46 | CRITICAL) 47 | echo $RESULT 48 | exit 2;; 49 | *) 50 | echo $RESULT 51 | exit 3;; 52 | esac 53 | done 54 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/foreachelse.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.0.0 14 | * @date 2008-10-23 15 | * @package Dwoo 16 | */ 17 | class Dwoo_Plugin_foreachelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 18 | { 19 | public function init() 20 | { 21 | } 22 | 23 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 24 | { 25 | $with =& $compiler->findBlock('foreach', true); 26 | 27 | $params['initialized'] = true; 28 | $compiler->injectBlock($type, $params); 29 | 30 | return ''; 31 | } 32 | 33 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 34 | { 35 | if (!isset($params['initialized'])) { 36 | return ''; 37 | } 38 | 39 | $block =& $compiler->getCurrentBlock(); 40 | $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; 41 | return ''; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/CodeIgniter/README: -------------------------------------------------------------------------------- 1 | CodeIgniter/Dwoo adapater 2 | ------------------------- 3 | Integration of Dwoo into Codeigniter (1.7.0 >) 4 | 5 | Links: 6 | Dwoo - http://dwoo.org 7 | CodeIgniter - http://codeigniter.com 8 | 9 | Installation: 10 | 1) Extract package into your application directory (i.e. $webroot/application or 11 | $webroot/system/application) 12 | 2) Change the parameters in config/dwootemplate.php 13 | 3) Create the compile and cache directory you set in your config file in step 2 14 | and give it the correct rights (chmod 777 when on *nix) 15 | 4) Extract/copy the Dwoo package into application/libraries/dwoo 16 | 5) Browse to : http://[yoururl]/dwoowelcome 17 | 18 | 19 | Version info 20 | 1.0.2 [11-03-2009] Fixed a problem with $data attribute (which Dwoo also used) 21 | 1.0.1 [12-11-2008] Removed some & in the dwootemplate 22 | Changed licencse 23 | Changed 'output' in 'get' in the dwootemplate (line 122) 24 | 1.0.0 [11-11-2008] Initial release 25 | 26 | 27 | Questions/Remarks? 28 | mail to: stefan.verstege@newmedia.nl 29 | IM me on GTALK: verstege@gmail.com 30 | Contact me on the Dwoo forums: stefanv 31 | 32 | ---------[ copyright notice ]----------------------------------------------------------------------- 33 | This software is provided 'as-is', without any express or implied warranty. 34 | In no event will the authors be held liable for any damages arising from the use of this software. 35 | 36 | License http://dwoo.org/LICENSE Modified BSD License -------------------------------------------------------------------------------- /dwoo/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008, Dwoo / Jordi Boggiano 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of Dwoo nor the names of its contributors may be 13 | used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY JORDI BOGGIANO ''AS IS'' AND ANY 17 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL JORDI BOGGIANO BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /nagios/check_value_same_everywhere.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The ganglia-web Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_value_same_everywhere.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Sample invocation $0 hreg=localhost.localdomain checks=svn_rev,deploy_id" 31 | exit 1 32 | fi 33 | 34 | RESULT=`curl -s ${GANGLIA_URL}?${CHECK_ARGS}` 35 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 36 | 37 | IFS='|' 38 | for x in $EXIT_CODE; do 39 | case $x in 40 | OK) 41 | echo $RESULT 42 | exit 0;; 43 | WARNING) 44 | echo $RESULT 45 | exit 1;; 46 | CRITICAL) 47 | echo $RESULT 48 | exit 2;; 49 | *) 50 | echo $RESULT 51 | exit 3;; 52 | esac 53 | done 54 | -------------------------------------------------------------------------------- /nagios/check_multiple_metrics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_multiple_metrics.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Sample invocation $0 host=localhost.localdomain checks=load_one,more,1:load_five,more,2" 31 | exit 1 32 | fi 33 | 34 | RESULT=`curl -s ${GANGLIA_URL}?${CHECK_ARGS}` 35 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 36 | 37 | IFS='|' 38 | for x in $EXIT_CODE; do 39 | case $x in 40 | OK) 41 | echo $RESULT 42 | exit 0;; 43 | WARNING) 44 | echo $RESULT 45 | exit 1;; 46 | CRITICAL) 47 | echo $RESULT 48 | exit 2;; 49 | *) 50 | echo $RESULT 51 | exit 3;; 52 | esac 53 | done 54 | -------------------------------------------------------------------------------- /debian/po/templates.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=CHARSET\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | 33 | #. Type: boolean 34 | #. Description 35 | #: ../ganglia-webfrontend.templates:3001 36 | msgid "Restart apache2?" 37 | msgstr "" 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../ganglia-webfrontend.templates:3001 42 | msgid "" 43 | "In order to activate the new configuration, the web server needs to be " 44 | "restarted. If you choose not to do this automatically, you should do so " 45 | "manually at the first opportunity." 46 | msgstr "" 47 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/regex_replace.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the string to search into 7 | * * search : the string to search for, must be a complete regular expression including delimiters 8 | * * replace : the string to use as a replacement, must be a complete regular expression including delimiters 9 | * 10 | * This software is provided 'as-is', without any express or implied warranty. 11 | * In no event will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * @author Jordi Boggiano 14 | * @copyright Copyright (c) 2008, Jordi Boggiano 15 | * @license http://dwoo.org/LICENSE Modified BSD License 16 | * @link http://dwoo.org/ 17 | * @version 1.0.0 18 | * @date 2008-10-23 19 | * @package Dwoo 20 | */ 21 | function Dwoo_Plugin_regex_replace(Dwoo_Core $dwoo, $value, $search, $replace) 22 | { 23 | $search = (array) $search; 24 | $cnt = count($search); 25 | 26 | for ($i = 0; $i < $cnt; $i++) { 27 | // Credits for this to Monte Ohrt who made smarty's regex_replace modifier 28 | if (($pos = strpos($search[$i], "\0")) !== false) { 29 | $search[$i] = substr($search[$i], 0, $pos); 30 | } 31 | 32 | if (preg_match('#[a-z\s]+$#is', $search[$i], $m) && (strpos($m[0], 'e') !== false)) { 33 | $search[$i] = substr($search[$i], 0, -strlen($m[0])) . str_replace(array('e', ' '), '', $m[0]); 34 | } 35 | } 36 | 37 | return preg_replace($search, $replace, $value); 38 | } -------------------------------------------------------------------------------- /get_ganglia.php: -------------------------------------------------------------------------------- 1 | There was an error collecting ganglia data ". 14 | "(${conf['ganglia_ip']}:${conf['ganglia_port']}): $error\n"; 15 | exit; 16 | } 17 | 18 | 19 | # If we have no child data sources, assume something is wrong. 20 | if (!count($grid) and !count($cluster)) 21 | { 22 | print "

Ganglia cannot find a data source. Is gmond running?

"; 23 | exit; 24 | } 25 | # If we only have one cluster source, suppress MetaCluster output. 26 | if (count($grid) < 2 and $context=="meta") 27 | { 28 | # Lets look for one cluster (the other is our grid). 29 | foreach($grid as $source) 30 | if (isset($source['CLUSTER']) and $source['CLUSTER']) 31 | { 32 | $standalone = 1; 33 | $context = "cluster"; 34 | # Need to refresh data with new context. 35 | Gmetad($conf['ganglia_ip'], $conf['ganglia_port']); 36 | $clustername = $source['NAME']; 37 | } 38 | } 39 | 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /nagios/warmup_metric_cache.php: -------------------------------------------------------------------------------- 1 | $host_metrics ) { 20 | foreach ( $host_metrics as $name => $attributes ) { 21 | $new_metrics[$host][$name]['VAL'] = $metrics[$host][$name]['VAL']; 22 | if ( isset($metrics[$host][$name]['UNITS']) ) 23 | $new_metrics[$host][$name]['UNITS'] = $metrics[$host][$name]['UNITS']; 24 | } 25 | 26 | # Put host metrics in their own files as well 27 | file_put_contents($conf['nagios_cache_file'] . "_" . $host, serialize($new_metrics[$host])); 28 | 29 | } 30 | 31 | 32 | $temp_file = $conf['nagios_cache_file'] . ".temp"; 33 | file_put_contents($temp_file, serialize($new_metrics)); 34 | rename($temp_file, $conf['nagios_cache_file']); 35 | 36 | ?> 37 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001-2011, The Regents of the University of California 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the University of California nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /js/jquery.livesearch.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.extend($.expr[':'], { 3 | 'containsi': function(elem, i, match, array) { 4 | return $(elem).text().toLowerCase() 5 | .indexOf((match[3] || "").toLowerCase()) >= 0; 6 | } 7 | }); 8 | 9 | var Search = function(block) { 10 | this.callbacks = {}; 11 | block(this); 12 | } 13 | 14 | Search.prototype.all = function(fn) { this.callbacks.all = fn; } 15 | Search.prototype.reset = function(fn) { this.callbacks.reset = fn; } 16 | Search.prototype.empty = function(fn) { this.callbacks.empty = fn; } 17 | Search.prototype.results = function(fn) { this.callbacks.results = fn; } 18 | 19 | function query(selector) { 20 | if (val = this.val()) { 21 | return $(selector + ':containsi("' + val + '")'); 22 | } else { 23 | return false; 24 | } 25 | } 26 | 27 | $.fn.search = function search(selector, block) { 28 | var search = new Search(block); 29 | var callbacks = search.callbacks; 30 | 31 | function perform() { 32 | if (result = query.call($(this), selector)) { 33 | callbacks.all && callbacks.all.call(this, result); 34 | var method = result.size() > 0 ? 'results' : 'empty'; 35 | return callbacks[method] && callbacks[method].call(this, result); 36 | } else { 37 | callbacks.all && callbacks.all.call(this, $(selector)); 38 | return callbacks.reset && callbacks.reset.call(this); 39 | }; 40 | } 41 | 42 | $(this).live('keypress', perform); 43 | $(this).live('keydown', perform); 44 | $(this).live('keyup', perform); 45 | $(this).bind('blur', perform); 46 | } 47 | })(jQuery); 48 | -------------------------------------------------------------------------------- /css/jquery.multiselect.css: -------------------------------------------------------------------------------- 1 | .ui-multiselect { padding:2px 0 2px 4px; text-align:left } 2 | .ui-multiselect span.ui-icon { float:right } 3 | .ui-multiselect-single .ui-multiselect-checkboxes input { position:absolute !important; top: auto !important; left:-9999px; } 4 | .ui-multiselect-single .ui-multiselect-checkboxes label { padding:5px !important } 5 | 6 | .ui-multiselect-header { margin-bottom:3px; padding:3px 0 3px 4px } 7 | .ui-multiselect-header ul { font-size:0.9em } 8 | .ui-multiselect-header ul li { float:left; padding:0 10px 0 0 } 9 | .ui-multiselect-header a { text-decoration:none } 10 | .ui-multiselect-header a:hover { text-decoration:underline } 11 | .ui-multiselect-header span.ui-icon { float:left } 12 | .ui-multiselect-header li.ui-multiselect-close { float:right; text-align:right; padding-right:0 } 13 | 14 | .ui-multiselect-menu { display:none; padding:3px; position:absolute; z-index:10000 } 15 | .ui-multiselect-checkboxes { position:relative /* fixes bug in IE6/7 */; overflow-y:scroll } 16 | .ui-multiselect-checkboxes label { cursor:default; display:block; border:1px solid transparent; padding:3px 1px } 17 | .ui-multiselect-checkboxes label input { position:relative; top:1px } 18 | .ui-multiselect-checkboxes li { clear:both; font-size:0.9em; padding-right:3px } 19 | .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label { text-align:center; font-weight:bold; border-bottom:1px solid } 20 | .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label a { display:block; padding:3px; margin:1px 0; text-decoration:none } 21 | 22 | /* remove label borders in IE6 because IE6 does not support transparency */ 23 | * html .ui-multiselect-checkboxes label { border:none } 24 | -------------------------------------------------------------------------------- /js/jquery.multiselect.filter.css: -------------------------------------------------------------------------------- 1 | .ui-multiselect { padding:2px 0 2px 4px; text-align:left } 2 | .ui-multiselect span.ui-icon { float:right } 3 | .ui-multiselect-single .ui-multiselect-checkboxes input { position:absolute !important; top: auto !important; left:-9999px; } 4 | .ui-multiselect-single .ui-multiselect-checkboxes label { padding:5px !important } 5 | 6 | .ui-multiselect-header { margin-bottom:3px; padding:3px 0 3px 4px } 7 | .ui-multiselect-header ul { font-size:0.9em } 8 | .ui-multiselect-header ul li { float:left; padding:0 10px 0 0 } 9 | .ui-multiselect-header a { text-decoration:none } 10 | .ui-multiselect-header a:hover { text-decoration:underline } 11 | .ui-multiselect-header span.ui-icon { float:left } 12 | .ui-multiselect-header li.ui-multiselect-close { float:right; text-align:right; padding-right:0 } 13 | 14 | .ui-multiselect-menu { display:none; padding:3px; position:absolute; z-index:10000; text-align: left } 15 | .ui-multiselect-checkboxes { position:relative /* fixes bug in IE6/7 */; overflow-y:auto } 16 | .ui-multiselect-checkboxes label { cursor:default; display:block; border:1px solid transparent; padding:3px 1px } 17 | .ui-multiselect-checkboxes label input { position:relative; top:1px } 18 | .ui-multiselect-checkboxes li { clear:both; font-size:0.9em; padding-right:3px } 19 | .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label { text-align:center; font-weight:bold; border-bottom:1px solid } 20 | .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label a { display:block; padding:3px; margin:1px 0; text-decoration:none } 21 | 22 | /* remove label borders in IE6 because IE6 does not support transparency */ 23 | * html .ui-multiselect-checkboxes label { border:none } 24 | -------------------------------------------------------------------------------- /graph.d/nfs_v3_client_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "nfs_v3_client_report", 3 | "report_type" : "standard", 4 | "title" : "NFS V3 Client", 5 | "vertical_label" : "ops/sec", 6 | "series" : [ 7 | { "metric": "nfs_v3_read", "color": "ff8a60", "label": "Read", "line_width": "2", "type": "stack" }, 8 | { "metric": "nfs_v3_write", "color": "dd0000", "label": "Write", "line_width": "2", "type": "stack" }, 9 | { "metric": "nfs_v3_remove", "color": "CC6600", "label": "Remove", "line_width": "2", "type": "stack" }, 10 | { "metric": "nfs_v3_access", "color": "3333bb", "label": "Access", "line_width": "2", "type": "stack" }, 11 | { "metric": "nfs_v3_getattr", "color": "ffea00", "label": "GetAttr", "line_width": "2", "type": "stack" }, 12 | { "metric": "nfs_v3_setattr", "color": "ccffff", "label": "SetAttr", "line_width": "2", "type": "stack" }, 13 | { "metric": "nfs_v3_readdir", "color": "CC33FF", "label": "ReadDir", "line_width": "2", "type": "stack" }, 14 | { "metric": "nfs_v3_readdirplus", "color": "cccc99", "label": "ReadDirPlus", "line_width": "2", "type": "stack" }, 15 | { "metric": "nfs_v3_lookup", "color": "ccff33", "label": "Lookup", "line_width": "2", "type": "stack" }, 16 | { "metric": "nfs_v3_readlink", "color": "ff99ff", "label": "ReadLink", "line_width": "2", "type": "stack" }, 17 | { "metric": "nfs_v3_fsinfo", "color": "33CCFF", "label": "Fsinfo", "line_width": "2", "type": "stack" }, 18 | { "metric": "nfs_v3_create", "color": "00FFCC", "label": "Create", "line_width": "2", "type": "stack" }, 19 | { "metric": "nfs_v3_mkdir", "color": "2A9E22", "label": "Mkdir", "line_width": "2", "type": "stack" } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /nagios/check_multiple_metrics_warn.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_multiple_metrics_warn.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Please provide arguments for host and checks, with check argument being a metric name, warning operator, warning value, critical operator, critical value" 31 | echo "Sample invocation $0 host=localhost.localdomain checks='load_one,more,1,more,2:load_five,more,2,more,4'" 32 | exit 1 33 | fi 34 | 35 | RESULT=`curl -s ${GANGLIA_URL}?${CHECK_ARGS}` 36 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 37 | 38 | IFS='|' 39 | for x in $EXIT_CODE; do 40 | case $x in 41 | OK) 42 | echo $RESULT 43 | exit 0;; 44 | WARNING) 45 | echo $RESULT 46 | exit 1;; 47 | CRITICAL) 48 | echo $RESULT 49 | exit 2;; 50 | *) 51 | echo $RESULT 52 | exit 3;; 53 | esac 54 | done 55 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/truncate.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : text to truncate 7 | * * length : the maximum length for the string 8 | * * etc : the characters that are added to show that the string was cut off 9 | * * break : if true, the string will be cut off at the exact length, instead of cutting at the nearest space 10 | * * middle : if true, the string will contain the beginning and the end, and the extra characters will be removed from the middle 11 | * 12 | * This software is provided 'as-is', without any express or implied warranty. 13 | * In no event will the authors be held liable for any damages arising from the use of this software. 14 | * 15 | * @author Jordi Boggiano 16 | * @copyright Copyright (c) 2008, Jordi Boggiano 17 | * @license http://dwoo.org/LICENSE Modified BSD License 18 | * @link http://dwoo.org/ 19 | * @version 1.1.0 20 | * @date 2009-07-18 21 | * @package Dwoo 22 | */ 23 | function Dwoo_Plugin_truncate(Dwoo_Core $dwoo, $value, $length=80, $etc='...', $break=false, $middle=false) 24 | { 25 | if ($length == 0) { 26 | return ''; 27 | } 28 | 29 | $value = (string) $value; 30 | $etc = (string) $etc; 31 | $length = (int) $length; 32 | 33 | if (strlen($value) < $length) { 34 | return $value; 35 | } 36 | 37 | $length = max($length - strlen($etc), 0); 38 | if ($break === false && $middle === false) { 39 | $value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length+1)); 40 | } 41 | if ($middle === false) { 42 | return substr($value, 0, $length) . $etc; 43 | } 44 | return substr($value, 0, ceil($length/2)) . $etc . substr($value, -floor($length/2)); 45 | } 46 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/strip.php: -------------------------------------------------------------------------------- 1 | 6 | * * mode : sets the content being stripped, available mode are 'default' or 'js' 7 | * for javascript, which strips the comments to prevent syntax errors 8 | * 9 | * 10 | * This software is provided 'as-is', without any express or implied warranty. 11 | * In no event will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * @author Jordi Boggiano 14 | * @copyright Copyright (c) 2008, Jordi Boggiano 15 | * @license http://dwoo.org/LICENSE Modified BSD License 16 | * @link http://dwoo.org/ 17 | * @version 1.1.0 18 | * @date 2009-07-18 19 | * @package Dwoo 20 | */ 21 | class Dwoo_Plugin_strip extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 22 | { 23 | public function init($mode = "default") 24 | { 25 | } 26 | 27 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 28 | { 29 | return ''; 30 | } 31 | 32 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 33 | { 34 | $params = $compiler->getCompiledParams($params); 35 | 36 | $mode = trim($params['mode'], '"\''); 37 | switch ($mode) { 38 | case 'js': 39 | case 'javascript': 40 | $content = preg_replace('#(? 46 | -------------------------------------------------------------------------------- /nagios/check_metric_regex.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_metric_regex.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Sample invocation $0 hreg=web|apache checks=load_one,more,1:load_five,more,2" 31 | echo " Set ignore_unknowns=1 if you want to ignore hosts that don't posses a particular metric." 32 | echo " This is useful if you want to use a catchall regex e.g. .* however some hosts lack a metric" 33 | exit 1 34 | fi 35 | 36 | RESULT=`curl -s "${GANGLIA_URL}?${CHECK_ARGS}"` 37 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 38 | 39 | REST=`echo $RESULT | cut -f2 -d'|'` 40 | for x in $EXIT_CODE; do 41 | case $x in 42 | OK) 43 | echo $REST 44 | exit 0;; 45 | WARNING) 46 | echo $REST 47 | exit 1;; 48 | CRITICAL) 49 | echo $REST 50 | exit 2;; 51 | *) 52 | echo $REST 53 | exit 3;; 54 | esac 55 | done 56 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/fetch.php: -------------------------------------------------------------------------------- 1 | 6 | * * file : path or URI of the file to read (however reading from another website is not recommended for performance reasons) 7 | * * assign : if set, the file will be saved in this variable instead of being output 8 | * 9 | * This software is provided 'as-is', without any express or implied warranty. 10 | * In no event will the authors be held liable for any damages arising from the use of this software. 11 | * 12 | * @author Jordi Boggiano 13 | * @copyright Copyright (c) 2008, Jordi Boggiano 14 | * @license http://dwoo.org/LICENSE Modified BSD License 15 | * @link http://dwoo.org/ 16 | * @version 1.1.0 17 | * @date 2009-07-18 18 | * @package Dwoo 19 | */ 20 | function Dwoo_Plugin_fetch(Dwoo_Core $dwoo, $file, $assign = null) 21 | { 22 | if ($file === '') { 23 | return; 24 | } 25 | 26 | if ($policy = $dwoo->getSecurityPolicy()) { 27 | while (true) { 28 | if (preg_match('{^([a-z]+?)://}i', $file)) { 29 | return $dwoo->triggerError('The security policy prevents you to read files from external sources.', E_USER_WARNING); 30 | } 31 | 32 | $file = realpath($file); 33 | $dirs = $policy->getAllowedDirectories(); 34 | foreach ($dirs as $dir=>$dummy) { 35 | if (strpos($file, $dir) === 0) { 36 | break 2; 37 | } 38 | } 39 | return $dwoo->triggerError('The security policy prevents you to read '.$file.'', E_USER_WARNING); 40 | } 41 | } 42 | $file = str_replace(array("\t", "\n", "\r"), array('\\t', '\\n', '\\r'), $file); 43 | 44 | $out = file_get_contents($file); 45 | 46 | if ($assign === null) { 47 | return $out; 48 | } 49 | $dwoo->assignInScope($out, $assign); 50 | } 51 | -------------------------------------------------------------------------------- /nagios/check_host_regex.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia/nagios/check_host_regex.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Sample invocation $0 hreg=web|apache checks=load_one,more,1:load_five,more,2 ignore_unknowns=0" 31 | echo " Set ignore_unknowns=1 if you want to ignore hosts that don't posses a particular metric." 32 | echo " This is useful if you want to use a catchall regex e.g. .* however some hosts lack a metric" 33 | exit 1 34 | fi 35 | 36 | RESULT=`curl -s -g "${GANGLIA_URL}?${CHECK_ARGS}"` 37 | EXIT_CODE=`echo $RESULT | cut -f1 -d'!'` 38 | REST=`echo $RESULT | cut -f2 -d'!'` 39 | for x in $EXIT_CODE; do 40 | case $x in 41 | OK) 42 | echo $REST 43 | exit 0;; 44 | WARNING) 45 | echo $REST 46 | exit 1;; 47 | CRITICAL) 48 | echo $REST 49 | exit 2;; 50 | *) 51 | echo $REST 52 | exit 3;; 53 | esac 54 | done 55 | -------------------------------------------------------------------------------- /debian/po/ja.po: -------------------------------------------------------------------------------- 1 | # Japanese translation of ganglia debconf templates. 2 | # Copyright (C) 2009 Hideki Yamane 3 | # This file is distributed under the same license as the dtc package. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia 3.1.2-3\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-10-07 06:52+0900\n" 11 | "Last-Translator: Hideki Yamane (Debian-JP) \n" 12 | "Language-Team: Japanese \n" 13 | "Language: ja\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: boolean 19 | #. Description 20 | #: ../ganglia-webfrontend.templates:2001 21 | msgid "Automatically configure apache2?" 22 | msgstr "apache2 を自動的に再設定しますか?" 23 | 24 | #. Type: boolean 25 | #. Description 26 | #: ../ganglia-webfrontend.templates:2001 27 | msgid "" 28 | "The ganglia front-end will be unavailable until a web server is configured. " 29 | "Automatic configuration can be performed for the Apache 2 web server." 30 | msgstr "" 31 | "ウェブサーバが設定されるまで、ganglia のフロントエンドは利用できません。" 32 | "Apache2 ウェブサーバは自動的に設定できます。" 33 | 34 | #. Type: boolean 35 | #. Description 36 | #: ../ganglia-webfrontend.templates:3001 37 | msgid "Restart apache2?" 38 | msgstr "apache2 を再起動しますか?" 39 | 40 | #. Type: boolean 41 | #. Description 42 | #: ../ganglia-webfrontend.templates:3001 43 | msgid "" 44 | "In order to activate the new configuration, the web server needs to be " 45 | "restarted. If you choose not to do this automatically, you should do so " 46 | "manually at the first opportunity." 47 | msgstr "" 48 | "新しい設定を有効にするため、ウェブサーバを再起動する必要があります。自動的に" 49 | "再起動を行いたくない場合は、作業可能になった際に手動で行う必要があります。" 50 | -------------------------------------------------------------------------------- /docs/ad-hoc-views.mdown: -------------------------------------------------------------------------------- 1 | Ad-hoc-views allow [views](http://sourceforge.net/apps/trac/ganglia/wiki/ganglia-web-2) to be generated on the fly by passing along the entire view configuration json as a url parameter (`ad-hoc-view`). The listing of server side defined views will be hidden with an ad-hoc one is displayed, but the functionality is otherwise identical. 2 | 3 | By default ad-hoc-views are disabled and must be enabled by setting `'ad-hoc-views' = true;` in the config. For example, a view such as: 4 | 5 | ```json 6 | { 7 | "view_name": "ad-hoc", 8 | "view_type": "standard", 9 | "items": [ 10 | { 11 | "hostname": "my-server.domain.local", 12 | "graph": "cpu_report" 13 | }, 14 | { 15 | "hostname": "my-server.domain.local", 16 | "metric": "disk_free" 17 | }, 18 | { 19 | "hostname": "my-server.domain.local", 20 | "metric": "disk_total" 21 | } 22 | ] 23 | } 24 | ``` 25 | 26 | Could be displayed with the somewhat long url: 27 | 28 | http://my-gweb.example.com/?&tab=v&r=1hr&ad-hoc-view=%7b%0a%20%20%22view_name%22%3a%20%22ad-hoc%22%2c%0a%20%20%22view_type%22%3a%20%22standard%22%2c%0a%20%20%22items%22%3a%20%5b%0a%20%20%20%20%7b%0a%20%20%20%20%20%20%22hostname%22%3a%20%22my-server.domain.local%22%2c%0a%20%20%20%20%20%20%22graph%22%3a%20%22cpu_report%22%0a%20%20%20%20%7d%2c%0a%20%20%20%20%7b%0a%20%20%20%20%20%20%22hostname%22%3a%20%22my-server.domain.local%22%2c%0a%20%20%20%20%20%20%22metric%22%3a%20%22disk_free%22%0a%20%20%20%20%7d%2c%0a%20%20%20%20%7b%0a%20%20%20%20%20%20%22hostname%22%3a%20%22my-server.domain.local%22%2c%0a%20%20%20%20%20%20%22metric%22%3a%20%22disk_total%22%0a%20%20%20%20%7d%0a%20%20%5d%0a%7d%0a 29 | 30 | If the program generating ad-hoc-views is doing so to embed inside another web application, it can also set `hide-hf=true` to hide the default header and footer. -------------------------------------------------------------------------------- /api/rundeck.php: -------------------------------------------------------------------------------- 1 | $metric_array ) { 38 | 39 | if ( isset($metric_array['os_name']['VAL']) ) { 40 | print "$node: 41 | description: Rundeck node 42 | hostname: $node 43 | nodename: $node 44 | osArch: " . $metric_array['machine_type']['VAL'] . " 45 | osFamily: unix 46 | osName: " . $metric_array['os_name']['VAL'] . " 47 | osVersion: " . $metric_array['os_release']['VAL'] . " 48 | tags: '' 49 | username: root 50 | "; 51 | } 52 | 53 | } 54 | 55 | ?> 56 | -------------------------------------------------------------------------------- /dwoo/Dwoo/ICompiler.php: -------------------------------------------------------------------------------- 1 | 15 | * @copyright Copyright (c) 2008, Jordi Boggiano 16 | * @license http://dwoo.org/LICENSE Modified BSD License 17 | * @link http://dwoo.org/ 18 | * @version 1.0.0 19 | * @date 2008-10-23 20 | * @package Dwoo 21 | */ 22 | interface Dwoo_ICompiler 23 | { 24 | /** 25 | * compiles the provided string down to php code 26 | * 27 | * @param string $templateStr the template to compile 28 | * @return string a compiled php code string 29 | */ 30 | public function compile(Dwoo_Core $dwoo, Dwoo_ITemplate $template); 31 | 32 | /** 33 | * adds the custom plugins loaded into Dwoo to the compiler so it can load them 34 | * 35 | * @see Dwoo_Core::addPlugin 36 | * @param array $customPlugins an array of custom plugins 37 | */ 38 | public function setCustomPlugins(array $customPlugins); 39 | 40 | /** 41 | * sets the security policy object to enforce some php security settings 42 | * 43 | * use this if untrusted persons can modify templates, 44 | * set it on the Dwoo object as it will be passed onto the compiler automatically 45 | * 46 | * @param Dwoo_Security_Policy $policy the security policy object 47 | */ 48 | public function setSecurityPolicy(Dwoo_Security_Policy $policy = null); 49 | } 50 | -------------------------------------------------------------------------------- /lib/GangliaAcl.php: -------------------------------------------------------------------------------- 1 | addRole( new Zend_Acl_Role(GangliaAcl::GUEST)) 30 | ->addRole( new Zend_Acl_Role(GangliaAcl::ADMIN)); 31 | 32 | // define default resources 33 | // all clusters should be children of GangliaAcl::ALL_CLUSTERS 34 | $this->add( new Zend_Acl_Resource(GangliaAcl::ALL_RESOURCES) ); 35 | $this->add( new Zend_Acl_Resource(GangliaAcl::ALL_CLUSTERS), GangliaAcl::ALL_RESOURCES); 36 | $this->add( new Zend_Acl_Resource(GangliaAcl::ALL_VIEWS), GangliaAcl::ALL_RESOURCES); 37 | 38 | // guest can view everything and edit nothing. 39 | $this->allow(GangliaAcl::GUEST, GangliaAcl::ALL_RESOURCES, GangliaAcl::VIEW); 40 | $this->deny(GangliaAcl::GUEST, GangliaAcl::ALL_RESOURCES, GangliaAcl::EDIT); 41 | 42 | $this->allow(GangliaAcl::ADMIN, GangliaAcl::ALL_RESOURCES, GangliaAcl::EDIT); 43 | $this->allow(GangliaAcl::ADMIN, GangliaAcl::ALL_RESOURCES, GangliaAcl::VIEW); 44 | } 45 | 46 | public function addPrivateCluster($cluster) { 47 | $this->add( new Zend_Acl_Resource($cluster), self::ALL_CLUSTERS ); 48 | //$this->allow(self::ADMIN, $cluster, 'edit'); 49 | $this->deny(self::GUEST, $cluster); 50 | } 51 | } 52 | ?> 53 | -------------------------------------------------------------------------------- /templates/default/decompose_graph.tpl: -------------------------------------------------------------------------------- 1 | 23 |
24 |
25 | {if $number_of_items == 0 } 26 |
27 |
28 |

29 | No graphs decomposed 30 |

31 |
32 | {else} 33 | {foreach $items item} 34 |
35 | {$item.title} 36 | 37 | 38 | 39 |
40 |
41 | {/foreach} 42 | {/if} 43 |
44 |
45 |
46 | -------------------------------------------------------------------------------- /nagios/check_ganglia_metric.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2011 The greplin-nagios-utils Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | GANGLIA_URL="http://localhost/ganglia2/nagios/check_metric.php" 18 | 19 | # Build the rest of the arguments into the arg string for the URL. 20 | CHECK_ARGS='' 21 | if [ "$#" -gt "0" ] 22 | then 23 | CHECK_ARGS=$1 24 | shift 25 | for ARG in "$@" 26 | do 27 | CHECK_ARGS=${CHECK_ARGS}"&"${ARG} 28 | done 29 | else 30 | echo "Sample invocation $0 host=localhost.localdomain metric_name=load_one operator=more critical_value=1" 31 | exit 3 32 | fi 33 | 34 | COMMAND="curl -s ${GANGLIA_URL}?${CHECK_ARGS}" 35 | RESULT=`$COMMAND` 36 | RETURN_VALUE=$? 37 | # if curl fails we should fail 38 | if [ $RETURN_VALUE -ne 0 ]; then 39 | echo "error fetching metric with command: ${COMMAND}" 40 | echo "result: $RESULT" 41 | echo "curl return_value: $RETURN_VALUE" 42 | exit 3 43 | fi 44 | 45 | EXIT_CODE=`echo $RESULT | cut -f1 -d'|'` 46 | 47 | IFS='|' 48 | for x in $EXIT_CODE; do 49 | case $x in 50 | OK) 51 | echo $RESULT 52 | exit 0;; 53 | WARNING) 54 | echo $RESULT 55 | exit 1;; 56 | CRITICAL) 57 | echo $RESULT 58 | exit 2;; 59 | *) 60 | echo $RESULT 61 | exit 3;; 62 | esac 63 | done 64 | 65 | # If we got no results that is an error in and of itself 66 | echo "UNKNOWN: no result from ganglia" 67 | exit 3 68 | -------------------------------------------------------------------------------- /debian/po/et.po: -------------------------------------------------------------------------------- 1 | # Gangila Estonian translation 2 | # 3 | # Copyright (C) 2009 4 | # This file is distributed under the same license as the gangila package. 5 | # Mattias Põldaru , 2009. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: gangila\n" 10 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 12 | "PO-Revision-Date: 2009-08-06 23:55+0300\n" 13 | "Last-Translator: Mattias Põldaru \n" 14 | "Language-Team: Gnome Estonian Translation Team \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Kas automaatselt seadistada apache2?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "Gangila kasutajaliides pole saadaval kuni veebiserver on häälestatud. Apache " 34 | "2 veebiserveri jaoks saab teha automaatse häälestuse." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Kas taaskäivitada apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Uue häälestuse rakendamiseks tuleb veebiserver taaskäivitada. Kui sa seda " 51 | "automaatselt ei soovi teha, peaksid esimesel võimalusel veebiserveri käsitsi " 52 | "taaskäivitama." 53 | -------------------------------------------------------------------------------- /debian/po/vi.po: -------------------------------------------------------------------------------- 1 | # Vietnamese translation for Ganglia. 2 | # Copyright © 2009 Free Software Foundation, Inc. 3 | # Clytie Siddall , 2009. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia 3.1.2-3\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-09-22 23:55+0930\n" 11 | "Last-Translator: Clytie Siddall \n" 12 | "Language-Team: Vietnamese \n" 13 | "Language: vi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | "X-Generator: LocFactoryEditor 1.8\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Tự động cấu hình apache2 ?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "Giao diện ganglia vẫn còn không sẵn sàng dùng đến khi một trình phục vụ Web " 34 | "được cấu hình. Có khả năng tự động cấu hình trình phục vụ Web Apache 2." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Khởi chạy lại apache2 ?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Để kích hoạt cấu hình mới, trình phục vụ Web cần được khởi chạy lại. Nếu bạn " 51 | "không chọn tự động làm việc này, có nên tự làm đó vào lúc sớm nhất." 52 | -------------------------------------------------------------------------------- /dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php: -------------------------------------------------------------------------------- 1 | Agavi specific plugin 5 | * 6 | * uses AgaviRouting to create an url 7 | * 8 | *
 9 |  *  * route : the route name, optional (by default the current url is returned)
10 |  *  * params : an array with variables to build the route, optional
11 |  *  * options : an array of options to pass to the routing object, optional
12 |  *  * rest : for convenience, you can just pass named parameters that will be used as
13 |  *           the params array, but you must not provide the params array in this case
14 |  * 
15 | * 16 | * Examples: 17 | * 18 | * {a url("route.name" array(param="Value", param2=$otherVal))}Here is a link{/a} 19 | * {* without any parameter it just returns the current url *} 20 | * 21 | * 22 | * This software is provided 'as-is', without any express or implied warranty. 23 | * In no event will the authors be held liable for any damages arising from the use of this software. 24 | * 25 | * @author Jordi Boggiano 26 | * @copyright Copyright (c) 2008, Jordi Boggiano 27 | * @license http://dwoo.org/LICENSE Modified BSD License 28 | * @link http://dwoo.org/ 29 | * @version 1.0.0 30 | * @date 2008-10-23 31 | * @package Dwoo 32 | */ 33 | function Dwoo_Plugin_url_compile(Dwoo_Compiler $compiler, $route = null, $params = null, $options = null, array $rest = array()) 34 | { 35 | if ($params == 'null') { 36 | if (count($rest)) { 37 | $params = array(); 38 | foreach ($rest as $k=>$v) { 39 | if (is_numeric($k)) { 40 | $params[] = $k.'=>'.$v; 41 | } else { 42 | $params[] = '"'.$k.'"=>'.$v; 43 | } 44 | } 45 | $params = 'array('.implode(', ', $params).')'; 46 | } else { 47 | $params = 'array()'; 48 | } 49 | } 50 | if ($options == 'null') { 51 | $options = 'array()'; 52 | } 53 | return '$this->data[\'ro\']->gen('.$route.', '.$params.', '.$options.')'; 54 | } -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | General 2 | 3 | - Add back the Ganglia logo 4 | - Provide an easy method for user to add their organization's logo 5 | - Centralize sanitization of user input (Extract this from get_context.php and graph.php, no other scripts 6 | should use $_GET directly) 7 | - Make indentation consistent - mixed usage of 2 spaces, 3 spaces, 4 spaces, or tabs makes code harder to read 8 | - In Cluster Report, when one clicks on the text box besides "Metric", it should bring up a dropbox with a 9 | list of paginated metrics and continue to show metric name hints as you type 10 | 11 | Graphs 12 | 13 | Views 14 | 15 | - Support regex expressions for metrics in regex views 16 | Suggestions from Ben Hartshorne. 17 | - Color code by host or metric, so as to easily differentiate 18 | - Do something else to sort by host or metric, such as all metrics from a specific host in a row 19 | - group by metric or group by host - right now it lists all hosts metric A, then all hosts metric B (when 20 | using the regex) 21 | 22 | Caching 23 | 24 | - Figure out a better way to cache metrics 25 | - Avoid race conditions 26 | 27 | Mobile 28 | 29 | - Add ability to specify arbitrary time ranges 30 | - Add support for multi-touch enlarging of graphs 31 | - Allow hosts to be named the same in multiple clusters (right now they are filtered out) 32 | - Mobile browser detection code to automatically use mobile version 33 | - Clicking on a metric search result should bring up the host page anchoring at the 34 | metric graph in question 35 | - Add ability to add metrics to views 36 | - Implement "refresh" for pages to prevent stale data from being displayed via ajax 37 | - Fix XSS vuln. in input handling (See general 'Centralize sanitization' task above) 38 | 39 | Graphite 40 | 41 | - Add polish to Graphite integration 42 | - Fix CPU report for Cluster summary. Needs to be "scaled" by number of nodes 43 | 44 | Documentation 45 | 46 | - Add user guide 47 | - Add installation guide (expand on README) 48 | - Add templating guide 49 | -------------------------------------------------------------------------------- /templates/default/physical_view.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 14 | 15 | 19 | 20 | 24 | 25 | 26 | 27 | 43 |
{$cluster} cluster - Physical View | 4 | Columns  {$cols_menu} 5 |
9 | Verbosity level (Lower is more compact):
10 | {foreach $verbosity_levels verbosity checked} 11 | {$verbosity}   12 | {/foreach} 13 |
16 | Total CPUs: {$CPUs}
17 | Total Memory: {$Memory}
18 |
21 | Total Disk: {$Disk}
22 | Most Full Disk: {$most_full}
23 |
28 | 29 | 30 | 31 | {foreach $racks rack} 32 | 38 | {$rack.tr} 39 | {/foreach} 40 |
33 | 34 | {$rack.RackID} 35 | {$rack.nodes} 36 |
37 |
41 | 42 |
44 | 45 |
46 | 47 | 48 | 49 | 50 | 55 | 56 | 57 | 80 | 81 |
51 | 52 | Legend 53 | 54 |
58 | 59 | 60 | 61 | 70 | 76 | 77 |
Node Name 
62 | 63 | 64 | 67 | 68 |
65 | 1-min load 66 |
69 |
71 | 72 | cpu: CPU clock (GHz) (num CPUs)
73 | mem: Total Memory (GB) 74 |
75 |
78 | 79 |
82 | -------------------------------------------------------------------------------- /debian/po/fi.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 2 | # This file is distributed under the same license as the ganglia package. 3 | # 4 | # Esko Arajärvi , 2009. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-07-30 20:28+0300\n" 11 | "Last-Translator: Esko Arajärvi \n" 12 | "Language-Team: Finnish \n" 13 | "Language: fi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: Lokalize 0.3\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Tehdäänkö apache2:n asetukset automaattisesti?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "ganglia-käyttöliittymää ei voi käyttää ennen kuin verkkopalvelimen asetukset " 34 | "on tehty. Apache 2 -verkkopalvelimen asetukset voidaan tehdä automaattisesti." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Käynnistetäänkö apache2 uudelleen?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Verkkopalvelin täytyy käynnistää uudelleen uusien asetusten ottamiseksi " 51 | "käyttöön. Jos et halua tehdä tätä automaattisesti, tee se käsin " 52 | "mahdollisimman pian." 53 | -------------------------------------------------------------------------------- /debian/po/gl.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 Debian 2 | # This file is distributed under the same license as the ganglia package. 3 | # 4 | # Marce Villarino , 2009. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-11-09 20:30+0100\n" 11 | "Last-Translator: Marce Villarino \n" 12 | "Language-Team: Galician \n" 13 | "Language: gl\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: Lokalize 1.0\n" 18 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Desexa configurar automaticamente apache2?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "A interface de ganglia non estará dispoñíbel até que se configure un " 34 | "servidor web. Pode facerse unha configuración automática para o servidor web " 35 | "Apache 2." 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../ganglia-webfrontend.templates:3001 40 | msgid "Restart apache2?" 41 | msgstr "Desexa reiniciar apache2?" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../ganglia-webfrontend.templates:3001 46 | msgid "" 47 | "In order to activate the new configuration, the web server needs to be " 48 | "restarted. If you choose not to do this automatically, you should do so " 49 | "manually at the first opportunity." 50 | msgstr "" 51 | "Para activar a nova configuración precísase reiniciar o servidor web. Se " 52 | "escolle non facelo automaticamente debería facelo á mao á primeira " 53 | "oportunidade." 54 | -------------------------------------------------------------------------------- /grid_tree.php: -------------------------------------------------------------------------------- 1 | assign("self", "$self"); 6 | 7 | # Not as complicated as before. No depth-first-search, and 8 | # we only show our immediate children. 9 | 10 | # Publish past grids in our stack. 11 | $ancestors = $gridstack; 12 | # Take ourself off the end of the stack. 13 | array_pop($ancestors); 14 | 15 | if (count($ancestors)) { 16 | $data->assign("parentgrid", 1); 17 | $parentgridtable = ""; 18 | 19 | $parentgridstack = array(); 20 | foreach ($ancestors as $g) { 21 | list($name, $link) = explode("@", $g); 22 | $parentgridstack[] = $g; 23 | $parentgridstack_url = rawurlencode(join(">", $parentgridstack)); 24 | $parentgridtable .= "". 25 | "$name\n"; 26 | } 27 | 28 | $data->assign("parents", $parentgridtable); 29 | } 30 | 31 | $gridtable=""; 32 | 33 | # Publish our children. 34 | if ($n = count($grid)) 35 | { 36 | $data->assign("n", $n); 37 | foreach ($grid as $source => $attrs) 38 | { 39 | if ($source == $self) continue; 40 | 41 | if (isset($grid[$source]['GRID']) and $grid[$source]['GRID']) 42 | { 43 | # This child is a grid. 44 | $url = $grid[$source]['AUTHORITY'] . "?t=yes&gw=fwd&gs=$gridstack_url"; 45 | $gridtable .= "$source"; 46 | } 47 | else 48 | { 49 | # A cluster. 50 | $url = "./?c=". rawurlencode($source) ."&$get_metric_string"; 51 | $gridtable .= "$source"; 52 | } 53 | } 54 | $gridtable .= ""; 55 | } 56 | 57 | $data->assign("children", $gridtable); 58 | 59 | $dwoo->output($tpl, $data); 60 | 61 | ?> 62 | -------------------------------------------------------------------------------- /debian/po/da.po: -------------------------------------------------------------------------------- 1 | # Danish translation ganglia. 2 | # Copyright (C) 2010 ganglia og nedenstående oversættere. 3 | # This file is distributed under the same license as ganglia package. 4 | # Joe Hansen , 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2010-11-28 17:30+01:00\n" 12 | "Last-Translator: Joe Hansen \n" 13 | "Language-Team: Danish \n" 14 | "Language: da\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "Konfigurer automatisk apache2?" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | "Brugergrænsefladen til ganglia vil være utilgængelig indtil en " 33 | "internetserver er konfigureret. Automatisk konfiguration kan udføres for " 34 | "Apache 2-internetserveren." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Genstart apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "For at aktivere den nye konfiguration, skal internetserveren genstartes. " 51 | "Hvis du vælger ikke at gøre dette automatisk, bør du gøre dette manuelt, ved " 52 | "den første lejlighed som byder sig." 53 | -------------------------------------------------------------------------------- /breakdown_reports.php: -------------------------------------------------------------------------------- 1 | 54 | 55 | Host regex: 56 | Metric 57 | 58 | 59 |
60 |
61 | 67 | -------------------------------------------------------------------------------- /debian/po/de.po: -------------------------------------------------------------------------------- 1 | # Translation of ganglia debconf templates to German 2 | # Copyright (C) Helge Kreutzmann , 2009. 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia 3.1.2-3\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-08-03 17:43+0200\n" 11 | "Last-Translator: Helge Kreutzmann \n" 12 | "Language-Team: de \n" 13 | "Language: \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: boolean 19 | #. Description 20 | #: ../ganglia-webfrontend.templates:2001 21 | msgid "Automatically configure apache2?" 22 | msgstr "Apache2 automatisch konfigurieren?" 23 | 24 | #. Type: boolean 25 | #. Description 26 | #: ../ganglia-webfrontend.templates:2001 27 | msgid "" 28 | "The ganglia front-end will be unavailable until a web server is configured. " 29 | "Automatic configuration can be performed for the Apache 2 web server." 30 | msgstr "" 31 | "Die Oberfläche von Ganglia ist nicht verfügbar, solange kein Webserver " 32 | "konfiguriert wurde. Der Webserver Apache 2 kann automatisch konfiguriert " 33 | "werden." 34 | 35 | #. Type: boolean 36 | #. Description 37 | #: ../ganglia-webfrontend.templates:3001 38 | msgid "Restart apache2?" 39 | msgstr "Apache2 neustarten?" 40 | 41 | #. Type: boolean 42 | #. Description 43 | #: ../ganglia-webfrontend.templates:3001 44 | msgid "" 45 | "In order to activate the new configuration, the web server needs to be " 46 | "restarted. If you choose not to do this automatically, you should do so " 47 | "manually at the first opportunity." 48 | msgstr "" 49 | "Um die neue Konfiguration zu aktivieren, muss der Webserver neu gestartet " 50 | "werden. Falls Sie dies nicht automatisch durchführen lassen, sollten Sie es " 51 | "bei der nächsten Möglichkeit manuell durchführen." 52 | -------------------------------------------------------------------------------- /debian/po/it.po: -------------------------------------------------------------------------------- 1 | # ITALIAN TRANSLATION FOR GANGLIA'S PO-DEBCONF FILE. 2 | # COPYRIGHT (C) 2009 THE GANGLIA'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Vincenzo Campanella , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia 3.1.2-3\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-11-13 16:24+0100\n" 12 | "Last-Translator: Vincenzo Campanella \n" 13 | "Language-Team: Italian \n" 14 | "Language: it\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "Configurare apache2 automaticamente?" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | "L'interfaccia ganglia non sarà disponibile finché non sarà stato configurato " 33 | "un server web. La configurazione automatica può essere eseguita per il " 34 | "server web Apache 2." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Riavviare apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Per attivare la nuova configurazione è necessario riavviare il server web. " 51 | "Se non si effettua tale riavvio adesso, lo si dovrebbe fare manualmente alla " 52 | "prima occasione possibile." 53 | -------------------------------------------------------------------------------- /debian/po/pt.po: -------------------------------------------------------------------------------- 1 | # translation of ganglia debconf to Portuguese 2 | # Copyright (C) 2009 the ganglia's copyright holder 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Am??rico Monteiro , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia 3.1.2-3\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-07-30 00:45+0100\n" 12 | "Last-Translator: Am??rico Monteiro \n" 13 | "Language-Team: Portuguese \n" 14 | "Language: pt\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "Configurar o apache2 automaticamente?" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | "O 'front-end' ganglia estar?? indispon??vel at?? que um servidor web esteja " 33 | "configurado. Pode ser realizada uma configura????o autom??tica para o " 34 | "servidor web apache 2." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Reiniciar o apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "De modo a activar a nova configura????o, o servidor web precisa ser " 51 | "reiniciado. Se voc?? escolher n??o fazer isto automaticamente, dever?? faz??-" 52 | "lo manualmente na primeira oportunidade." 53 | -------------------------------------------------------------------------------- /debian/po/sv.po: -------------------------------------------------------------------------------- 1 | # Translation of ganglia debconf template to Swedish 2 | # Copyright (C) 2009 Martin Bagge 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Martin Bagge , 2009 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-07-29 22:52+0100\n" 12 | "Last-Translator: Martin Bagge \n" 13 | "Language-Team: Swedish \n" 14 | "Language: sv\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=utf-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Poedit-Language: Swedish\n" 19 | "X-Poedit-Country: Sweden\n" 20 | 21 | #. Type: boolean 22 | #. Description 23 | #: ../ganglia-webfrontend.templates:2001 24 | msgid "Automatically configure apache2?" 25 | msgstr "Ska inställningar för apache2 göras?" 26 | 27 | #. Type: boolean 28 | #. Description 29 | #: ../ganglia-webfrontend.templates:2001 30 | msgid "" 31 | "The ganglia front-end will be unavailable until a web server is configured. " 32 | "Automatic configuration can be performed for the Apache 2 web server." 33 | msgstr "" 34 | "Det finns inget användargränssnitt innan korrekta inställningar för en " 35 | "webbserver gjorts. Detta kan göras automatiskt för webbservern Apache 2." 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../ganglia-webfrontend.templates:3001 40 | msgid "Restart apache2?" 41 | msgstr "Starta om apache2?" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../ganglia-webfrontend.templates:3001 46 | msgid "" 47 | "In order to activate the new configuration, the web server needs to be " 48 | "restarted. If you choose not to do this automatically, you should do so " 49 | "manually at the first opportunity." 50 | msgstr "" 51 | "För att aktivera de nya inställningarna måste webbservern startas om. Om du " 52 | "väljer att inte göra detta automatisk måste du göra det manuellt så fort som " 53 | "möjligt." 54 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/auto_escape.php: -------------------------------------------------------------------------------- 1 | 6 | * * enabled : if set to "on", "enable", true or 1 then the compiler autoescaping is enabled inside this block. set to "off", "disable", false or 0 to disable it 7 | * 8 | * This software is provided 'as-is', without any express or implied warranty. 9 | * In no event will the authors be held liable for any damages arising from the use of this software. 10 | * 11 | * @author Jordi Boggiano 12 | * @copyright Copyright (c) 2008, Jordi Boggiano 13 | * @license http://dwoo.org/LICENSE Modified BSD License 14 | * @link http://dwoo.org/ 15 | * @version 1.0.0 16 | * @date 2008-10-23 17 | * @package Dwoo 18 | */ 19 | class Dwoo_Plugin_auto_escape extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block 20 | { 21 | protected static $stack = array(); 22 | 23 | public function init($enabled) 24 | { 25 | } 26 | 27 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 28 | { 29 | $params = $compiler->getCompiledParams($params); 30 | switch(strtolower(trim((string) $params['enabled'], '"\''))) { 31 | 32 | case 'on': 33 | case 'true': 34 | case 'enabled': 35 | case 'enable': 36 | case '1': 37 | $enable = true; 38 | break; 39 | case 'off': 40 | case 'false': 41 | case 'disabled': 42 | case 'disable': 43 | case '0': 44 | $enable = false; 45 | break; 46 | default: 47 | throw new Dwoo_Compilation_Exception($compiler, 'Auto_Escape : Invalid parameter ('.$params['enabled'].'), valid parameters are "enable"/true or "disable"/false'); 48 | 49 | } 50 | 51 | self::$stack[] = $compiler->getAutoEscape(); 52 | $compiler->setAutoEscape($enable); 53 | return ''; 54 | } 55 | 56 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 57 | { 58 | $compiler->setAutoEscape(array_pop(self::$stack)); 59 | return $content; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /js/jquery.livesearch.min.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.liveSearch=function(conf){var config=jQuery.extend({url:'/search-results.php?q=',id:'jquery-live-search',duration:400,typeDelay:200,loadingClass:'loading',onSlideUp:function(){},uptadePosition:false},conf);var liveSearch=jQuery('#'+config.id);if(!liveSearch.length){liveSearch=jQuery('
').appendTo(document.body).hide().slideUp(0);jQuery(document.body).click(function(event){var clicked=jQuery(event.target);if(!(clicked.is('#'+config.id)||clicked.parents('#'+config.id).length||clicked.is('input'))){liveSearch.slideUp(config.duration,function(){config.onSlideUp()})}})}return this.each(function(){var input=jQuery(this).attr('autocomplete','off');var liveSearchPaddingBorderHoriz=parseInt(liveSearch.css('paddingLeft'),10)+parseInt(liveSearch.css('paddingRight'),10)+parseInt(liveSearch.css('borderLeftWidth'),10)+parseInt(liveSearch.css('borderRightWidth'),10);var repositionLiveSearch=function(){var tmpOffset=input.offset();var inputDim={left:tmpOffset.left,top:tmpOffset.top,width:input.outerWidth(),height:input.outerHeight()};inputDim.topPos=inputDim.top+inputDim.height;inputDim.totalWidth=inputDim.width-liveSearchPaddingBorderHoriz;liveSearch.css({position:'absolute',left:inputDim.left+'px',top:inputDim.topPos+'px',width:inputDim.totalWidth+'px'})};var showLiveSearch=function(){repositionLiveSearch();$(window).unbind('resize',repositionLiveSearch);$(window).bind('resize',repositionLiveSearch);liveSearch.slideDown(config.duration)};var hideLiveSearch=function(){liveSearch.slideUp(config.duration,function(){config.onSlideUp()})};input.focus(function(){if(this.value!==''){if(liveSearch.html()==''){this.lastValue='';input.keyup()}else{setTimeout(showLiveSearch,1)}}}).keyup(function(){if(this.value!=this.lastValue){input.addClass(config.loadingClass);var q=this.value;if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(function(){jQuery.get(config.url+q,function(data){input.removeClass(config.loadingClass);if(data.length&&q.length){liveSearch.html(data);showLiveSearch()}else{hideLiveSearch()}})},config.typeDelay);this.lastValue=this.value}})})}; -------------------------------------------------------------------------------- /debian/po/eu.po: -------------------------------------------------------------------------------- 1 | # translation of ganglia-templates.po to Euskara 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Piarres Beobide , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia-templates\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-08-04 09:47+0200\n" 12 | "Last-Translator: Piarres Beobide \n" 13 | "Language-Team: Euskara \n" 14 | "Language: \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #. Type: boolean 22 | #. Description 23 | #: ../ganglia-webfrontend.templates:2001 24 | msgid "Automatically configure apache2?" 25 | msgstr "Automatikoki konfiguratu apache2?" 26 | 27 | #. Type: boolean 28 | #. Description 29 | #: ../ganglia-webfrontend.templates:2001 30 | msgid "" 31 | "The ganglia front-end will be unavailable until a web server is configured. " 32 | "Automatic configuration can be performed for the Apache 2 web server." 33 | msgstr "" 34 | "Ganglia interfazea ez da eskuragarri egongo web-zerbitzaria konfiguratzen " 35 | "den arte. Apache2 web-zerbitzariaren konfigurazio automatikoa egin daiteke." 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../ganglia-webfrontend.templates:3001 40 | msgid "Restart apache2?" 41 | msgstr "Berrabiarazi apache2?" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../ganglia-webfrontend.templates:3001 46 | msgid "" 47 | "In order to activate the new configuration, the web server needs to be " 48 | "restarted. If you choose not to do this automatically, you should do so " 49 | "manually at the first opportunity." 50 | msgstr "" 51 | "Konfigurazio berriak eragin izan dezan, web-zerbitzaria berrabiarazi egin " 52 | "behar da. Hau automatikoki egitea ala ez hautatu dezakezu baina aukera duzun " 53 | "bezain laster egitea gomendatzen da." 54 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/date_format.php: -------------------------------------------------------------------------------- 1 | 6 | * * value : the date, as a unix timestamp, mysql datetime or whatever strtotime() can parse 7 | * * format : output format, see {@link http://php.net/strftime} for details 8 | * * default : a default timestamp value, if the first one is empty 9 | * 10 | * This software is provided 'as-is', without any express or implied warranty. 11 | * In no event will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * @author Jordi Boggiano 14 | * @copyright Copyright (c) 2008, Jordi Boggiano 15 | * @license http://dwoo.org/LICENSE Modified BSD License 16 | * @link http://dwoo.org/ 17 | * @version 1.0.1 18 | * @date 2008-12-24 19 | * @package Dwoo 20 | */ 21 | function Dwoo_Plugin_date_format(Dwoo_Core $dwoo, $value, $format='%b %e, %Y', $default=null) 22 | { 23 | if (!empty($value)) { 24 | // convert if it's not a valid unix timestamp 25 | if (preg_match('#^-?\d{1,10}$#', $value)===0) { 26 | $value = strtotime($value); 27 | } 28 | } elseif (!empty($default)) { 29 | // convert if it's not a valid unix timestamp 30 | if (preg_match('#^-?\d{1,10}$#', $default)===0) { 31 | $value = strtotime($default); 32 | } else { 33 | $value = $default; 34 | } 35 | } else { 36 | return ''; 37 | } 38 | 39 | // Credits for that windows compat block to Monte Ohrt who made smarty's date_format plugin 40 | if (DIRECTORY_SEPARATOR == '\\') { 41 | $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T'); 42 | $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S'); 43 | if (strpos($format, '%e') !== false) { 44 | $_win_from[] = '%e'; 45 | $_win_to[] = sprintf('%\' 2d', date('j', $value)); 46 | } 47 | if (strpos($format, '%l') !== false) { 48 | $_win_from[] = '%l'; 49 | $_win_to[] = sprintf('%\' 2d', date('h', $value)); 50 | } 51 | $format = str_replace($_win_from, $_win_to, $format); 52 | } 53 | return strftime($format, $value); 54 | } 55 | -------------------------------------------------------------------------------- /lib/Zend/Acl/Role.php: -------------------------------------------------------------------------------- 1 | _roleId = (string) $roleId; 53 | } 54 | 55 | /** 56 | * Defined by Zend_Acl_Role_Interface; returns the Role identifier 57 | * 58 | * @return string 59 | */ 60 | public function getRoleId() 61 | { 62 | return $this->_roleId; 63 | } 64 | 65 | /** 66 | * Defined by Zend_Acl_Role_Interface; returns the Role identifier 67 | * Proxies to getRoleId() 68 | * 69 | * @return string 70 | */ 71 | public function __toString() 72 | { 73 | return $this->getRoleId(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /debian/po/ru.po: -------------------------------------------------------------------------------- 1 | # translation of ru.po to Russian 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Yuri Kozlov , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia 3.1.2-3\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-08-10 20:34+0400\n" 12 | "Last-Translator: Yuri Kozlov \n" 13 | "Language-Team: Russian \n" 14 | "Language: ru\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 21 | 22 | #. Type: boolean 23 | #. Description 24 | #: ../ganglia-webfrontend.templates:2001 25 | msgid "Automatically configure apache2?" 26 | msgstr "Настроить apache2 автоматически?" 27 | 28 | #. Type: boolean 29 | #. Description 30 | #: ../ganglia-webfrontend.templates:2001 31 | msgid "" 32 | "The ganglia front-end will be unavailable until a web server is configured. " 33 | "Automatic configuration can be performed for the Apache 2 web server." 34 | msgstr "" 35 | "Пользовательский интерфейс ganglia будет недоступен до тех пор, пока не " 36 | "настроен веб-сервер. Для веб-сервера Apache 2 возможна автоматическая " 37 | "настройка." 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../ganglia-webfrontend.templates:3001 42 | msgid "Restart apache2?" 43 | msgstr "Перезапустить apache2?" 44 | 45 | #. Type: boolean 46 | #. Description 47 | #: ../ganglia-webfrontend.templates:3001 48 | msgid "" 49 | "In order to activate the new configuration, the web server needs to be " 50 | "restarted. If you choose not to do this automatically, you should do so " 51 | "manually at the first opportunity." 52 | msgstr "" 53 | "Чтобы новая настройка начала действовать, требуется перезапустить веб-" 54 | "сервер. Если вы не выберите автоматический перезапуск, то сделайте это " 55 | "вручную при первой возможности." 56 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/blocks/elseif.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright Copyright (c) 2008, Jordi Boggiano 12 | * @license http://dwoo.org/LICENSE Modified BSD License 13 | * @link http://dwoo.org/ 14 | * @version 1.0.0 15 | * @date 2008-10-23 16 | * @package Dwoo 17 | */ 18 | class Dwoo_Plugin_elseif extends Dwoo_Plugin_if implements Dwoo_ICompilable_Block, Dwoo_IElseable 19 | { 20 | public function init(array $rest) 21 | { 22 | } 23 | 24 | public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) 25 | { 26 | $preContent = ''; 27 | while (true) { 28 | $preContent .= $compiler->removeTopBlock(); 29 | $block =& $compiler->getCurrentBlock(); 30 | $interfaces = class_implements($block['class'], false); 31 | if (in_array('Dwoo_IElseable', $interfaces) !== false) { 32 | break; 33 | } 34 | } 35 | 36 | $params['initialized'] = true; 37 | $compiler->injectBlock($type, $params); 38 | return $preContent; 39 | } 40 | 41 | public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) 42 | { 43 | if (!isset($params['initialized'])) { 44 | return ''; 45 | } 46 | 47 | $tokens = $compiler->getParamTokens($params); 48 | $params = $compiler->getCompiledParams($params); 49 | 50 | $pre = Dwoo_Compiler::PHP_OPEN."elseif (".implode(' ', self::replaceKeywords($params['*'], $tokens['*'], $compiler)).") {\n" . Dwoo_Compiler::PHP_CLOSE; 51 | $post = Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; 52 | 53 | if (isset($params['hasElse'])) { 54 | $post .= $params['hasElse']; 55 | } 56 | 57 | $block =& $compiler->getCurrentBlock(); 58 | $block['params']['hasElse'] = $pre . $content . $post; 59 | return ''; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /debian/po/fr.po: -------------------------------------------------------------------------------- 1 | # Translation of ganglia debconf templates to French 2 | # Copyright (C) 2009 Debian French l10n team 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Translators: 6 | # Alexandre Normand , 2009 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: ganglia 3.1.2-2\n" 10 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 12 | "PO-Revision-Date: 2009-08-04 21:00+0100\n" 13 | "Last-Translator: Alexandre Normand \n" 14 | "Language-Team: French \n" 15 | "Language: fr\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Poedit-Language: French\n" 20 | "X-Poedit-Country: FRANCE\n" 21 | "X-Poedit-SourceCharset: utf-8\n" 22 | 23 | #. Type: boolean 24 | #. Description 25 | #: ../ganglia-webfrontend.templates:2001 26 | msgid "Automatically configure apache2?" 27 | msgstr "Configurer apache2 automatiquement ?" 28 | 29 | #. Type: boolean 30 | #. Description 31 | #: ../ganglia-webfrontend.templates:2001 32 | msgid "" 33 | "The ganglia front-end will be unavailable until a web server is configured. " 34 | "Automatic configuration can be performed for the Apache 2 web server." 35 | msgstr "" 36 | "L'interface ganglia sera indisponible tant qu'aucun serveur web n'aura été " 37 | "configuré. La configuration automatique peut être effectuée pour le serveur " 38 | "web Apache 2." 39 | 40 | #. Type: boolean 41 | #. Description 42 | #: ../ganglia-webfrontend.templates:3001 43 | msgid "Restart apache2?" 44 | msgstr "Redémarrer apache2 ?" 45 | 46 | #. Type: boolean 47 | #. Description 48 | #: ../ganglia-webfrontend.templates:3001 49 | msgid "" 50 | "In order to activate the new configuration, the web server needs to be " 51 | "restarted. If you choose not to do this automatically, you should do so " 52 | "manually at the first opportunity." 53 | msgstr "" 54 | "Pour que la nouvelle configuration soit prise en compte, le serveur web doit " 55 | "être redémarré. Si vous décidez de ne pas le faire maintenant, vous devriez " 56 | "le faire vous-même dès que possible." 57 | -------------------------------------------------------------------------------- /lib/Zend/Acl/Resource.php: -------------------------------------------------------------------------------- 1 | _resourceId = (string) $resourceId; 53 | } 54 | 55 | /** 56 | * Defined by Zend_Acl_Resource_Interface; returns the Resource identifier 57 | * 58 | * @return string 59 | */ 60 | public function getResourceId() 61 | { 62 | return $this->_resourceId; 63 | } 64 | 65 | /** 66 | * Defined by Zend_Acl_Resource_Interface; returns the Resource identifier 67 | * Proxies to getResourceId() 68 | * 69 | * @return string 70 | */ 71 | public function __toString() 72 | { 73 | return $this->getResourceId(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /dwoo/plugins/builtin/functions/extendsCheck.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2008, Jordi Boggiano 11 | * @license http://dwoo.org/LICENSE Modified BSD License 12 | * @link http://dwoo.org/ 13 | * @version 1.1.0 14 | * @date 2009-07-18 15 | * @package Dwoo 16 | */ 17 | function Dwoo_Plugin_extendsCheck_compile(Dwoo_Compiler $compiler, $file) 18 | { 19 | preg_match('#^["\']([a-z]{2,}):(.*?)["\']$#i', $file, $m); 20 | $resource = $m[1]; 21 | $identifier = $m[2]; 22 | 23 | $tpl = $compiler->getDwoo()->templateFactory($resource, $identifier); 24 | 25 | if ($tpl === null) { 26 | throw new Dwoo_Compilation_Exception($compiler, 'Load Templates : Resource "'.$resource.':'.$identifier.'" not found.'); 27 | } elseif ($tpl === false) { 28 | throw new Dwoo_Compilation_Exception($compiler, 'Load Templates : Resource "'.$resource.'" does not support includes.'); 29 | } 30 | 31 | 32 | $out = '\'\';// checking for modification in '.$resource.':'.$identifier."\r\n"; 33 | 34 | $modCheck = $tpl->getIsModifiedCode(); 35 | 36 | if ($modCheck) { 37 | $out .= 'if (!('.$modCheck.')) { ob_end_clean(); return false; }'; 38 | } else { 39 | $out .= 'try { 40 | $tpl = $this->templateFactory("'.$resource.'", "'.$identifier.'"); 41 | } catch (Dwoo_Exception $e) { 42 | $this->triggerError(\'Load Templates : Resource '.$resource.' was not added to Dwoo, can not extend '.$identifier.'\', E_USER_WARNING); 43 | } 44 | if ($tpl === null) 45 | $this->triggerError(\'Load Templates : Resource "'.$resource.':'.$identifier.'" was not found.\', E_USER_WARNING); 46 | elseif ($tpl === false) 47 | $this->triggerError(\'Load Templates : Resource "'.$resource.'" does not support extends.\', E_USER_WARNING); 48 | if ($tpl->getUid() != "'.$tpl->getUid().'") { ob_end_clean(); return false; }'; 49 | } 50 | 51 | return $out; 52 | } 53 | --------------------------------------------------------------------------------