On Thu, Oct 16, 2008 at 00:10, Ed Greenberg <[EMAIL PROTECTED]> wrote:
> I would like to collect a few statistics via gmetric, and, after
> prototyping, I have some questions:
>
> 1. When I ran gmetric for the first time, the result was an RRD database
> created on my gmetad machine for that metric. Unfortunately, it created
> a "GAUGE" value, when a "COUNTER" value is appropriate. How can I
> predefine what should be created, so I don't have to clean up after the
> fact with rrdtune.
This is subtle, actually, and requires some background The RRD files
are created by gmetad when received (gmetric sends the information as
defined in gmond.conf, gmetric picks that information up from gmond).
Metrics sent via gmetric also have a "slope" attribute defined as
follows:
-s, --slope=STRING Either zero|positive|negative|both (default=`both')
If you dig around in the gmetad code, there's a very short section
that determines if GAUGE or COUNTER will be used, and it uses this
"slope" attribute. Specifically, COUNTER is used for slope=positive,
and GAUGE for everything else.
So, try using --slope=positive when you call gmetric. (Technically,
you might need to call it only once when the rrd is created.)
> 2. I'd like to control whether a bar or line graph is used for my
> metric, as well as colors, legends, etc. Where is this controlled?
This is controlled in one of the files in web/graph.php (for version
3.0.x) or the files in web/graph.d/* (3.1.x). If you are running
3.0.x, I suggest upgrading to 3.1.x as there is a new graphing system
that makes it much simpler (IMO) to create your own custom gcharts.
> 3. I'd like to capture several metrics over the same time period, and
> graph them on the same graph. How do I set up the rrd to contain all my
> data, or how do I combine multiple rrds on the same graph?
More an RRD question than Ganglia... ;-) There are a couple of
answers that might be relevant, depending on exactly what you want to
do, all of them requiring custom charts.
To take an example from one of my clusters: I plot average CPU
temperatures across the cluster on a custom chart. This basically
involves looping over all of the temperature files in the appropriate
RRD directory, and building a chart from it.
Let's say you want to graph CPU temperatures across the cluster, and
that the data is collected normally via gmond module or script that
calls gmetric. Gmetad will create an RRD file for each host called
something like "cpu_temp.rrd" that stores the individual metric values
for that specific host. In addition, it will also update a
"cpu_temp.rrd" file in the __SumaryInfo__ directory that stores the
number of hosts currently reporting this metric, and the sum total
value all hosts have for this value. This is so you can quickly
generate cluster-wide reports, such as the CPU and Network reports.
Furthermore, you can divide the sum by the number of hosts, and
quickly get the average values as well.
So depending on what you want, you can either pull the aggregate
values stored in __SummaryInfo__, or the specific values in host rrd
directories. The former is straightforward. The latter is more
complicated, and will require you to loop over all hosts and pull the
information from multiple .rrd files.
In 3.1.x, all charts are created by one of the files in web/graph.d/,
and they may give you an idea of how to create exactly what you want.
The "stock" graphs should be fairly well commented, especially the
"sample_report.php" file. There may also be a file or two in the
contrib/ directory, and you can always ask here on the mailing list or
on the IRC channel (#ganglia on Freenode).
> 4. Once all the nodes in the cluster are producing my new metrics, I'd
> like to aggregate them for the cluster. Not sure where this is controlled.
If you mean "add them all together to get a total value," then it may
be done already (see above).
> 5. Finally, I'd like to have the new metrics appear in the metric
> dropdown on the various web pages.
This should happen already. What version of Ganglia are you running?
--
Jesse Becker
GPG Fingerprint -- BD00 7AA4 4483 AFCC 82D0 2720 0083 0931 9A2B 06A2
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general