# Missing authentication token MetricBeat

**URL:** <https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912>\
**Category:** Logstash\
**Created:** [January 9, 2017, 3:54am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912 "2017-01-09T03:54:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 9, 2017, 3:54am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/1 "2017-01-09T03:54:27Z")

</div>

helo, i have an issue with metricbeat.  
before i install xpack, metricbeat running very well.

but suddenly after i install xpack, i cant access it from my kibana.  
i run this command in my terminal :  
`curl -XGET 'http://localhost:9200/metricbeat-*/_search?pretty'`

but i got this error msg

> missing authentication token for REST request [/metricbeat-\*/\_search?pretty]

i already changed my metricbeat.yml

```
  # Optional protocol and basic auth credentials.
  #protocol: "https"
  username: "elastic"
  password: "techno2013"

#output.logstash:
  # The Logstash hosts
  hosts: ["localhost:5044"]

```

but i still got the same error msg.  
pls guys help me out.

thank you.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 9, 2017, 3:55am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/2 "2017-01-09T03:55:42Z")

</div>

Can you curl ES with those auth details successfully?

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 9, 2017, 4:04am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/3 "2017-01-09T04:04:24Z")

</div>

yes sir. idk what happen. is there something wrong with config file?

---

<div class="post-metadata">

**Author:** ![maddin2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maddin2016/32/16599_2.png) [@maddin2016](https://discuss.elastic.co/u/maddin2016)\
**Post date:** [January 9, 2017, 8:45am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/4 "2017-01-09T08:45:46Z")

</div>

I assume you redirect your metricbeat to logstash. Do you have set credentials in logstash?

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 9, 2017, 9:24am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/5 "2017-01-09T09:24:48Z")

</div>

what do you mean?  
i already open logstash.yml  
as long as i know, there is no place to set credential there.

pls correct me if im wrong.

thanks.

---

<div class="post-metadata">

**Author:** ![maddin2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maddin2016/32/16599_2.png) [@maddin2016](https://discuss.elastic.co/u/maddin2016)\
**Post date:** [January 9, 2017, 9:37am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/6 "2017-01-09T09:37:34Z")

</div>

See [here](https://www.elastic.co/guide/en/shield/current/logstash.html)

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 9, 2017, 10:01am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/7 "2017-01-09T10:01:17Z")

</div>

im quite confuse since the docs is for the old version of shield.

> By default, the Shield plugin installs a dedicated user role that enables the creation of indices with names that match the logstash-\* regular expression, along with privileges to read, index, update, and delete documents in those indices:

> logstash:  
> cluster:  
> - manage\_index\_templates  
> indices:  
> - names: 'logstash-\*'  
> privileges:  
> - write  
> - read  
> - create\_index

what is that mean?  
where i can find shield config file?  
can you help me.

---

<div class="post-metadata">

**Author:** ![maddin2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maddin2016/32/16599_2.png) [@maddin2016](https://discuss.elastic.co/u/maddin2016)\
**Post date:** [January 9, 2017, 10:04am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/8 "2017-01-09T10:04:02Z")

</div>

I mean the part `Basic Authentication`. See [here](https://www.elastic.co/guide/en/shield/current/logstash.html#ls-http-auth-basic). Did you try with user and password?

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 9, 2017, 10:09am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/9 "2017-01-09T10:09:07Z")

</div>

yes im using username and password.

---

<div class="post-metadata">

**Author:** ![maddin2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maddin2016/32/16599_2.png) [@maddin2016](https://discuss.elastic.co/u/maddin2016)\
**Post date:** [January 9, 2017, 10:17am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/10 "2017-01-09T10:17:43Z")

</div>

I'm not so familiar with logstash and XPack. But it seems more a failure of the combination of logstash and elastic/xpack. Can you please post this question in the logstash forum. Thanks!!

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 9, 2017, 10:27am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/11 "2017-01-09T10:27:41Z")

</div>

thank you for the suggestion.  
means alot.

i will repost this question to logstash forum.

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:** [February 6, 2017, 10:27am UTC](https://discuss.elastic.co/t/missing-authentication-token-metricbeat/70912/12 "2017-02-06T10:27:52Z")

</div>

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