# How to run logstash conf file in background?

**URL:** <https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022>\
**Category:** Logstash\
**Created:** [June 22, 2018, 12:45pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022 "2018-06-22T12:45:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mamta](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mamta](https://discuss.elastic.co/u/mamta)\
**Post date:** [June 22, 2018, 12:45pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/1 "2018-06-22T12:45:14Z")

</div>

Hey,

I have installed ELK 5.6.8 on Redhat machine. I am using this to show MySQL database records on kibana. I have kept mysql\_logstash.conf file in /etc/logstash/conf.d directory but still it's not running in the backend. Manually I am able to run it from /usr/share/logstash/bin directory. My Apache access logs conf file is successfully running in backed from /etc/logstash/conf.d directory.

Is there any problem with database connectivity?

---

<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:** [June 25, 2018, 9:53pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/2 "2018-06-25T21:53:27Z")

</div>

Have you checked the Logstash logs for clues? Perhaps the logstash user can't access the MySQL socket?

---

<div class="post-metadata">

**Author:** ![mamta](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mamta](https://discuss.elastic.co/u/mamta)\
**Post date:** [June 26, 2018, 4:34am UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/3 "2018-06-26T04:34:38Z")

</div>

Yes. I have checked logstash logs but there are no such errors. What would be the best way to give MySQL socket access to logstash user?  
Thank you.

---

<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:** [June 26, 2018, 6:34am UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/4 "2018-06-26T06:34:43Z")

</div>

> Yes. I have checked logstash logs but there are no such errors.

Okay, but are there any signs that the query is made at all? How do you know the correct configuration is even being loaded? If you bump up Logstash's loglevel you'll get additional debugging output.

> What would be the best way to give MySQL socket access to logstash user?

Presumably socket access is guarded by a group. The logstash user needs to be in that group.

---

<div class="post-metadata">

**Author:** ![mamta](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mamta](https://discuss.elastic.co/u/mamta)\
**Post date:** [June 26, 2018, 9:00am UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/5 "2018-06-26T09:00:24Z")

</div>

Can we give logstash user to mysql access by chown ?

---

<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:** [June 26, 2018, 9:21am UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/6 "2018-06-26T09:21:50Z")

</div>

Not unless you want to grant access to everyone, I suppose, but I don't really know anything about MySQL's domain sockets.

---

<div class="post-metadata">

**Author:** ![mamta](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mamta](https://discuss.elastic.co/u/mamta)\
**Post date:** [June 26, 2018, 9:33am UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/7 "2018-06-26T09:33:00Z")

</div>

Thank you @magnusbaeck.  
Will check it out.

---

<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 24, 2018, 9:33am UTC](https://discuss.elastic.co/t/how-to-run-logstash-conf-file-in-background/137022/8 "2018-07-24T09:33:01Z")

</div>

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