Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a api for ganglia?

Tags:

ganglia

Hello I would like to enquire if there is an API that can be used to retrieve Ganglia stats for all clients from a single ganglia server?

like image 493
laycat Avatar asked Jan 28 '13 07:01

laycat


People also ask

How do you test for ganglia?

With the proxy set and the SSH connection open, you can view the Ganglia UI by opening a browser window with http:// master-public-dns-name /ganglia/, where master-public-dns-name is the public DNS address of the master server in the EMR cluster. To use the Amazon Web Services Documentation, Javascript must be enabled.

What is Ganglia tool?

Ganglia is a scalable distributed system monitor tool for high-performance computing systems such as clusters and grids. It allows the user to remotely view live or historical statistics (such as CPU load averages or network utilization) for all machines that are being monitored.


Video Answer


2 Answers

The Ganglia gmetad component listens on ports 8651 and 8652 by default and replies with XML metric data. The XML data type definition can be seen on GitHub here.

Gmetad needs to be configured to allow XML replies to be sent to specific hosts or all hosts. By default only localhost is allowed. This can be changed in /etc/ganglia/gmetad.conf.

Connecting to port 8651 will get you a default XML report of all metrics as a response.

Port 8652 is the interactive port which allows for customized queries. Gmetad will recognize raw text queries sent to this port, i.e. not HTTP requests.

Here are examples of some queries:

  • /?filter=summary (returns a summary of the whole grid, i.e. all clusters)
  • /clusterName (returns raw data of a cluster called "clusterName")
  • /clusterName/hostName (returns raw data for host "hostName" in cluster "clusterName")
  • /clusterName?filter=summary (returns a summary of only cluster "clusterName")

The ?filter=summary parameter changes the output to contain the sum of each metric value over all hosts. The number of hosts is also provided for each metric so that the mean value may be calculated.

like image 103
mmajis Avatar answered Dec 14 '22 06:12

mmajis


Yes, there's an API for Ganglia: https://github.com/guardian/ganglia-api

You should check this presentation from 2012 Velocity Europe - it was really a great talk: http://www.guardian.co.uk/info/developer-blog/2012/oct/04/winning-the-metrics-battle

like image 29
Maciej Lasyk Avatar answered Dec 14 '22 04:12

Maciej Lasyk