# Unable to read modules. Modules is looking at different path

**URL:** <https://discuss.elastic.co/t/unable-to-read-modules-modules-is-looking-at-different-path/198118>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 4, 2019, 11:13pm UTC](https://discuss.elastic.co/t/unable-to-read-modules-modules-is-looking-at-different-path/198118 "2019-09-04T23:13:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srisamardh](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@Srisamardh](https://discuss.elastic.co/u/Srisamardh)\
**Post date:** [September 4, 2019, 11:13pm UTC](https://discuss.elastic.co/t/unable-to-read-modules-modules-is-looking-at-different-path/198118/1 "2019-09-04T23:13:47Z")

</div>

I am new to filebeat. I am trying to setup the apache module using kubernetes to get the logs from container.

I am seeing the following error:  
"ERROR fileset/modules.go:125 Not loading modules. Module directory not found: /etc/filebeat/module"

I am mounting below config map to the pod in the path "/etc/filebeat/modules.d/apache.yml"  
Image used: [docker.elastic.co/beats/filebeat:7.1.1](http://docker.elastic.co/beats/filebeat:7.1.1)  
apiVersion: v1  
kind: ConfigMap  
metadata:  
name: filebeat-module  
namespace: kube-system  
labels:  
k8s-app: filebeat  
data:  
apache.yml: |-  
- module: apache  
access:  
enabled: true  
var.paths: ["/var/testapp/logs/_/_.log"]

Below configmap is mounted to "/etc/filebeat/filebeat.yml"  
apiVersion: v1  
kind: ConfigMap  
metadata:  
name: filebeat-config  
namespace: kube-system  
labels:  
k8s-app: filebeat  
data:  
filebeat.yml: |-  
filebeat.config:  
path.config: /usr/share/filebeat/  
inputs:  
# Mounted `filebeat-inputs` configmap:  
path: {path.config}/inputs.d/\*.yml # Reload inputs configs as they change: reload.enabled: false modules: enabled: true path: {path.config}/modules.d/_.yml  
 #path: /etc/modules.d/_.yml  
# Reload module configs as they change:  
reload.enabled: false

```
# To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
#filebeat.autodiscover:
# providers:
# - type: kubernetes
# hints.enabled: true

processors:
  - add_cloud_metadata:

#cloud.id: ${ELASTIC_CLOUD_ID}
#cloud.auth: ${ELASTIC_CLOUD_AUTH}

output.elasticsearch:
  hosts: ["host:port"]
  protocol: "http"
  username: "TEST"
  password: "TEST"

```

What am I missing? let me know if you need any other details:

---

<div class="post-metadata">

**Author:** ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)\
**Post date:** [September 11, 2019, 10:16pm UTC](https://discuss.elastic.co/t/unable-to-read-modules-modules-is-looking-at-different-path/198118/2 "2019-09-11T22:16:15Z")

</div>

Are you missing "$" in front of {path.config}?

[https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-reloading.html](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-reloading.html)

---

<div class="post-metadata">

**Author:** ![Srisamardh](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@Srisamardh](https://discuss.elastic.co/u/Srisamardh)\
**Post date:** [September 12, 2019, 3:21am UTC](https://discuss.elastic.co/t/unable-to-read-modules-modules-is-looking-at-different-path/198118/3 "2019-09-12T03:21:23Z")

</div>

Thanks Daniel for your response.

I tried with $ before and it didn't work. Do you want any other info from em to debug?

---

<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:** [October 10, 2019, 3:21am UTC](https://discuss.elastic.co/t/unable-to-read-modules-modules-is-looking-at-different-path/198118/4 "2019-10-10T03:21:30Z")

</div>

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