# Custom headers

**URL:** <https://discuss.elastic.co/t/custom-headers/234669>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [May 28, 2020, 6:33am UTC](https://discuss.elastic.co/t/custom-headers/234669 "2020-05-28T06:33:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent.arnaud90](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vincent.arnaud90](https://discuss.elastic.co/u/vincent.arnaud90)\
**Post date:** [May 28, 2020, 6:33am UTC](https://discuss.elastic.co/t/custom-headers/234669/1 "2020-05-28T06:33:45Z")

</div>

Hello, I have a custom elasticsearch plugin that requires custom HTTP headers. So I'd like to know if there's a way for rally to passe custom headers other than using `raw-request` (exemple using --client-options or a `headers` JSON key for each operation of a track) ?

I'd also like to know if there's a way to make rally fails if some operation fails. I ran a track against a 7.6 node, forgeting to remove the `type` when creating the index. Index creation fails and because, as an administrative task, it is not by default in the report I didn't knew it was wrong. It happens that I ran some queries while indexing and saw that something was wrong. If I didn't check, I would have misleading results.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 28, 2020, 7:06am UTC](https://discuss.elastic.co/t/custom-headers/234669/2 "2020-05-28T07:06:29Z")

</div>

Hi Vincent,

> [@vincent.arnaud90](#):
>
> Hello, I have a custom elasticsearch plugin that requires custom HTTP headers. So I'd like to know if there's a way for rally to passe custom headers other than using `raw-request` (exemple using --client-options or a `headers` JSON key for each operation of a track) ?

this is not possible yet but I had a quick look in the code and I think it should be possible to expose this. Can you please raise an issue for this in the Rally repo?

> [@vincent.arnaud90](#):
>
> I'd also like to know if there's a way to make rally fails if some operation fails. I ran a track against a 7.6 node, forgeting to remove the `type` when creating the index. Index creation fails and because, as an administrative task, it is not by default in the report I didn't knew it was wrong. It happens that I ran some queries while indexing and saw that something was wrong. If I didn't check, I would have misleading results.

Yes, you can specify `--on-error=abort` (see also the [docs](https://esrally.readthedocs.io/en/stable/command_line_reference.html#on-error)). The default is to continue on errors and just record them because errors might also be ok (e.g. you want the benchmark to continue on a single rejected bulk but you want to know about it - in the error rate).

Daniel

---

<div class="post-metadata">

**Author:** ![vincent.arnaud90](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vincent.arnaud90](https://discuss.elastic.co/u/vincent.arnaud90)\
**Post date:** [May 28, 2020, 7:13am UTC](https://discuss.elastic.co/t/custom-headers/234669/3 "2020-05-28T07:13:06Z")

</div>

Thank you for this quick answer, I'll raise an issue on github for headers. And I'm sorry that I missed the `--on-error` option in the doc.

---

<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 25, 2020, 7:13am UTC](https://discuss.elastic.co/t/custom-headers/234669/4 "2020-06-25T07:13:22Z")

</div>

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