Error: unrecognized arguments: refresh_interval: -1

getting below error while benchmarking with geonames track
esrally: error: unrecognized arguments: refresh_interval: -1}}

esrally race --offline --track-params=number_of_shards:${ES_NO_OF_SHARDS} --track-params=number_of_replicas:${ES_NO_OF_REPLICAS} --track-params=ingest_percentage:${ES_INGEST_PERCENTAGE}  --track-params=bulk_size:${ES_BULKSIZE} --track-params=bulk_indexing_clients:${ES_BULK_INDEXING_CLIENT} --track-params={"index_settings":{ "refresh_interval": ${ES_REFRESH_INTERVAL}}} --track-path=/rally/.rally/benchmarks/tracks/default/${ES_RALLY_RACE} --pipeline=benchmark-only --target-hosts=${ELASTIC_EP} ${ES_TESTMODE} --client-options ${CLIENT_OPTIONS} --report-format=csv

is it correct way to use refresh_interval in cli for geonames.

--track-params={"index_settings":{ "refresh_interval": ${ES_REFRESH_INTERVAL}}}

How to use refresh_interval in index_setting through esrally cli?

I was passing this param as json it was working well but with cli its throwing error. I want to pass it through CLI . Kindly help

Hello Amit,

geonames allows index settings to be overridden as you have discovered. Configuring the index_settings track parameter overrides the default index settings applied in the track. If you want to set refresh_interval, then you will need to configure all index settings using the full path to the setting:

--track-params='{"index_settings":{ "index.refresh_interval": '${ES_REFRESH_INTERVAL}',"index.number_of_shards": '${ES_NO_OF_SHARDS}',"index.number_of_replicas": '${ES_NO_OF_REPLICAS}'}, "ingest_percentage": 1}'

In addition, each designation of --track-params on the command line overrides the previous. Be sure to set all desired parameters in a single flag. It is recommended to put all parameters in a single .json file, and reference the file in --track-params instead to make things cleaner.

1 Like

Hi json,

Thankyou for your reply.

I have this param json

{
    "number_of_shards": 20,
    "number_of_replicas": 0,
    "ingest_percentage": 100,
    "bulk_size": 10000,
    "bulk_indexing_clients": 8,
    "index_settings": { "refresh_interval":-1 }
  }

I am trying to use the cli as am passing variable to the parameter. i moved to cli. as json is not taking the variable as value. I am running on kubernetes.

Is this correct way to represent above json in cli?

--track-params='{"number_of_shards":'${ES_NO_OF_SHARDS}',"number_of_replicas":'${ES_NO_OF_REPLICAS}',"ingest_percentage":'${ES_INGEST_PERCENTAGE}',
"bulk_size":'${ES_BULKSIZE}',"bulk_indexing_clients":'${ES_BULK_INDEXING_CLIENT}',"index_settings": { "index.refresh_interval":'${ES_REFRESH_INTERVAL}' }}'

Is there any way to pass kuberenetes env variable as value in param json?

Hi Amit,

You will want to pass parameters similarly to how I've specified in Error: unrecognized arguments: refresh_interval: -1 - #4 by json where all index settings are included in the index_settings section of your JSON, including number_of_shards and number_of_replicas.

You wouldn't be able to do this directly in param.json without a shell script to assemble the file first; i.e., the JSON needs to be complete and valid before Rally can use it.

Thankyou json

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.