pthulasiram / jmxetric

Automatically exported from code.google.com/p/jmxetric
MIT License
0 stars 0 forks source link

No support of type long or int64 (64bit) #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Now support types are: string|int8|uint8|int16|uint16|int32|uint32|float|double

How about long or int64.

I have test a MBean returns a long type, but configure in jmxetric.xml as 
int32, it also works, even when the value is bigger than 4294967296.

It is confusing?

Original issue reported on code.google.com by schubert...@gmail.com on 20 Jun 2010 at 9:06

GoogleCodeExporter commented 8 years ago
I googled this and checked the ganglia trunk source - 64 bit ints are converted 
to doubles..
http://www.mail-archive.com/ganglia-general@lists.sourceforge.net/msg05583.html

Original comment by jasper...@gmail.com on 26 Jun 2010 at 8:48

GoogleCodeExporter commented 8 years ago
thanks. 

yes, ganglia does not support int64/long, but double.
and i found following code:

   public void announce( String name, 
            long value, String group  ) throws GangliaException {
        this.announce(name, Long.toString(value),GMetricType.DOUBLE, "", GMetricSlope.BOTH, 60, 0, group );
    }

    public void announce( String name, 
            double value, String group ) throws GangliaException {
        this.announce(name, Double.toString(value),GMetricType.DOUBLE, "", GMetricSlope.BOTH, 60, 0, group);
    }

Now, I chanced to use double in my project.

Original comment by schubert...@gmail.com on 20 Sep 2010 at 7:01