Bug 865950 - Expose method to set timestamp on MeasurementDataNumeric
Expose method to set timestamp on MeasurementDataNumeric
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: Simeon Pinder
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-10-12 17:29 EDT by Elias Ross
Modified: 2013-07-01 12:36 EDT (History)
1 user (show)

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

Attachments (Terms of Use)
simple patch for this feature (4.62 KB, patch)
2012-10-12 17:31 EDT, Elias Ross
no flags Details | Diff

  None (edit)
Description Elias Ross 2012-10-12 17:29:00 EDT
I am gathering data from a reporting system for metrics that are in the past:

The query is basically:

select time_stamp, value1, value2
from report
order by time_stamp desc

So I'd like this data to be added to the RHQ database with this timestamp, not the current time.

Unfortunately MeasurementData has no (easy) way to set the timestamp value.

There's also the problem of potentially returning duplicate values. It would be preferable if RHQ would ignore duplicates on insert... The work around I have is to simply have the plugin check that it reported this duplicate timestamp or not.

Here is a patch to do so.
Comment 1 Elias Ross 2012-10-12 17:31:17 EDT
Created attachment 626300 [details]
simple patch for this feature

Change is very trivial, but I added some tests and things.
Comment 2 Heiko W. Rupp 2013-07-01 06:18:23 EDT
I think adding this makes sense (but we need to make sure plugins built with an earlier version still work).
The REST-api actually allows you to do this.

Spinder - as we were talking about this on friday, I'll assign it to you.
Comment 3 Heiko W. Rupp 2013-07-01 12:36:37 EDT
Actually this is already possible:




Both since at least end of 2011

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