Bug 536345 (RHQ-704)

Summary: UpTime metric on RHQ Agent resource type should not be tracked for baseline OOBs
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1preCC: asantos, ccrouch, jshaughn
Target Milestone: ---Keywords: FutureFeature, Improvement
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-704
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-15 17:00:37 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Ian Springer 2008-07-31 14:14:00 EDT
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. -->
Comment 1 Heiko W. Rupp 2008-09-14 15:30:18 EDT
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 
Comment 2 John Mazzitelli 2008-12-13 00:56:13 EST
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?
Comment 3 Red Hat Bugzilla 2009-11-10 16:15:10 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-704
Comment 5 Jay Shaughnessy 2014-05-15 17:00:37 EDT
Still there, I think we could remove it but it seems like it's not a big deal.