Giter Site home page Giter Site logo

ganglia / ganglia-web Goto Github PK

View Code? Open in Web Editor NEW
317.0 317.0 169.0 5.76 MB

Ganglia Web Frontend

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.20% PHP 60.97% HTML 0.15% JavaScript 29.74% CSS 2.63% Smarty 4.88% Shell 0.70% C 0.74%

ganglia-web's People

Contributors

afbjorklund avatar berlin2123 avatar bostjan avatar carenas avatar cburroughs avatar cez81 avatar dilchenko avatar dpocock avatar imeyer avatar jbuchbinder avatar jgoulah avatar jh23453 avatar jtfrey avatar ke3vin avatar kmullin avatar koebi001 avatar m0zes avatar mshearer avatar olsonbg avatar pjjw avatar plaguedbypenguins avatar rbokhorst avatar sfontes avatar tabaer avatar techyshishy avatar timstaley avatar torkelsson avatar vuksanv avatar vvuksan avatar zoide avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ganglia-web's Issues

Issue with views

When you create a view editing the files, if the blocks end with commas "," the view disapears from web interface.

[Feature Request] add option to restrict graphs to 95th% for the y axis

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.

Aggregate graph metric autocomplete non-functional

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.

enabling graph_report_stats cosmetic issues

Enabling this:

$conf['graphreport_stats'] = true;
$conf['graphreport_stat_items'] = array("now", "min", "avg", "max");

Can give all sorts of cosmetic issues:

  • text is too long for graph. The Max: part falls off the graph and is part unreadable
  • the load_report, network_report, etc graphs have different (height) size's
  • the differences in graph size for name_report's is not very pretty to see on meta overview
  • aggregated graph's with graphreport_stats enabled the text is only correctly aligned for the xlarge size
  • aggregated graph's with graphreport_stats enabled wraps text halfway on smaller sizes

Also with graphreport_stats enabled:

  • host (load) graphs in Cluster Overview seem to ignore the setting and supply no "Now/Avg/etc" stats at all.

Cannot view graphs in views which have names containing parenthesis

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:

  1. Create a view named "test(1)"

  2. Select a graph and add it to the view named "test(1)"

  3. Select the view tab and select the view named "test(1)" and you will not see any graphs

  4. 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"

Stacked graphs missing hosts that exist in more than one cluster

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.

Feature Request: multiple graphs in the Aggregate Graphs composer

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.

check_metric.php does not honor the host parameter

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

Feature Request: REST events API

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.

Selecting a portion of a graph doesn't deal well with timezones

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.

Php warning for using date() in header.php

[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);
}

graph.php JSON rendering ignoring cs/ce params using custom range

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

ganglia-web: Meaning of "Show Hosts Scaled" Same/Auto options is reversed

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.

[3.4.2] live dashboard displays 'null' for aggregated graphs

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

Source tar.gz for 3.5.0 from sourceforge contains old gweb* files.

@ganglia

/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.

Inspect Graph - Timezone Issue

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

setting optional_graphs in conf.php does not affect host overview

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.

regex also for metric title

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.

aggregate with y-label containing '#' fails in view

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.

Events default host regular expression doesn't work

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

PHP Fatal error: Allowed memory size of XXXXX bytes exhausted

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

$conf['time_ranges'] cannot have spaces in names

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'.

stacked.php graphs don't properly stack

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.

Aggregate charts applying host colors incorrectly

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.

confused ganglia

Can't deep link into mobile/mobile_helper.php

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...

sorting grid/meta overview

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.

Feature Request - use divs instead of tables in view mode

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

Incorrect legend in stacked graph

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.

Screen Shot 2013-01-03 at 12 11 42 PM

We are running:

Ganglia Web Frontend version 3.5.2
Ganglia Web Backend (gmetad) version 3.4.0
RRDtool version 1.4.7.

cluster summary reports clustername disappears after while

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

check_ganglia_metric.sh returns 0 when the curl call fails

Steps to reproduce

  1. Run check_ganglia_metric.sh with an invalid GANGLIA_URL (perhaps never editing it)
  2. Check the return value

Expected behavior

  • non-zero since the call failed

Actual behavior

$ /var/www/html/ganglia-web-3.5.2/nagios/check_ganglia_metric.sh host="asdf" metric_name"asdf"
$ echo $?
0

can't display vmem infomation

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?

Footer with time taken for page load

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.

[feature request] aggregate graph and/or view permissions

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

  • aggregated graph's respect permissions of the underlying (private) cluster metrics.

An other approach could be to allow more complex permissions of each individual view. I.e.:

  • private views in same manner that there are private clusters

Or a combination of those.

missplaced calls of htmlspecialchars breaks preg_replace

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:

31d3489

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.