# Using cloudid in logstash

**URL:** <https://discuss.elastic.co/t/using-cloudid-in-logstash/186057>\
**Category:** Logstash\
**Created:** [June 17, 2019, 12:02pm UTC](https://discuss.elastic.co/t/using-cloudid-in-logstash/186057 "2019-06-17T12:02:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![werowe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/werowe/32/47523_2.png) [@werowe](https://discuss.elastic.co/u/werowe)\
**Post date:** [June 17, 2019, 12:02pm UTC](https://discuss.elastic.co/t/using-cloudid-in-logstash/186057/1 "2019-06-17T12:02:00Z")

</div>

This feature must be new because there are no examples.

You are supposed to put cloud.id and cloud.auth in config/logstash.yml.

My understanding is that would override the url provided in the logstash config file.But I get error 401, meaning it has not passed credentials to ES cloud. So what would you put here for hosts? It seems having the cloud.id would mean you don't need to put anything there at all.

output {  
elasticsearch {  
hosts =\> ["[https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243](https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243)"]  
manage\_template =\> false  
index =\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"  
}  
}

---

<div class="post-metadata">

**Author:** ![werowe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/werowe/32/47523_2.png) [@werowe](https://discuss.elastic.co/u/werowe)\
**Post date:** [June 19, 2019, 7:11pm UTC](https://discuss.elastic.co/t/using-cloudid-in-logstash/186057/3 "2019-06-19T19:11:14Z")

</div>

Seems using the cloud id not supported. So you have to explicitly define the ES endpoint and send it the password. Too bad for that.

output {  
elasticsearch {  
hosts =\> ["[https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243](https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243)"]  
user =\> "elastic"  
password =\> "XXXXXXX"  
index =\> "logstash-%{+YYYY.MM.dd}"  
}  
}

---

<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:** [July 17, 2019, 7:15pm UTC](https://discuss.elastic.co/t/using-cloudid-in-logstash/186057/4 "2019-07-17T19:15:00Z")

</div>

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