[Hawkular-dev] Metrics reporting into hawkular-metrics
Heiko W.Rupp
hrupp at redhat.com
Tue Feb 24 05:01:28 EST 2015
Hey,
we need to have an endpoint that accepts a list of
<name, timestamp , value> triples.
The current
@POST
@Path("/{tenantId}/metrics/numeric/data")
@Consumes(APPLICATION_JSON)
public void addNumericData(@Suspended final AsyncResponse asyncResponse, @PathParam("tenantId") String tenantId,
List<NumericDataParams> paramsList) {
does not work (not technically).
A client (think "agent") will not send a list of dozens of metric values for one metric id. And then in a next request for another.
Especially not, when an agent is monitoring 10 resources and is then reporting their data. All reported metrics will have
a different id.
The other similarly challenged endpoint is
@POST
@Path("/{tenantId}/metrics/numeric/{id}/data")
@Consumes(APPLICATION_JSON)
public void addDataForMetric(@Suspended final AsyncResponse asyncResponse,
@PathParam("tenantId") final String tenantId, @PathParam("id") String id, List<NumericDataPoint> dataPoints) {
The metric id is passed on the URL-Path and thus requires a new request per metric to report.
The above 2 endpoints may be consistent with their respective GET endpoints, but here we have the use case that I want
to read mass data for one single id.
Reporting use cases are different.
More information about the hawkular-dev
mailing list