# How does the LogStash collect Windows Event Logs

**URL:** <https://discuss.elastic.co/t/how-does-the-logstash-collect-windows-event-logs/24842>\
**Category:** Logstash\
**Created:** [July 3, 2015, 7:17am UTC](https://discuss.elastic.co/t/how-does-the-logstash-collect-windows-event-logs/24842 "2015-07-03T07:17:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohanguttikonda](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mohanguttikonda](https://discuss.elastic.co/u/mohanguttikonda)\
**Post date:** [July 3, 2015, 7:17am UTC](https://discuss.elastic.co/t/how-does-the-logstash-collect-windows-event-logs/24842/1 "2015-07-03T07:17:49Z")

</div>

Hi,

How does the LogStash collect Windows Event Logs? is it directly reading the .evtx files using WMI or does it depend on any events to receive the windows event logs?

**logstash.conf**

input {  
eventlog {  
type =\> "eventlog"  
}  
}

I have gone through the link [https://github.com/elastic/logstash/blob/v1.1.1/lib/logstash/inputs/eventlog.rb](https://github.com/elastic/logstash/blob/v1.1.1/lib/logstash/inputs/eventlog.rb), it looks like the log files are read directly.

Please confirm if my understanding is correct, this is just for my reference.

Thanks & Regards,  
Mohan G

---

<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:** [July 6, 2017, 5:35am UTC](https://discuss.elastic.co/t/how-does-the-logstash-collect-windows-event-logs/24842/2 "2017-07-06T05:35:37Z")

</div>


