Hi David:

On Thu, May 6, 2010 at 2:24 PM, David Birdsong <david.birds...@gmail.com> wrote:

> here's the relevant descriptor info:
>
> desc_template = {
>        'call_back': self.get_metric,
>        'time_max': self.collect_interval,
>        'value_type': 'uint',
>        'units': 'ticks',
>        'slope': 'both',
>        'format': '%u',
>        'groups': metric_group
>        }
> descriptor = desc_template.copy()
> descriptor['name'] = '%s.http_req_time' % component
> descriptor['description'] = 'http request time to serve'
> descriptor['value_type'] = 'float'
> descriptor['format'] = '%u',
> descriptors.append(descriptor)
>
>
> ...so to recap, gmond debug shows the collection going as expected
> with, but after the collection of the metric and before gmetric
> collects the xml from the collector, the value is changed into a large
> integer.
>
> also, what is format? the docs simply mention that the format field is
> the format of the metric.

The "format" here is simply the string format operation for Python as
referenced here:

http://docs.python.org/library/stdtypes.html#string-formatting

So for your case, instead of '%u', it should be '%f'.  I have added
the above link to the Wiki page describing the Python module.

Have you tried running your plugin on the command line to see whether
your float was also converted to a large integer?

Cheers,

Bernard

------------------------------------------------------------------------------

_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to