# Facing problem to create curator.yml file?

**URL:** https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067
**Category:** Elasticsearch
**Created:** [July 29, 2018, 12:36pm UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067 "2018-07-29T12:36:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![letty12](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@letty12](https://discuss.elastic.co/u/letty12)
#### Post date: [July 29, 2018, 12:36pm UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067/1 "2018-07-29T12:36:14Z")

</div>

Hi,

I've recently install curator on my server and i want to create curator config file and action file but i'm little bit confused about the path, where should i create both the file because in the documentation it's shown default path: ~/.curator/curator.yml, but on my server there is no default path exits.  
But i have different curator path on my server.

---

<div class="post-metadata">

### Author: ![akhileshsingh](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@akhileshsingh](https://discuss.elastic.co/u/akhileshsingh)
#### Post date: [July 29, 2018, 12:58pm UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067/2 "2018-07-29T12:58:26Z")

</div>

Hi @letty12

In order to further debug your issue, I need some information.

1. How you have installed curator on your server either by pip, yum or any other process.
2. which environment you were using to install curator.

> [@letty12](#):
>
> But i have different curator path on my server.

And I also want to know which other path do you have.

> [@letty12](#):
>
> default path: ~/.curator/curator.yml, but on my server there is no default path exits.

it's not mandatory to use default path:~/.curator/curator.yml.  
you just add --config /path/to/curator.yml before the action yaml file argument.

hope the above steps will help you.

Thanks:)

---

<div class="post-metadata">

### Author: ![letty12](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@letty12](https://discuss.elastic.co/u/letty12)
#### Post date: [July 29, 2018, 1:52pm UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067/3 "2018-07-29T13:52:29Z")

</div>

@akhileshsingh

Thank you for your reply! Here are the information.

Using centos machine and install curator by using yum.

> [@akhileshsingh](#):
>
> But i have different curator path on my server.

```
/use/bin/curator
/use/bin/elasticsearch-curator

```

> [@akhileshsingh](#):
>
> you just add --config /path/to/curator.yml before the action yaml file argument.

Then where I have to create action file and how to use.

---

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [July 30, 2018, 6:42am UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067/4 "2018-07-30T06:42:09Z")

</div>

you need create the file by yourself. --config  
curator --help see the configure.  
see this:  
[https://www.elastic.co/guide/en/elasticsearch/client/curator/current/configfile.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/configfile.html)

---

<div class="post-metadata">

### Author: ![akhileshsingh](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@akhileshsingh](https://discuss.elastic.co/u/akhileshsingh)
#### Post date: [July 30, 2018, 10:58am UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067/5 "2018-07-30T10:58:39Z")

</div>

@letty12,

> [@letty12](#):
>
> /use/bin/curator /use/bin/elasticsearch-curator

The path you have share it's a binary path of curator, where your curator is installed. you can also check by using below command.  
whereis curator

Follow the below steps to use curator configuration file and action file, and resolve your query.

`Step1:`  
create configuration file of curator.The default location of the configuration file is ~/.curator/curator.yml, it's not mandatory to create on the same path, you can create configuration file on any location, but you need to specified using the --config on the command line.  
Use the below template to create curator.yml file.

> #Remember, leave a key empty if there is no value. None will be a string,  
> #not a Python "NoneType"  
> client:  
> hosts:  
> - 127.0.0.1  
> port: 9200  
> 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']

`Step2:`

Create action file either on the default location ~/.curator/action.yml or any another location. Create action file, which you need to perform on the indices.  
use below template to create action file.

> #Remember, leave a key empty if there is no value. None will be a string,  
> #not a Python "NoneType"
> 
> # 
> 
> #Also remember that all examples have 'disable\_action' set to True. If you  
> #want to use this action as a template, be sure to set this to False after  
> #copying it.  
> actions:  
> 1:  
> action: ACTION1  
> description: OPTIONAL DESCRIPTION  
> options:  
> option1: value1  
> ...  
> optionN: valueN  
> continue\_if\_exception: False  
> disable\_action: True  
> filters:  
> - filtertype: _first_  
> filter\_element1: value1  
> ...  
> filter\_elementN: valueN  
> - filtertype: _second_  
> filter\_element1: value1  
> ...  
> filter\_elementN: valueN  
> 2:  
> action: ACTION2  
> description: OPTIONAL DESCRIPTION  
> options:  
> option1: value1  
> ...  
> optionN: valueN  
> continue\_if\_exception: False  
> disable\_action: True  
> filters:  
> - filtertype: _first_  
> filter\_element1: value1  
> ...  
> filter\_elementN: valueN  
> - filtertype: _second_  
> filter\_element1: value1  
> ...  
> filter\_elementN: valueN  
> 3:  
> action: ACTION3  
> ...  
> 4:  
> action: ACTION4  
> ...

`Step3:`  
Now perform the action using below command.

> curator [--config CONFIG.YML] [--dry-run] ACTION\_FILE.YML  
> a) If you were using default path to create both configuration and action file.  
> curator ~/.curator/curator.yml --dry-run ~/.curator/action.yml  
> b) If you were using any other location to create configuration and action file.  
> curator --config /path/of/curator.yml --dry-run /path/of/action.yml

You can also use curator binary path location instead of curator in command line interface.  
`For example: /usr/bin/curator [--config CONFIG.YML] [--dry-run] ACTION_FILE.YML`

I hope the above steps will help to resolve your problem.  
please feel free and revert in case of any query.

Thanks.

---

<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 27, 2018, 10:58am UTC](https://discuss.elastic.co/t/facing-problem-to-create-curator-yml-file/142067/6 "2018-08-27T10:58:45Z")

</div>

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