-
Oct 14th, 2011, 12:13 AM
#1
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;
}
}
-
Oct 17th, 2011, 07:26 AM
#2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules