So I answered my own question here:
After pulling down multiple versions of generic-jmx.jar I could not get
compatibility working and building from source on the machine was not an
option due to "Business reasons".  Ultimately I pulled down the source code
for my version 5.4.1 to local built it copied my jar up with an added
logger to figure out the type:

in ./bindings/java/org/collectd/java/GenericJMXConfValue.java

  private Number genericObjectToNumber (Object obj, int ds_type) /* {{{ */
  {
    Collectd.logError ("Class: " + obj.getClass().getName() + "+++");

this threw back a "[J"
which thanks to google is an array of long primitives

so I updated genericObjectToNumber with an extra case

    else if (obj instanceof long[])
    {
      long[] array = (long[]) obj;
      return (genericObjectToNumber(array[array.length-1], ds_type));
    }

and viola I have my data

as a side note, I also added bools
    else if (obj instanceof Boolean)
    {
      Boolean bool = (Boolean) obj;
      return (bool==true?1:0);
    }

thanks to anyone that looked at it.
_______________________________________________
collectd mailing list
[email protected]
https://mailman.verplant.org/listinfo/collectd

Reply via email to