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.
Created attachment 626300 [details] simple patch for this feature Change is very trivial, but I added some tests and things.
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.
Actually this is already possible: org.rhq.core.domain.measurement.MeasurementDataNumeric#MeasurementDataNumeric and org.rhq.core.domain.measurement.MeasurementDataNumeric#MeasurementDataNumeric Both since at least end of 2011