Massive import data in RHQ
Roberto Palmieri
palmieri at dis.uniroma1.it
Mon Jun 11 16:11:33 UTC 2012
Hi Heiko,
thanks for the input but we are still an error. The RHQ server return the following error:
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)/Tomcat-5.5
Date: Mon, 11 Jun 2012 16:05:26 GMT
when we use your example file with an our scheduleID.
Can you plz help me?
Thanks a lot,
Roberto
- RP
-- palmieri at dis.uniroma1.it
--- www.dis.uniroma1.it/~palmieri
---- www.dis.uniroma1.it/~hpdcs
On 09/giu/2012, at 13:49, Heiko W.Rupp wrote:
> Roberto,
>
>> I have a file with a lot of data to insert in RHQ. These data are the output of a transactional system and they consist of a set of pair <value,timestamp> associated with a metric already defined within RHQ.
>>
>> Could you suggest me a very quick way to import this set of data in RHQ?
>
> I propose the REST api here -- may not be the very best way, but at least you do
> not need to fumble with any internal apis.
>
> Especially this endpoint:
>
> • POST /metric/data/raw
>
> Submit a series of (numerical) metric values to the server
>
> Parameters:
> Name P.Type Description Required Type Allowed values Default value
> points -body- none java.util.Collection<org.rhq.enterprise.server.rest.domain.NumericDataPoint> -all- -none-
> Return type: javax.ws.rs.core.Response
>
>
> Usage example:
>
> $ curl -i -u rhqadmin:rhqadmin http://localhost:7080/rest/1/metric/data/raw -X POST -d @/tmp/foo1 -HContent-Type:application/json
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> X-Powered-By: Servlet 2.4; JBoss-4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)/Tomcat-5.5
> Content-Length: 0
> Date: Sun, 25 Dec 2011 19:47:19 GMT
>
> /tmp/foo1:
>
> [{"timeStamp": 132465716078, "value": 123, "scheduleId":10022},
> {"timeStamp": 132465716079, "value": 223, "scheduleId":10022}]
>
>
More information about the rhq-devel
mailing list