# Apm-server logs

**URL:** https://discuss.elastic.co/t/apm-server-logs/208998
**Category:** APM
**Tags:** server
**Created:** [November 22, 2019, 3:03am UTC](https://discuss.elastic.co/t/apm-server-logs/208998 "2019-11-22T03:03:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ashwin\_Iyer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_iyer/32/46158_2.png) [@Ashwin\_Iyer](https://discuss.elastic.co/u/Ashwin_Iyer)
#### Post date: [November 22, 2019, 3:03am UTC](https://discuss.elastic.co/t/apm-server-logs/208998/1 "2019-11-22T03:03:35Z")

</div>

if I pull apm-server:6.7.0 simply from the internet and try and run this container as is, I can't seem to find the logs at all?

I ran:  
docker run -it [docker.elastic.co/apm/apm-server:6.7.0](http://docker.elastic.co/apm/apm-server:6.7.0) /bin/bash

And then ran:  
bash-4.2$ cd /var/log/  
bash-4.2$ pwd  
/var/log  
bash-4.2$ ls  
btmp grubby\_prune\_debug lastlog tallylog wtmp yum.log  
bash-4.2$ cd  
bash-4.2$ ls  
LICENSE.txt NOTICE.txt README.md apm-server apm-server.yml data fields.yml ingest kibana logs  
bash-4.2$ cd logs/  
bash-4.2$ ls  
bash-4.2$

I am told that the logging on apm-server 6.7.0 should default to /var/log/apm-server  
[https://www.elastic.co/guide/en/apm/server/6.7/configuration-logging.html](https://www.elastic.co/guide/en/apm/server/6.7/configuration-logging.html)

why is it not here?

---

<div class="post-metadata">

### Author: ![ByEmke](https://avatars.discourse-cdn.com/v4/letter/b/b9bd4f/32.png) [@ByEmke](https://discuss.elastic.co/u/ByEmke)
#### Post date: [November 22, 2019, 11:34am UTC](https://discuss.elastic.co/t/apm-server-logs/208998/2 "2019-11-22T11:34:47Z")

</div>

If I am not mistaken, when you run

```
docker run -it docker.elastic.co/apm/apm-server:6.7.0 /bin/bash

```

you override container start script, and the apm server never starts, hence no logging appearing

try running the container first

```
docker run -d -it --name apm docker.elastic.co/apm/apm-server:6.7.0

```

and then connecting to it, to see if you find those logs

```
docker exec -it apm bash

```

EDIT: also docker image does not log to files by default, you can get the logs by running `docker container logs apm` based on the above example. If you still want to log to files, you will have to either override the config or build a custom image

---

<div class="post-metadata">

### Author: ![Ashwin\_Iyer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_iyer/32/46158_2.png) [@Ashwin\_Iyer](https://discuss.elastic.co/u/Ashwin_Iyer)
#### Post date: [November 22, 2019, 4:53pm UTC](https://discuss.elastic.co/t/apm-server-logs/208998/3 "2019-11-22T16:53:28Z")

</div>

what specifically should I add so it overrides the config? my understanding was that apm-server by default logs to /var/log. this is what it did when I ran it in the vm

EDIT: you are saying that this same default logging of apm-server to /var/log does not apply to the container I guess?

What I will do is custom configure it to log in a specific directory of the container and work with that. I will overtly put in the config to log to var/log

Either that or I will look at ways to turn docker logs to log to the VM. that would be the second option

---

<div class="post-metadata">

### Author: ![Ashwin\_Iyer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_iyer/32/46158_2.png) [@Ashwin\_Iyer](https://discuss.elastic.co/u/Ashwin_Iyer)
#### Post date: [November 22, 2019, 11:01pm UTC](https://discuss.elastic.co/t/apm-server-logs/208998/4 "2019-11-22T23:01:36Z")

</div>

/usr/share/apm-server/bin/apm-server -c /etc/apm-server/apm-server.yml --path.logs /var/log &

I used this command in a docker container and its doing what I want it to

Thanks for the help!

---

<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: [December 13, 2019, 7:01pm UTC](https://discuss.elastic.co/t/apm-server-logs/208998/5 "2019-12-13T19:01:40Z")

</div>

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