ChronixDB / chronix.server

The Chronix Server implementation that is based on Apache Solr.
Apache License 2.0
263 stars 29 forks source link

Chronix Server returns unknown field error #137

Closed twiechert closed 7 years ago

twiechert commented 7 years ago

Hi,

I'm using the OpenTSDB Java client to generate write requests to the chronix backend. Unfortunately, this fails with the error "unknown field 'gridCellId''" at server side. Here is my client code:

...
MetricBuilder builder = MetricBuilder.getInstance();
Metric metric = builder.addMetric(MEASUREMENT)
                    .setDataPoint(vehicleLocationReportStatistic.getLastUpdated().getTime(), vehicleLocationReportStatistic.getReportCount()).
                    .addTag("gridCellId", s(vehicleLocationReportStatistic.getVehicleReportInfo().getReportInfo().getGridCellId()));
Response response = httpClient.pushMetrics(builder, ExpectResponse.STATUS_CODE);
...

Do I somewhere have to register the tags I'm using in my time series in advance? Thanks four your help!

FlorianLautenschlager commented 7 years ago

Hi thanks to report the issue. Could you please provide your schema.xml? Perhaps it misses the field definition of a definition for dynamic fields.

twiechert commented 7 years ago

Thanks @FlorianLautenschlager . I'm new to Solr and was not aware of that file. Thus I was using the bundled schema, which expects dynamic field names to end with "_s".

FlorianLautenschlager commented 7 years ago

No problem, you are welcome ;-)