# Filebeat not Generating Service Logs in Windows 10

**URL:** <https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 16, 2020, 5:31am UTC](https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245 "2020-04-16T05:31:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)\
**Post date:** [April 16, 2020, 5:31am UTC](https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245/1 "2020-04-16T05:31:38Z")

</div>

Filebeat is not generating service logs.  
It was installed using the script ".\install-service-filebeat.ps1"

It was generating logs few hours ago, it stops generating logs after I deleted the "logs" directory.  
All configurations are left default with only changing output from Elasticsearch to Logstash.

**OS version** : Windows 10 version 1909 (OS Build 18363.778)

**Filebeat version** :  
filebeat version 7.6.2 (386), libbeat 7.6.2 [d57bcf8684602e15000d65b75afcd110e2b12b59 built 2020-03-26 05:25:24 +0000 UTC]

---

<div class="post-metadata">

**Author:** ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)\
**Post date:** [April 16, 2020, 5:36am UTC](https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245/2 "2020-04-16T05:36:36Z")

</div>

[UPDATE]

Even not working if I uninstall the service, remove the whole directory, unzip the package and install the service again. There is still no "logs" directory existing.

---

<div class="post-metadata">

**Author:** ![oneoneonepig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oneoneonepig/32/66018_2.png) [@oneoneonepig](https://discuss.elastic.co/u/oneoneonepig)\
**Post date:** [April 16, 2020, 6:04am UTC](https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245/3 "2020-04-16T06:04:34Z")

</div>

[UPDATE]

The log path is specified in the script `install-service-filebeat.bat`

```auto
New-Service -name filebeat `
  -displayName Filebeat `
  -binaryPathName "`"$workdir\filebeat.exe`" -c `"$workdir\filebeat.yml`" -path.home `"$workdir`" -path.data `"C:\ProgramData\filebeat`" -path.logs `"C:\ProgramData\filebeat\logs`" -E logging.files.redirect_stderr=true"

```

The path data and logs are hard coded, which is not what defines in the directory layout docs [1]  
Explicitly specify the log path using `logging.files.path: "C:/filebeat/logs"` will solve the problem.

Just wondering why it is hard coded in the powershell script?

[1] [https://www.elastic.co/guide/en/beats/filebeat/current/directory-layout.html#\_zip\_tar\_gz\_or\_tgz](https://www.elastic.co/guide/en/beats/filebeat/current/directory-layout.html#_zip_tar_gz_or_tgz)

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [April 16, 2020, 7:11am UTC](https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245/4 "2020-04-16T07:11:53Z")

</div>

ProgramData is usually a more appropriate directory for storing data files, e.g. logs. Feel free to modify the script to your needs.

---

<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:** [May 14, 2020, 7:12am UTC](https://discuss.elastic.co/t/filebeat-not-generating-service-logs-in-windows-10/228245/5 "2020-05-14T07:12:08Z")

</div>

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