# Curator not deleting indices with multiple domain

**URL:** <https://discuss.elastic.co/t/curator-not-deleting-indices-with-multiple-domain/264295>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [February 15, 2021, 10:21am UTC](https://discuss.elastic.co/t/curator-not-deleting-indices-with-multiple-domain/264295 "2021-02-15T10:21:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pawan](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@Pawan](https://discuss.elastic.co/u/Pawan)\
**Post date:** [February 15, 2021, 10:21am UTC](https://discuss.elastic.co/t/curator-not-deleting-indices-with-multiple-domain/264295/1 "2021-02-15T10:21:59Z")

</div>

Hi,  
I have created curator and deleting indices on multi-domain but it getting failed. Error:  
curator --config curator.yml delete\_indices.yml

```auto
    2021-02-15 15:41:16,450 INFO Preparing Action ID: 1, "delete_indices"
    2021-02-15 15:41:16,450 INFO Creating client object and testing connection
    2021-02-15 15:41:16,453 INFO Instantiating client object
    2021-02-15 15:41:16,454 INFO Testing client connectivity
    2021-02-15 15:41:18,321 INFO Successfully created Elasticsearch client object with provided settings
    2021-02-15 15:41:19,658 INFO Trying Action ID: 1, "delete_indices": Delete indices older than 30 days based on index name
    2021-02-15 15:41:23,902 ERROR Failed to complete action: delete_indices. <class 'elasticsearch.exceptions.NotFoundError'>: NotFoundError(404, 'index_not_found_exception', 'no such index [api-2021-01-22]', api-2021-01-22, index_or_alias)

```

**curator.yml**

```auto
    ---
    # Remember, leave a key empty if there is no value. None will be a string,
    # not a Python "NoneType"
    client:
      hosts:
        - api-dev.ops.io
        - api-staging.ops.io
        - api-prod.ops.io
      port: 80
      url_prefix:
      use_ssl: False
      certificate:
      client_cert:
      client_key:
      ssl_no_validate: False
      http_auth:
      timeout: 30
      master_only: False

    logging:
      loglevel: INFO
      logfile:
      logformat: default
      blacklist: ['elasticsearch', 'urllib3']

```

**delete\_indices.yml**

```auto
    ---
    actions:
      1:
        action: delete_indices
        description: >-
          Delete indices older than 30 days based on index name
        options:
           ignore_empty_list: True
           disable_action: False
        filters:
        - filtertype: pattern
          kind: regex
          value: '(api|client-api|call-svc|bank-svc)-*'
        - filtertype: age
          source: name
          direction: older
          timestring: '%Y-%m-%d'
          unit: days
          unit_count: '15'

```

While with one domain is working fine. I am using aws elasticsearch.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [February 16, 2021, 2:14pm UTC](https://discuss.elastic.co/t/curator-not-deleting-indices-with-multiple-domain/264295/2 "2021-02-16T14:14:34Z")

</div>

> [@Pawan](#):
>
> ```auto
> client:
> hosts:
> - api-dev.ops.io
> - api-staging.ops.io
> - api-prod.ops.io
> 
> ```

This use case has never been supported. Multiple hosts is only supported within the same cluster as a round-robin or fail-over tactic. You must run an instance of Curator per cluster.

---

<div class="post-metadata">

**Author:** ![Pawan](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@Pawan](https://discuss.elastic.co/u/Pawan)\
**Post date:** [March 2, 2021, 5:06am UTC](https://discuss.elastic.co/t/curator-not-deleting-indices-with-multiple-domain/264295/3 "2021-03-02T05:06:22Z")

</div>

@theuntergeek . Thanks for the answer.

---

<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:** [March 30, 2021, 5:06am UTC](https://discuss.elastic.co/t/curator-not-deleting-indices-with-multiple-domain/264295/4 "2021-03-30T05:06:23Z")

</div>

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