# How logstash work?

**URL:** <https://discuss.elastic.co/t/how-logstash-work/124479>\
**Category:** Logstash\
**Created:** [March 19, 2018, 4:53am UTC](https://discuss.elastic.co/t/how-logstash-work/124479 "2018-03-19T04:53:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![retxedue](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@retxedue](https://discuss.elastic.co/u/retxedue)\
**Post date:** [March 19, 2018, 4:53am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/1 "2018-03-19T04:53:08Z")

</div>

I want to understand if i enabled logatash service via systemctl. How often does it read the logstash config i created? Is there a way i can increase frequency of reading the config file i made?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 19, 2018, 7:19am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/2 "2018-03-19T07:19:20Z")

</div>

These questions are explained at [https://www.elastic.co/guide/en/logstash/current/reloading-config.html](https://www.elastic.co/guide/en/logstash/current/reloading-config.html).

---

<div class="post-metadata">

**Author:** ![retxedue](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@retxedue](https://discuss.elastic.co/u/retxedue)\
**Post date:** [March 19, 2018, 9:59am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/3 "2018-03-19T09:59:37Z")

</div>

Thanks for the response. Since logstash service is enable should i still need to use below command and add in crontab?

bin/logstash –f apache.config --config.reload.automatic

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 19, 2018, 10:45am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/4 "2018-03-19T10:45:32Z")

</div>

No, the point of running it as a background service is to not have to run it via e.g. cron.

---

<div class="post-metadata">

**Author:** ![retxedue](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@retxedue](https://discuss.elastic.co/u/retxedue)\
**Post date:** [March 19, 2018, 11:02am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/5 "2018-03-19T11:02:27Z")

</div>

you mean i will still use systemctl ? i just need to update my startup script? /etc/systemd/system/logstash.service ?

Also, my source csv file is received from my samba directory every 2 hours will my dashboard update as well ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 19, 2018, 12:13pm UTC](https://discuss.elastic.co/t/how-logstash-work/124479/6 "2018-03-19T12:13:16Z")

</div>

> you mean i will still use systemctl ?

Yes.

> i just need to update my startup script? /etc/systemd/system/logstash.service ?

Try to use /etc/default/logstash or /etc/sysconfig/logstash if either is available on your system. I don't remember exactly how it's being set up by the installation scripts.

> Also, my source csv file is received from my samba directory every 2 hours will my dashboard update as well ?

I don't know anything about your dashboard to I can't answer.

---

<div class="post-metadata">

**Author:** ![retxedue](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@retxedue](https://discuss.elastic.co/u/retxedue)\
**Post date:** [March 19, 2018, 12:18pm UTC](https://discuss.elastic.co/t/how-logstash-work/124479/7 "2018-03-19T12:18:49Z")

</div>

> [@magnusbaeck](#):
>
> I don't know anything about your dashboard to I can't answer.

Sorry for that. The indeces from the output will be used for my grafana dashbord 🙂

---

<div class="post-metadata">

**Author:** ![retxedue](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@retxedue](https://discuss.elastic.co/u/retxedue)\
**Post date:** [April 3, 2018, 10:55am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/8 "2018-04-03T10:55:43Z")

</div>

question i usually get my input file every 10minutes. And i notice that my index is not updating. What i did was i created a cron that will restart logstash service to update the index. I am not sure if that is the correct approach?

---

<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 1, 2018, 10:55am UTC](https://discuss.elastic.co/t/how-logstash-work/124479/9 "2018-05-01T10:55:49Z")

</div>

Closed on May 1, 2018, 10:55am UTC

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