Results 1 to 2 of 2

Thread: Hyperic

  1. #1
    Join Date
    Jan 2008
    Posts
    182

    Default Hyperic

    We are expecting the class below to be able to be autodiscovered by Hyperic but it isn't. We can query it in the view tab in hyperic and see its attributes, but it is not autodiscovered in the monitor tab. Any ideas?

    import org.springframework.jmx.export.annotation.ManagedA ttribute;
    import org.springframework.jmx.export.annotation.ManagedM etric;
    import org.springframework.jmx.export.annotation.ManagedO peration;
    import org.springframework.jmx.export.annotation.ManagedO perationParameter;
    import org.springframework.jmx.export.annotation.ManagedR esource;
    import org.springframework.jmx.support.MetricType;
    import org.springframework.stereotype.Component;

    import com.dialect.utility.Application;
    import com.dialect.utility.jmx.JmxBeanRegistrar;

    /**
    * TODO: Javadoc
    */
    @Component
    @ManagedResource(objectName="spring.application:ap plication=swf-booking-mvc,type=MessageListener,name=bookingMessageListen er")
    public final class JmxFooServiceImpl{
    @ManagedMetric(category="UTILIZATION", displayName="HypericSpikeAttribute",
    description="Some time dependent value",
    metricType = MetricType.GAUGE, unit="TB")
    public String getSomeValue() {
    return "" + System.currentTimeMillis() % 99;
    }

    @ManagedMetric(category="UTILIZATION", displayName="HypericSpikeAttribute2",
    description="Some other time dependent value",
    metricType = MetricType.GAUGE, unit="TB")
    public int getSomeOtherValue() {
    return (int) System.currentTimeMillis() % 99;
    }
    private int counter=0;

    @ManagedAttribute(description = "numberOfTimesAccessed")
    public int getAccess(){
    counter++;
    return counter;
    }
    }

  2. #2
    Join Date
    Oct 2011
    Posts
    1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •