Is it possible to create an RHQ plugin that collects historic measurements from files? -
i'm trying create rhq plugin gather measurements. seems relativity easy create plugin return value present moment. however, need collect these measurements files. these files created on schedule, example 1 per hour, contain finer measurements, example measurement every minute. file may below:
18:00 20 18:01 42 18:02 39 ... 18:58 12 18:59 15
is possible create rhq plugin can return many values timestamps measurement?
i think can within org.rhq.core.pluginapi.measurement.measurementfacet#getvalues
return many values want within measurementreport
.
so open file, seek last known position (if file appended to), read there , each line go
measurementdata data = new measurementdatanumeric(timeinfile, request, valuefromfile); report.add(data);
of course alerting on (historical) data sort of questionable, if read file 1 hour later, alert can not retroactively fired @ time bad value happened :->
Comments
Post a Comment