# Curator Allocation Filters

**URL:** <https://discuss.elastic.co/t/curator-allocation-filters/128437>\
**Category:** Elasticsearch\
**Created:** [April 18, 2018, 12:56am UTC](https://discuss.elastic.co/t/curator-allocation-filters/128437 "2018-04-18T00:56:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FatalGlitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fatalglitch/32/30106_2.png) [@FatalGlitch](https://discuss.elastic.co/u/FatalGlitch)\
**Post date:** [April 18, 2018, 12:56am UTC](https://discuss.elastic.co/t/curator-allocation-filters/128437/1 "2018-04-18T00:56:32Z")

</div>

Running into a bit of a stumper. Using curator to change the replicas to 1 on indices, but the filters don't seem to be working correctly.

Indices to be changed all have the following attributes in \_settings  
"settings": {  
"index": {  
"routing": {  
"allocation": {  
"require": {  
"node\_type": "warm"  
}  
}  
}

When running curator, I'm using the below actions file contents:  
2:  
action: replicas  
description: \>-  
Change replica count to 1 for indices on warm nodes  
options:  
count: 1  
wait\_for\_completion: True  
disable\_action: False  
filters:  
- filtertype: allocated  
key: node\_type  
allocation\_type: require  
value: warm  
- filtertype: pattern  
kind: regex  
value: '^(.kibana\_|.).\*$'  
exclude: True

However, curator dry-run is still showing it acting against indices that don't have the node\_type:warm

Can anyone provide insight if I'm doing something wrong here?

---

<div class="post-metadata">

**Author:** ![geekpete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geekpete/32/20409_2.png) [@geekpete](https://discuss.elastic.co/u/geekpete)\
**Post date:** [April 18, 2018, 1:11am UTC](https://discuss.elastic.co/t/curator-allocation-filters/128437/2 "2018-04-18T01:11:30Z")

</div>

What versions of Elasticsearch and Curator are you using?

---

<div class="post-metadata">

**Author:** ![FatalGlitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fatalglitch/32/30106_2.png) [@FatalGlitch](https://discuss.elastic.co/u/FatalGlitch)\
**Post date:** [April 18, 2018, 1:32am UTC](https://discuss.elastic.co/t/curator-allocation-filters/128437/3 "2018-04-18T01:32:50Z")

</div>

So we figured it out... thanks GeekPete!!

the allocation filtertype defaults with exclude: True, so it will inherently exclude instead of include. By adding exclude:false to the syntax, I got the results I expected, which was to ONLY include those with node\_type: warm

- filtertype: allocated  
key: node\_type  
allocation\_type: require  
value: warm  
exclude: false

---

<div class="post-metadata">

**Author:** ![geekpete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geekpete/32/20409_2.png) [@geekpete](https://discuss.elastic.co/u/geekpete)\
**Post date:** [April 20, 2018, 1:40am UTC](https://discuss.elastic.co/t/curator-allocation-filters/128437/4 "2018-04-20T01:40:29Z")

</div>

Added a doc fix PR: [https://github.com/elastic/curator/pull/1203](https://github.com/elastic/curator/pull/1203)

Filed an issue: [https://github.com/elastic/curator/issues/1204](https://github.com/elastic/curator/issues/1204)

Hopefully just clarifying the docs is enough to help people avoid the confusion.

---

<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:** [May 18, 2018, 1:40am UTC](https://discuss.elastic.co/t/curator-allocation-filters/128437/5 "2018-05-18T01:40:34Z")

</div>

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