# Filebeat apache2 configuration

**URL:** <https://discuss.elastic.co/t/filebeat-apache2-configuration/139927>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 13, 2018, 11:10am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927 "2018-07-13T11:10:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cahlasem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cahlasem/32/33319_2.png) [@cahlasem](https://discuss.elastic.co/u/cahlasem)\
**Post date:** [July 13, 2018, 11:10am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/1 "2018-07-13T11:10:03Z")

</div>

Hi All,

I am just trying elastic cloud and want to forward my apache logs into the cloud. I am getting my website up and running using XAMPP

The installation location is at C:\AppServ

I try to enable apache2 module and edit the configuration to meet my apache2 logs location but the logs never shown on the dashboard

This is the configuration i made

- module: apache2

# Access logs

access:  
enabled: true  
var.paths: ["C:\AppServ\Apache24\logs\access.log\*"]

# Error logs

error:  
enabled: true  
var.paths: ["C:\AppServ\Apache24\logs\error.log\*"]  
I try to run \filebeat.exe setup but got this error

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/5/955a95738c8a3aed99a7e3b42ac477195cdfde5b.png)

---

<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:** [July 13, 2018, 2:41pm UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/2 "2018-07-13T14:41:19Z")

</div>

Hi @cahlasem and welcome! 🙂

As the path contains backslashes, they have to be enclosed between single quotes (`var.paths: ['C:\AppServ\Apache24\logs\access.log*']` or escaped (with double backslash `\\`).

---

<div class="post-metadata">

**Author:** ![cahlasem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cahlasem/32/33319_2.png) [@cahlasem](https://discuss.elastic.co/u/cahlasem)\
**Post date:** [July 13, 2018, 3:40pm UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/3 "2018-07-13T15:40:57Z")

</div>

Hi @jsoriano Thanks for your help, i think it works now because there is no error when i run filebeat setup. But in the Kibana Dashboard and Discover menu i do not see any logs coming in, i already triggered a lot of logs into my dummy website.  
Where to check whether filebeat already sent the logs to the cloud or failed in reading the logs?

---

<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:** [July 13, 2018, 5:03pm UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/4 "2018-07-13T17:03:05Z")

</div>

You can check filebeat logs, there will appear any error. You can also see in the logs when filebeat starts reading a file on lines like:

```auto
INFO log/harvester.go:228 Harvester started for file: C:\AppServ\Apache24\...

```

If you don't see any of these lines, check that the paths where apache is writing match the path you configured in `var.paths`.

---

<div class="post-metadata">

**Author:** ![cahlasem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cahlasem/32/33319_2.png) [@cahlasem](https://discuss.elastic.co/u/cahlasem)\
**Post date:** [July 14, 2018, 3:40am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/5 "2018-07-14T03:40:21Z")

</div>

Now i can get it work, the next problem is that Kibana or Elastic ( i am not sure which one) changed my timestamp into their timezone like seen below. Where is the configuration to make elastic/kibana stick into my logs timestamp?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/e/ee78c3576225d3d6db498dd25207d92670603bfc.png)

---

<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:** [July 14, 2018, 11:35am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/6 "2018-07-14T11:35:32Z")

</div>

You can use the [`var.convert_timezone`](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-system.html#_literal_syslog_literal_fileset_settings) option, that reads the local timezone and uses it to parse the timestamp in the logs and convert it to UTC.

---

<div class="post-metadata">

**Author:** ![cahlasem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cahlasem/32/33319_2.png) [@cahlasem](https://discuss.elastic.co/u/cahlasem)\
**Post date:** [July 15, 2018, 3:03am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/7 "2018-07-15T03:03:55Z")

</div>

Already set var.convert\_timezone to true and in the kibana i got beat.timezone field is added, but the conversion to UTC is not made, i am running the latest elasticsearch, kibana and filebeat  
Any additional configuration i missed?

Should i add var.convert\_timezone in every modules that i enabled? i just tried in system modules only

![image](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bfbd7e88eb9f135d913a1d8a5b9abfc546477cf5.png)

---

<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:** [July 18, 2018, 10:26am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/8 "2018-07-18T10:26:23Z")

</div>

Kibana shows dates in the timezone of your browser by default, you can see the `@timestamp` value really stored in elasticsearch looking at the `JSON` tab.

You can change the timezone kibana uses with the `dateFormat:tz` setting in the Advanced Settings in the management tab.

---

<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:** [August 1, 2018, 10:32am UTC](https://discuss.elastic.co/t/filebeat-apache2-configuration/139927/9 "2018-08-01T10:32:54Z")

</div>

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