# Error: unrecognized arguments: refresh\_interval: -1

**URL:** <https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [May 18, 2022, 11:59am UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058 "2022-05-18T11:59:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitsa](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@amitsa](https://discuss.elastic.co/u/amitsa)\
**Post date:** [May 18, 2022, 11:59am UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/1 "2022-05-18T11:59:48Z")

</div>

getting below error while benchmarking with geonames track  
esrally: error: unrecognized arguments: refresh\_interval: -1}}

```auto
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.

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

```

---

<div class="post-metadata">

**Author:** ![amitsa](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@amitsa](https://discuss.elastic.co/u/amitsa)\
**Post date:** [May 18, 2022, 12:32pm UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/2 "2022-05-18T12:32:54Z")

</div>

How to use refresh\_interval in index\_setting through esrally cli?

---

<div class="post-metadata">

**Author:** ![amitsa](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@amitsa](https://discuss.elastic.co/u/amitsa)\
**Post date:** [May 18, 2022, 12:56pm UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/3 "2022-05-18T12:56:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![json](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/json/32/4125_2.png) [@json](https://discuss.elastic.co/u/json)\
**Post date:** [May 18, 2022, 4:20pm UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/4 "2022-05-18T16:20:54Z")

</div>

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:

```auto
--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.

---

<div class="post-metadata">

**Author:** ![amitsa](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@amitsa](https://discuss.elastic.co/u/amitsa)\
**Post date:** [May 19, 2022, 3:28am UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/5 "2022-05-19T03:28:15Z")

</div>

> [@json](#):
>
> each designation of `--track-params` on the command line overrides the previous. Be sure to set all desired parameters in a single flag

Hi json,

Thankyou for your reply.

I have this param json

```auto
{
    "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?

```auto
--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?

---

<div class="post-metadata">

**Author:** ![json](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/json/32/4125_2.png) [@json](https://discuss.elastic.co/u/json)\
**Post date:** [May 19, 2022, 9:46pm UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/6 "2022-05-19T21:46:20Z")

</div>

Hi Amit,

You will want to pass parameters similarly to how I've specified in [Error: unrecognized arguments: refresh\_interval: -1 - #4 by json](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/4) where _ **all** _ index settings are included in the `index_settings` section of your JSON, including `number_of_shards` and `number_of_replicas`.

> [@amitsa](#):
>
> Is there any way to pass kuberenetes env variable as value in param json?

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.

---

<div class="post-metadata">

**Author:** ![amitsa](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@amitsa](https://discuss.elastic.co/u/amitsa)\
**Post date:** [May 21, 2022, 1:00am UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/7 "2022-05-21T01:00:41Z")

</div>

Thankyou json

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 18, 2022, 1:01am UTC](https://discuss.elastic.co/t/error-unrecognized-arguments-refresh-interval-1/305058/8 "2022-06-18T01:01:19Z")

</div>

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