# Parameters in some files not exposed?

**URL:** <https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [September 1, 2022, 8:15pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482 "2022-09-01T20:15:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmlucjav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmlucjav/32/5870_2.png) [@jmlucjav](https://discuss.elastic.co/u/jmlucjav)\
**Post date:** [September 1, 2022, 8:15pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482/1 "2022-09-01T20:15:00Z")

</div>

Hi,

I am trying to use -track-params.  
My track is typical:

```auto
{
    "version": 2,
    "description": "Tracker-generated track for track",
    "indices": [
      {
        "name": "{{p_target_index}}",
        "body": "{{p_target_index}}.json"
      }
    ],
    "corpora": [
      {
        "name": "{{p_target_index}}",
        "documents": [
          {
            "target-index": "{{p_target_index}}",
            "source-file": "{{p_target_index}}-documents.json.bz2",
            "document-count": 84307,
            "compressed-bytes": 14347644,
            "uncompressed-bytes": 147680059
          }
        ]
      }
    ],
    "operations": [
        {{ rally.collect(parts="operations/*.json") }}
    ],
    "challenges": [
        {{ rally.collect(parts="challenges/*.json") }}
    ]    
}

```

and I have some params like cluster\_health here in challenges/default.json:

```auto
                    "wait_for_status": "{{cluster_health | default('green')}}",

```

but if my params.json contains this:

```auto
{
    "cluster_health": "green",
    "number_of_shards": 1,
    "number_of_replicas": 3
}

```

I get an error saying 'cluster\_health' is provided but not exposed. I can only use "number\_of\_shards"/"number\_of\_replicas" that are in the index files.

Am I doing something wrong?  
thanks!

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [September 6, 2022, 12:23pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482/2 "2022-09-06T12:23:49Z")

</div>

@jmlucjav I have seen this before but not taken the care to find a reproducible case for an issue. I believe you may be able to work around this by defining an unused parameter in the `parameters` of the track:

```auto
    "parameters": {
        "cluster_health": "{{cluster_health | default('green')}}"
    },

```

Please let me know if this helps.

Meanwhile, if you have a simple case that reproduces the issue we would be much obliged if you filed an issue at [Issues · elastic/rally · GitHub](https://github.com/elastic/rally/issues) with the reproduction.

---

<div class="post-metadata">

**Author:** ![jmlucjav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmlucjav/32/5870_2.png) [@jmlucjav](https://discuss.elastic.co/u/jmlucjav)\
**Post date:** [September 6, 2022, 1:37pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482/3 "2022-09-06T13:37:07Z")

</div>

Hi Rick,

sorry I didn't totally understand. You mean if I am going to use 'cluster\_health' in my index json file, then I should somehow declare in the track.json like this??

```auto
{
    "version": 2,
    "description": "Tracker-generated track for track",
    "indices": [
      {
        "name": "{{p_target_index}}",
        "body": "{{p_target_index}}.json"
      }
    ],
    "parameters": {
        "cluster_health": "{{cluster_health | default('green')}}"
    },
    "corpora": [

```

I'll see if I can simplify my case to open an issue in Github...

thanks

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [September 6, 2022, 1:54pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482/4 "2022-09-06T13:54:48Z")

</div>

Yes, it's a bit of a hacky workaround but I have reason to believe it should work. In fact it could be in a standalone line such as

```auto
{% set _cluster_health = _cluster_health | default('green') %}

```

And then it would be up to you to perhaps set the later instance of `cluster_health` instead as `_cluster_health` without the `default` function:

```auto
                    "wait_for_status": "{{ _cluster_health }}",
```

---

<div class="post-metadata">

**Author:** ![jmlucjav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmlucjav/32/5870_2.png) [@jmlucjav](https://discuss.elastic.co/u/jmlucjav)\
**Post date:** [September 9, 2022, 6:13pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482/5 "2022-09-09T18:13:52Z")

</div>

hey,

back here to report on my progress:

- I found (via another issue) some basic params were not being passed properly (most probably due to some errors on my side), so I stopped trying to parametrize things, and went the slow but sure way of changing stuff manually
- I have tried to reproduce this issue in a small, much simpler setup, and I cannot, so not sure this can be reproduced easily...sorry

---

<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:** [October 7, 2022, 6:14pm UTC](https://discuss.elastic.co/t/parameters-in-some-files-not-exposed/313482/6 "2022-10-07T18:14:10Z")

</div>

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