# Could not index event to Elasticsearch - no write index is defined for alias

**URL:** <https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-no-write-index-is-defined-for-alias/308783>\
**Category:** Logstash\
**Created:** [July 4, 2022, 7:54am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-no-write-index-is-defined-for-alias/308783 "2022-07-04T07:54:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![teesr5](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teesr5](https://discuss.elastic.co/u/teesr5)\
**Post date:** [July 4, 2022, 7:54am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-no-write-index-is-defined-for-alias/308783/1 "2022-07-04T07:54:15Z")

</div>

Hi guys,

we are facing an issue on our ELK infrastructure:

[WARN][logstash.outputs.elasticsearch][main] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"logstash-rollover-alias", :routing=\>nil, :\_type=\>"\_doc"}, #LogStash::Event:0x545737ec], :response=\>{"index"=\>{"\_index"=\>"logstash-rollover-alias", "\_type"=\>"\_doc", "\_id"=\>nil, "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"no write index is defined for alias [logstash-rollover-alias]. The write index may be explicitly disabled using is\_write\_index=false or the alias points to multiple indices without one being designated as a write index"}}}}

Could somebody help, thanks.

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [July 4, 2022, 1:15pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-no-write-index-is-defined-for-alias/308783/2 "2022-07-04T13:15:31Z")

</div>

> [@teesr5](#):
>
> no write index is defined for alias

Hi, [Set write\_index](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/indices-aliases.html#aliases-write-index) to the alias [logstash-rollover-alias].

---

<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:** [August 1, 2022, 1:15pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-no-write-index-is-defined-for-alias/308783/3 "2022-08-01T13:15:57Z")

</div>

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