# Stat metricbeat.yml: no such file or directory

**URL:** https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303
**Category:** Beats
**Tags:** metricbeat
**Created:** [August 25, 2020, 2:31pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303 "2020-08-25T14:31:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![teej](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@teej](https://discuss.elastic.co/u/teej)
#### Post date: [August 25, 2020, 2:31pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303/1 "2020-08-25T14:31:55Z")

</div>

Hi,  
I am new with the Beats. I did a yum install of metricbeat and followed the instructions on Elastic site for setting up a keystore but oddly when I try to do:

/usr/share/metricbeat/bin/metricbeat keystore create

I get:

/usr/share/metricbeat/bin/metricbeat keystore create error initializing beat: error loading config file: stat metricbeat.yml: no such file or directory

On another machine, we installed filebeat without and created the keystore with no issues. Has anyone experienced this? What caused it? Thank you.

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [August 26, 2020, 8:14pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303/2 "2020-08-26T20:14:18Z")

</div>

Hey @teej,

> [@teej](#):
>
> /usr/share/metricbeat/bin/metricbeat keystore create

Try to run this command without the full path, just like this:

```auto
metricbeat keystore create

```

---

<div class="post-metadata">

### Author: ![teej](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@teej](https://discuss.elastic.co/u/teej)
#### Post date: [August 27, 2020, 2:29pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303/3 "2020-08-27T14:29:08Z")

</div>

J,  
That worked! But why? I mean thank you but Im curious why the full path didnt work? Usually when doing this with the elastic keystore its the full path that works.

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [August 27, 2020, 3:05pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303/4 "2020-08-27T15:05:14Z")

</div>

The `metricbeat` that is in your path is a script, located in `/usr/bin/metricbeat` that sets some flags and then runs the binary in `/usr/share/metricbeat/bin/metricbeat`.

---

<div class="post-metadata">

### Author: ![teej](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@teej](https://discuss.elastic.co/u/teej)
#### Post date: [August 28, 2020, 1:39pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303/5 "2020-08-28T13:39:16Z")

</div>

Thank you Jaime.

---

<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: [September 25, 2020, 3:39pm UTC](https://discuss.elastic.co/t/stat-metricbeat-yml-no-such-file-or-directory/246303/6 "2020-09-25T15:39:19Z")

</div>

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