Querying Data

The Chronix server parts are Solr extensions (e.g. a custom query handler). Hence there is no need to build a custom modified Solr. We just plug the Chronix server parts into a standard Solr.

The following sub projects are Solr extensions and ship with the binary release of Chronix. The latest release of Chronix server is based on Apache Solr version 6.2.1

Modify Chronix' response

Per default Chronix returns (as Solr does) all defined fields in the schema.xml.

One has three ways to modify the response using the fl parameter:

One specific user defined field

If only a specific user defined field is needed, e.g. the host field, one can set:

fl=host

Then Chronix will return the host field and the required fields (start,end,data,id).

Exclude a specific field

If one do not need a specific field, such as the data field, one can pass -data in the fl parameter.

fl=-data

In that case all fields, expect the data field, are returned. Even when the excluded field is a required field.

Explicit return of a field

This is useful in combination with an analysis. Analyses per default do not return the raw data for performance reasons. But if the raw data is needed, one can pass

fl=+data

Chronix Response Writer

This allows one to query raw (uncompressed) data from Chronix in JSON format. To execute the transformer you have to add it to the fl parameter:

q=metric:*load*&fl=+dataAsJson //to get all fields and the dataAsJson field
q=metric:*load*&fl=dataAsJson //to get only the required fields (except the data field) and dataAsJson

The records in the result contains a field called dataAsJson that holds the raw time series data as json. Note: The data field that normally ship the compressed data is not included in the result.

Example Result:

{
 "responseHeader":{
 "query_start_long":0,
 "query_end_long":9223372036854775807,
 "status":0,
 "QTime":3},
 "response":{"numFound":21,"start":0,"docs":[
 {
 "start":1377468017361,
 "metric":"\\Load\\max",
 "end":1377554376850,
 "dataAsJson":"[[timestamps],[values]]" //as json string
 }...
 ]
}

results matching ""

    No results matching ""