[Hawkular-dev] Metrics reporting into hawkular-metrics

Michael Burman miburman at redhat.com
Tue Feb 24 06:21:31 EST 2015


Hi,

The only issue I had with those methods was that I can't send anymore 
availability & numeric metrics in the same request. But not that I 
couldn't send many metrics in a same request. For example, this is what 
my gather_agent sends to the endpoint:

[
   {
     "data": [
       {
         "timestamp": 1424776542007,
         "value": 11989272.0
       }
     ],
     "name": "miranda.mem.memtotal"
   },
   {
     "data": [
       {
         "timestamp": 1424776542007,
         "value": 2423852.0
       }
     ],
     "name": "miranda.mem.memfree"
   },
... and so on. In a single request. I'm posting this to the 
http://{0}:{1}/rhq-metrics/{tenant_id}/metrics/numeric/data and it works 
fine? I could send several data values of course in a single request 
also. My python-client has tests for both of these scenarios, and they 
seem to work fine?

   -  Micke


On 24.02.2015 12:01, Heiko W.Rupp wrote:
> 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.
>
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev



More information about the hawkular-dev mailing list