Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Streaming API

azukiwasher edited this page Jul 11, 2012 · 33 revisions

GET /:apikey

Description

Streams a bunch of available metrics that match one or more filtering options by using the query parameters. The Streaming API returns the results in a so-called CSV format, each row is located on a separate line, delimited by a line break (LF) and its fields, separated by commas, never contain line breaks (LF), double quotes and commas.

URL

wss://ws.giraffi.jp:4443/:apikey

Method

GET

Request Headers

** Not Applicable **

Parameters

The following query parameters are available for filtering the results when retrieving metrics. All parameters are optional. If no parameters are given, the API returns only val for the request.

  • src: Specifies the source, e.g., virtualized server instance where the metrics have been collected.
  • tags: Array parameter that selects the metrics corresponding to tags.
  • fields: Array parameter that specifies the fields to return. The available field names are val, time, src and tags.

Example

All available metrics for the specified source:

wss://ws.giraffi.jp:4443/sTyBGlV-LsQcI8mhMYI3nvqtkYvVoERMb-mz8yhhgCU/?src=cld257-0.m.xenzai.com&fields=val,time

All available metrics corresponding to tags for the specified source:

wss://ws.giraffi.jp:4443/sTyBGlV-LsQcI8mhMYI3nvqtkYvVoERMb-mz8yhhgCU/?src=cld257-0.m.xenzai.com&tags=cpu,7,user&fields=val,time,tags

Response Code

101 Switching Protocols

Response Headers

** Not Applicable **	

Response Body

Request

wss://ws.giraffi.jp:4443/:apikey/?src=cld257-0.m.xenzai.com&tags=cpu,7,user&fields=val,time,tags

Response

5246016,1341810982.941,cpu,7,cpu,user,derive,value
5246016,1341810982.946,cpu,7,cpu,user,derive,value
5246016,1341810983.031,cpu,7,cpu,user,derive,value
5246016,1341810983.236,cpu,7,cpu,user,derive,value
5246017,1341810983.384,cpu,7,cpu,user,derive,value
# snip..