ganglia / ganglia-web Goto Github PK
View Code? Open in Web Editor NEWGanglia Web Frontend
License: BSD 3-Clause "New" or "Revised" License
Ganglia Web Frontend
License: BSD 3-Clause "New" or "Revised" License
Vcpu, Vdisk, Vnetwork information can be displayed correctly, while vmem information can't.
The error is "ERROR: parameter 'a2' does not represent a number in line STACK:a2#72E500:10.50.2.13".
What's the reason?
Hi
The following was found by Raphael Geissert during checking the patch for CVE-2013-0275 on the oss-security list1.
On 8 February 2013 19:06, Vincent Danen [email protected] wrote:
A number of XSS issues were fixed in ganglia's web ui:
I've a hunch that there are a few issues with the changes. A quick
look at the patch shows that the change here breaks the preg_replace
call:
- $query_string = preg_replace("/(&trendhistory=)(\d+)/", "", $query_string);
- $query_string = preg_replace("/(&trendhistory=)(\d+)/", "",
htmlspecialchars($query_string, ENT_QUOTES) );It looks as if the htmlspecialchars call was misplaced. Not that it
is a security issue, but it's a bug.Can anyone forward this upstream? I will try to take a look at the
rest of the patch later.Cheers,
Raphael Geissert
Enabling this:
$conf['graphreport_stats'] = true;
$conf['graphreport_stat_items'] = array("now", "min", "avg", "max");
Can give all sorts of cosmetic issues:
Also with graphreport_stats enabled:
In stacked.php, the graphs don't properly stack. This is caused by off by one errors. What happens is "item1" and "item2" both use item1's value, and then "item3" uses item2's value. This is the diff of my fix:
74c74
< $c = 1;
---
> $c = 2;
77c77
< $cx = $c/(1+count($hosts));
---
> $cx = ($c-1)/(1+count($hosts));
87c87
< $c = 1;
---
> $c = 2;
I don't have the time to fork and submit a pull request unfortunately, sorry.
When setting $conf['optional_graphs'] = array('cpu','load','mem','network');
This setting only affects the "Cluster Overview", but not the "Host Overview".
As a workaround I have now unset $conf['optional_graphs'] and in stead are now using default.json and setting "included_reports". Which ironically actually does affect both Cluster Overview and Host Overview.
I believe the behavior is inconsistent and would expect similar behavior from both default.json and the $conf['optional_graphs'].
An other approach could be to remove the $conf['optional_graphs'] completely and then document that people should use defaults.json for this.
If you place spaces in the name of values in the time_ranges array it will break the web UI causing buttons to appear incorrectly.
For example this works fine:
$conf['time_ranges'] = array(
'hour'=>3600,
'2hr'=>7200,
'4hr'=>14400,
);
But this does not
$conf['time_ranges'] = array(
'hour'=>3600,
'2hr'=>7200,
'4 hr'=>14400,
);
Note the space in '4 hr'.
I've been seeing this in our setup a lot lately. Places where the legend is incorrectly attributing data to a host. In this case, the individual charts pretty clearly show that the aggregate chart is pretty badly mislabeled.
Here's all the version information captured from the bottom of the page and a screenshot.
Ganglia Web Frontend version 3.5.2
Ganglia Web Backend (gmetad) version 3.4.0
Images created with RRDtool version 1.4.7.
Powered by Dwoo 1.1.1.
The Live dashboard does not seem to support aggregated graph's from views.
If a view contains aggregated graph's, it shows: "null" and apache error log shows
ERROR: opening '/data/gmetaram/null/null/Bytes in out file servers .rrd': No such file or directory
stuff like that.
"Bytes in out file servers" is an aggregated graph
Hi all,
I tried to access graph data formatted as JSON and noticed that when using r=custom param together with ce and cs there are no datapoints returned.
render as image works fine:
graph.php?c=FRA1&h=myhost&m=cpu_system&r=custom&cs=08%2F07%2F2012+14%3A35&ce=08%2F08%2F2012+14%3A35
same as above plus json=1:
graph.php?c=FRA1&h=myhost&m=cpu_system&r=custom&cs=08%2F07%2F2012+14%3A35&ce=08%2F08%2F2012+14%3A35&json=1
output:
[{"ds_name":"sum","cluster_name":"","graph_type":"stack","host_name":"","metric_name":"perl-2.api.fra2.xing.com last custom "}]
Notice that the "datapoints" are missing.
I'm either doing something wrong or the cs/ce params are ignored in case of JSON response.
Any ideas?
Thanks and best regards,
-Frederik
When there are several graphs in a view, the column on the left side of the page is wasted space below where the list of available views finishes. Rather than using a table with a column for views and a column for graphs, I suggest putting the list of views in a div so that when it finishes, graphs can wrap around it and use the screen real estate on the left side of the browser.
Examples
It would be really nice if the composer had the option to add metric regex fields, and have each field end up being a column in the result.
This would allow users to compare various aggregate graphs that have completely different scales and thus can't be combined into one graph.
Example, one column with aggregate 1-minute load graphs, and the second column with req/s. This for multiple webservers.
Hi ganglia-web Developers!
Raphael Geissert discovered that there is still a XSS vulnerability via the view_name GET parameter in views_view.php. See 1.
Regards,
Salvatore
I noticed that some of our stacked graphs were missing hosts metrics, and it digging into the problem it appears that this only happens for hosts that exist in more than one cluster.
In looking through the stacked.php code it is reading the list of hosts to graph from ganglia_metrics.cache. If I look for the missing hosts in that file I only find data for one of the clusters they exist in. It looks like the cache isn't being updated correctly for hosts that exist in multiple clusters.
If I try to do this in conf_default.php:
$acl = GangliaAcl::getInstance();
I get a fatal error due to the missing GangliaAcl class. If I include 'lib/GangliaAcl.php' before that line, then everything works as it should.
[Mon Jul 15 16:06:52 2013] [error] [client XXXX] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /var/www/html/ganglia/header.php on line 5, referer: http:/XXXXX.YYY.ZZZ/ganglia/?...
Corresponding code snippet:
if (isset($_GET['date_only'])) {
$d = date("r");
echo $d;
exit(0);
}
Hi,
The events are not displayed on the graphs when the host regular expression "" is used (the default). This should be ".". I've tried it by modifying api/events.php:
$grid = isset($_REQUEST['grid']) ? sanitize($_REQUEST['grid']) : ".*";
$cluster = isset($_REQUEST['cluster']) ? sanitize($_REQUEST['cluster']) : ".*";
Is this correct, or could there be something else wrong on my setup that breaks the host regex? In other words, should the "*'" expression work?
Regards,
Frank
Hi,
can a small footer line be added that indicates the amount of time taken for loading the (any type of) graphs, it will help me diagnose if the gmetad and httpd host is doing fine.
Thanks.
We sometimes have way too many events to make sense of which is what on the graph, being able to inspect them would be very nice.
if ( strpos( $ganglia_hosts_array[$i], $host ) !== false ) {
is doing a substring match on host name which is dangerous if you have 2 host_name's where one is a substring of eachother (I encountered an issue where querying for host=staging was returning results from host=staging2)
You can add the summary _report from a host to a view, but not the summary reports of a cluster.
Would be nice to also be able to add a cluster's Summary _report to a view.
inspect graph fails for private clusters.
it does not honor the authentication setting.
I think there is a
include_once("./eval_conf.php");
missing somewhere in the inspect php
Hi,
the utilization heatmap results in a little pop-up stating "[object error" when using IE7 for browsing. The heatmap is not displayed. Works OK with FF3.5. Platform is obviously Windows.
Thanks
Martin
Hi,
I noticed that after having my ganglia exposed to lot of metrics(well lot from lot of nodes), I see two issues.
a) the graphs are intermittently silent
b) after a while, in the web interface, graphs stopped showing up and when loading a cluster view for a particular grid, I get errors. When looked into the error log of Apache, I get this:
[Sat Jul 06 08:19:28 2013] [error] [client XXXXXX] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16385 bytes) in /var/www/html/ganglia/ganglia.php on line 399, referer: XXXXXX
Whats wrong with this?
I looked at ganglia.php piece of code that deals with this:
$start = gettimeofday();
while(!feof($fp))
{
$data = fread($fp, 16384);
if (!xml_parse($parser, $data, feof($fp)))
{
$error = sprintf("XML error: %s at %d",
xml_error_string(xml_get_error_code($parser)),
xml_get_current_line_number($parser));
if ($debug) print "
DEBUG: $error\n";
fclose($fp);
return FALSE;
}
}
fclose($fp);
I sense there is a problem with the xml parse, because it has become bulky? is this something to do with gmond's buffering limitations or gmetad?
What is the actual cause for this and what needs to be done to fix it? Please advice.
thanks,
Nikhil
Using current ganglia-web (latest commit 9f32c43) if you create a view with parens in the name you cannot view graphs in that view.
Steps to reproduce:
Create a view named "test(1)"
Select a graph and add it to the view named "test(1)"
Select the view tab and select the view named "test(1)" and you will not see any graphs
Look at JSON in file /var/lib/ganglia/conf/view_test(1).json" and you will see the graph configuration exists there
Example json which appears blank when viewing:
{
"view_name": "test(1)",
"default_size": "medium",
"items": [
{
"hostname": "somehostname",
"metric": "cpu_idle",
"vertical_label": "%",
"title": "CPU Idle"
}
],
"view_type": "standard"
When you click on the search tab, then click in the search box, type 'web-12' and hit return, it takes you to a 404 page.
I'm passing on a suggestion that you do something like http://donate.wikimedia.org/w/index.php?title=MediaWiki:Resources/landingpage.js&action=edit to disable the return key while in the search form. This will prevent the automatic return-i'm-done-oh-wait-back-up-search-wait-wait-wait-ok path that I follow so often.
Hi! It would be very helpfull to have the feature to build custom views (in graph.d) or Aggregate Graphs (from UI) by using regex on the the metric title and not just the name.
It's annoying to have a graph's scale blown out by an anomalous event, eg http://screencast.com/t/bRMaCvkMvN. It would be nice to be able to set the graphs to use a y-axis max relative to the 95th percentile of a metric (or group of metrics) rather than the maximum value. An example of the same graph, manually setting the y-axis max to a more useful value: http://screencast.com/t/4e1QKkFVmIKN
I could see this as a checkbox on the host page view or as an option in view json or in the aggregate graph creation tab etc. If it's an option in the view .json, it would be nice to be able to toggle it on and off so that you can see what the actual max is easily if necessary.
When I select a portion of a graph to zoom in on that time slice, the time displayed is off by 8 hours. Conveniently, my ganglia server is running in UTC and I am in the Pacific time zone at UTC-8.
Example: http://screencast.com/t/UJOM9eEgWj - I select from just before noon to just after 1pm (13:00) and the resulting graph displays from just before 20:00 to just after 21:00. I'm not sure what the data it's showing is actually representing; this doesn't only work >12hrs before now(). I'm not sure if the displayed time is incorrect or if it's the data that's incorrect.
You can recreate this for yourself at http://ganglia.wikimedia.org/latest/?c=Swift%20pmtpa&m=load_one&r=hour&s=by%20name&hc=4&mc=2. We are running v2.2.0 of the web interface.
Steps to reproduce
check_ganglia_metric.sh
with an invalid GANGLIA_URL
(perhaps never editing it)Expected behavior
Actual behavior
$ /var/www/html/ganglia-web-3.5.2/nagios/check_ganglia_metric.sh host="asdf" metric_name"asdf"
$ echo $?
0
I'm running the code in Australia and have updated my php.ini to reflect the correct timezone as follows:-
[Date]
; Defines the default timezone used by the date functions
date.timezone = Australia/Sydney
However when selecting the inspect graph feature for any graph it is showing 11 hours out. Am I missing something in my configuration or is this something to do with the the jquery code?
Cheers
In the metric display, metrics that contain a space have that displayed as %20. It should be displayed as a space instead.
After having the Cluster view open for a while, the summary reports loose their "c=Cluster" context and start to display "Grid" reports.
When I compare the URL for the cpu_report IMG for example, it starts out as:
graph.php?c=LISA Cluster&m=load_one&r=hour&s=by name&hc=4&mc=2&st=1341210489&g=cpu_report&z=medium&c=LISA Cluster
Which is good and works. However after a while once they start displaying "Grid" reports, the URL for the cpu_report IMG is:
graph.php?c[]=LISA+Cluster&c[]=LISA+Cluster&m=load_one&r=hour&s=by+name&hc=4&mc=2&st=1341208894&g=cpu_report&z=medium&_=1341210111888
This IMG does not understand the array given to the c= argument and it displays Grid report's.
This is with version 3.5.0
There is no way to set sorting (order) for the Grid/meta Overview.
By default gweb2 sorts alphabetically. This also seems to apply to the grid/meta overview.
When I then enter a Cluster Overview en select "descending" sorting order by "load_one" and then return back to the meta view, it does apply this sorting order to the Grid/Meta Overview. Now it sorts the Clusters by load in the Grid Overview.
However, this sorting can only be set from inside a cluster.
It would be nice to also be able to set the sorting (order) from within the Grid/Meta Overview.
Please see this link. https://skitch.com/e-eytan85/8u21c/ganglia-chartbeat-cluster-report
On the cluster view, I can see a specific metric on all the nodes. Likewise, I can see the built-in reports on all the nodes. However, when I try to see a custom report across all the nodes, this does not work.
When you create a view editing the files, if the blocks end with commas "," the view disapears from web interface.
# php -v
PHP 5.3.3 (cli) (built: Feb 2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
https://github.com/ganglia/ganglia-web/blob/master/nagios/check_metric.php#L55
re-uses $host as a loop variable and reassigns the value that was set here:
https://github.com/ganglia/ganglia-web/blob/master/nagios/check_metric.php#L22
causing check_metric to use first host no matter what host you send it.
The stacked graphs appear to have an incorrect legend, see the below screenshot. The lower individual graphs show the load spike on dexie-003, but the stacked graph shows it on dexie-002. In reality it was on dexie-003.
We are running:
Ganglia Web Frontend version 3.5.2
Ganglia Web Backend (gmetad) version 3.4.0
RRDtool version 1.4.7.
The events API uses GET requests for all operations, but maps perfectly to REST semantics for GET, POST, PUT, and DELETE. Modify the API to use these request methods and appropriate response codes in order to provide more predictable behavior and easier integration with existing tools.
When using the mobile view everything only renders correctly if you arrive at it via clicking from the mobile.php root/home page. Any host pages arrived at via this do not render correctly when typed directly into the location bar of a browser. This makes it impossible for instance for my notification system to include a link directly to the host page a host that is alerting.
Deep linking is especially useful in large ganglia environments since starting at a cluster view page forces a flush of thousands (or 10's of thousands) of RRDs which can make the cluster page take a very long time to render...
Selecting "Auto" makes the graphs all scaled the same, and "Same" makes them all scaled according to the max of the individual host metric being displayed. This is at least true for load_one. Selecting network_report and Auto and Same seem to both behave like Auto should. cpu_wio behaves like load_one does w.r.t. Same and Auto being reversed in behavior.
You can create a aggregate graph from metrics in a private cluster.
When you add these metrics and aggregated graph to a view, the metric graphs show "permission denied" but the aggregated graph is just shown without problems.
There is no way to set permissions on a aggregated graph, to prevent an aggregated graph of private metrics from being shown to everyone using a "view" that contains this aggregated graph.
Ideally, there could be some permission setting.
Would be nice if
An other approach could be to allow more complex permissions of each individual view. I.e.:
Or a combination of those.
As of the end of January 2012, the cluster view in the web interface allows a metric to be chosen for all of the hosts to display, but doesn't allow any custom graphs to be used.
Since 3.1.7 the aggregate graph metric autocomplete dropdown has ceased to function for me. I've been unable to turn up anything useful in terms of debug data, but happy to help troubleshoot if you can point me in the right direction.
Hi everybody,
How does heartbeat is calculated?
/home/imeyer: tar -tvzf ganglia-web-3.5.0.tar.gz| grep spec
-rw-r--r-- vuksan/vuksan 6556 2012-04-27 09:36 ganglia-web-3.5.0/inspect_graph.php
-rw-r--r-- vuksan/vuksan 2006 2012-05-03 12:28 ganglia-web-3.5.0/gweb.spec
-rw-r--r-- vuksan/vuksan 7736 2012-06-18 10:01 ganglia-web-3.5.0/gweb-3.5.0/inspect_graph.php
-rw-r--r-- vuksan/vuksan 2006 2012-05-03 12:28 ganglia-web-3.5.0/gweb-3.5.0/gweb.spec
-rw-r--r-- vuksan/vuksan 2094 2012-06-18 10:01 ganglia-web-3.5.0/gweb-3.5.0/ganglia-web.spec
-rw-r--r-- vuksan/vuksan 2230 2012-06-18 10:01 ganglia-web-3.5.0/gweb-3.5.0/ganglia-web.spec.in
-rw-r--r-- vuksan/vuksan 2019 2012-05-22 20:05 ganglia-web-3.5.0/ganglia-web.spec
-rw-r--r-- vuksan/vuksan 2155 2012-05-10 18:57 ganglia-web-3.5.0/ganglia-web.spec.in
These files cause issues when issuing a rpmbuild -tb ganglia-web-3.5.0.tar.gz
as gweb.spec
is the last in the list, and therefore looks for the source as gweb-3.4.2.tar.gz
. Not sure why/how it got there (otherwise I would have made this a pull request ๐).. and if this is an artifact of the tarball build process, but it's breaking our ability to automate downloading/building/deployment of ganglia-web automagically. I'm happy to submit a patch or help out in any way.
For the latter case, I know Facebook does something really slick, where they catch the click event on an internal link, and then prevent the full page load, and just grab what they need over AJAX, and update the URL in the location bar.
When I make an aggregate graph which has a Y-axis label containing the "#" character, it works fine under the "Aggregate Graphs" tab.
However, if I add that graph to a "view" using the "+" button, it does not display properly anymore.
Removing the "#" from the Y-axis label in view_name.json fixes the issue.
Perhaps there is a escaping issue somewhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.