# Need help in configuring the logstash on windows box

**URL:** <https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690>\
**Category:** Logstash\
**Created:** [December 21, 2015, 12:04pm UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690 "2015-12-21T12:04:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lokesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@Lokesh\_Kumar](https://discuss.elastic.co/u/Lokesh_Kumar)\
**Post date:** [December 21, 2015, 12:04pm UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/1 "2015-12-21T12:04:30Z")

</div>

I am new to this can you guide me how to capture the data from /var/log/messages based on some keywords and want to see the messages on dashboard/send an email.

steps:

1. need to read the /var/log/messages for keywords like 'restart'/'event'
2. capture the data from that message (above 5 lines and below 5 lines)
3. captured data need to be written in to log file with timestamp
4. that file need to be sent to mail

could you please help me how to do this basic code. I will enhance based on my requirement

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 22, 2015, 6:34am UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/2 "2015-12-22T06:34:46Z")

</div>

What do you have at the moment?

---

<div class="post-metadata">

**Author:** ![Lokesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@Lokesh\_Kumar](https://discuss.elastic.co/u/Lokesh_Kumar)\
**Post date:** [December 22, 2015, 6:44am UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/3 "2015-12-22T06:44:08Z")

</div>

Hi Mark,

I have installed Elasticsearch, logstash , kibana . all the services are up and running.

I am able to open kibana service in my browser.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/d/d4229a2cafef023ad8983fd030a120f23de7b022.png)

But i want to configure my local database system and capture the data rom /var/log/messages based on some keywords.

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 22, 2015, 6:53am UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/4 "2015-12-22T06:53:14Z")

</div>

There is no `/var/log/messages` on Windows though?

---

<div class="post-metadata">

**Author:** ![Lokesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/l/ecd19e/32.png) [@Lokesh\_Kumar](https://discuss.elastic.co/u/Lokesh_Kumar)\
**Post date:** [December 22, 2015, 11:07am UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/5 "2015-12-22T11:07:56Z")

</div>

/var/log/messages is path on database machine , from there we can collect the information.

I want collect these messages on dashboard using logstash, kibana and elasticsearch.

Could you please help me how can I perform these task as i mentioned above.

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 22, 2015, 8:07pm UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/6 "2015-12-22T20:07:26Z")

</div>

Then you need something like filebeat to sent that to an LS instance on your Windows machine.

---

<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:17am UTC](https://discuss.elastic.co/t/need-help-in-configuring-the-logstash-on-windows-box/37690/7 "2017-07-06T05:17:31Z")

</div>

Closed on July 6, 2017, 5:17am UTC


