The metric is currently defined in the descriptor as follows: <metric property="Uptime" displayName="Up Time" description="Total number of seconds since the agent was started" defaultOn="true" units="seconds" category="availability" measurementType="dynamic" /> <!-- changed to dynamic to prevent generation of per Minute metric. --> Unfortunately, by changing its type to "dynamic", it will be tracked for OOBs, which doesn't make sense for up time, since it monotonically increases. We need a way to either: 1) disable per-minute metrics for a trendsup metric (one idea is to disable per-minute metrics for trendsup metrics that have units of "seconds") 2) disable baseline OOB tracking for dynamic metrics, e.g.: <metric property="Uptime" displayName="Up Time" description="Total number of seconds since the agent was started" defaultOn="true" units="seconds" category="availability" disableBaselines="true" measurementType="dynamic" /> <!-- changed to dynamic to prevent generation of per Minute metric. -->
1) sounds like the way to go - better extend 'seconds' to all time units. But then there are metrics like "cpu time spent in user mode" where a per minute metric makes sense. 2) Adds a lot of stuff to the whole data model An alternative could be to add a 'perMinute' attribute to the schema, that is true by default and which only gets parsed in org.rhq.core.clientapi.agent.metadata.MetricsMetadataParser.parseMetricsMetadata(MetricDescriptor, ResourceType) in the if-clause to determine if per minute data should be created. This new attribute would only apply to trendsup/down. Or we could create trends{up,down}nopermin measurement types
I'm thinking we just get rid of this metric. What happens if we remove metric defs from a descriptor? Can the metadata manager remove it and all data/alerts/etc associated with it?
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-704
Still there, I think we could remove it but it seems like it's not a big deal.