MeasurementUnits (EPOCH_MILLISECONDS, EPOCH_SECONDS)
Elias Ross
genman at noderunner.net
Thu Sep 20 16:37:41 UTC 2012
I'll respond here and maybe Bugzilla.
My particular use case is this metric:
<metric property="hbaseLastProcessDate"
dataType="measurement"
description="HBase last processing date"
units="epoch_milliseconds"/>
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.:
'201209122216'
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
polled.
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"
dataType="measurement"
description="For HBase, how many seconds ago was the
data processed"
units="seconds"/>
I don't really mind switching to relative time, but it seems
reasonable to support this in the UI.
More information about the rhq-devel
mailing list