Bug 857144 - Display of epoch_milliseconds, epoch_seconds values support
Display of epoch_milliseconds, epoch_seconds values support
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-09-13 12:33 EDT by Elias Ross
Modified: 2012-09-20 12:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Elias Ross 2012-09-13 12:33:59 EDT
It appears setting the units for a measurement to 'epoch_milliseconds' doesn't format the value as an actual date/time when the value is displayed. Instead is displayed a large number.
  	<metric property="lastProcessDate"
          	description="last processing date"
          	category="performance" />

I'm guessing there is some code missing in here to do the format:


I do see some code in:


but it seems like this is no longer used?
Comment 1 Jirka Kremser 2012-09-20 12:35:31 EDT
Could you please describe your use case? What plugin is it? Did you consider using the dataType="trait" attribute?
Comment 2 Elias Ross 2012-09-20 12:38:44 EDT
This is my own plugin.

My particular use case is this metric:

      <metric property="hbaseLastProcessDate"
              description="HBase last processing date"

I have a component that loads data periodically (say, every minute),
but regularly into HBase. This metric tracks the last time data was
completely loaded. I get this from parsing an actual string from a
file, e.g.:


As a trait, the value would change very frequently. RHQ would store a
new value for the trait, as a String, every time the metric was

But as a measurement, RHQ would instead store a 'double'. Storing as a
metric allows for a few different things as well:

1. Change formatting depending on the browser & user local time zone.
2. See trending. Ideally, the 'last time' would increase at a steady rate.
3. Alarm if the value does not change.
4. Alarm if the value is, say, 1 hour ago and the threshold is 10 minutes.

Alternatively, the metric could be defined as a relative time value:

      <metric property="hbaseLastProcessSecondsAgo"
              description="For HBase, how many seconds ago was the
data processed"

I don't really mind switching to relative time, but it seems
reasonable to support this in the UI.

Note You need to log in before you can comment on or make changes to this bug.