# Logstash.conf not found for after installing logstash

**URL:** https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004
**Category:** Logstash
**Created:** [January 25, 2018, 8:56am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004 "2018-01-25T08:56:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 25, 2018, 8:56am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/1 "2018-01-25T08:56:36Z")

</div>

I have installed the logstash with the below link but I am not able to find logstash.conf in my system at the paths

/etc/logstash/cont.d  
/etc/init/  
/etc/init.d/

[https://www.elastic.co/guide/en/logstash/current/installing-logstash.html](https://www.elastic.co/guide/en/logstash/current/installing-logstash.html)

The OS is Ubuntu 16.04

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [January 25, 2018, 8:59am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/2 "2018-01-25T08:59:50Z")

</div>

What's inside of `/etc/logstash`?

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 25, 2018, 9:11am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/3 "2018-01-25T09:11:59Z")

</div>

I find below files

sawyer@algo-11:/etc/logstash$ ls  
conf.d jvm.options log4j2.properties logstash.yml startup.options

sawyer@algo-11:/etc/logstash$ cd conf.d  
sawyer@algo-11:/etc/logstash/conf.d$ ls -lrt  
total 0

When I provide the below commands it gives

sawyer@algo-11:~$ sudo systemctl start logstash.service  
sawyer@algo-11:~$ sudo initctl start logstash  
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

I have also run the command before installation

nbhagwath@algo-11: export JAVA\_HOME=/opt/jdk1.8.0\_151

---

<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: [January 25, 2018, 12:50pm UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/4 "2018-01-25T12:50:00Z")

</div>

Logstash doesn't ship with a file named logstash.conf. Are you conflating that file with logstash.yml (which should be found in /etc/logstash) or what makes you think logstash.conf should exist anywhere?

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 25, 2018, 3:11pm UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/5 "2018-01-25T15:11:20Z")

</div>

Fine now after going through the tutorials I was able to find it. But now I have given the encoder, inside the logback.xml. Only the debug and error logs are turned into JSON format, and other info, trace or not.

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [January 25, 2018, 9:58am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/6 "2018-01-25T09:58:24Z")

</div>

So you do have a conf.d, you just don't have anything in it. You need to  
create a file in it that has an input, filter and output inside. Then try  
running things

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 26, 2018, 8:37am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/7 "2018-01-26T08:37:52Z")

</div>

Hi, I have created.

Can you please let me know how do I capture all the types of the Logger.(ERROR, DEBUG, TRACE, INFO, and WARN)

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [January 26, 2018, 8:49am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/8 "2018-01-26T08:49:46Z")

</div>

try debug or trace

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 26, 2018, 8:50am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/9 "2018-01-26T08:50:53Z")

</div>

where should I try and configure the same

---

<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: [January 26, 2018, 10:23am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/10 "2018-01-26T10:23:16Z")

</div>

> where should I try and configure the same

Does the log file produced by your (Java?) application contain messages of all loglevels? If not then this isn't a Logstash problem.

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [January 26, 2018, 11:02am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/11 "2018-01-26T11:02:15Z")

</div>

/etc/logstash/logstash.yml. at the bottom

---

<div class="post-metadata">

### Author: ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)
#### Post date: [January 27, 2018, 1:12am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/13 "2018-01-27T01:12:06Z")

</div>

.I don't understand what you're asking

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 27, 2018, 1:36am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/14 "2018-01-27T01:36:20Z")

</div>

@seanziee: I have edited my question

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 27, 2018, 9:31pm UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/15 "2018-01-27T21:31:05Z")

</div>

@magnusbaeck: please answer to this question. It is the four questions above that I am facing available in this thread

---

<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: [January 28, 2018, 9:48pm UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/17 "2018-01-28T21:48:30Z")

</div>

> please answer to this question. It is the four questions above that I am facing available in this thread

Then please answer this question: Does the log file produced by your (Java?) application contain messages of all loglevels?

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 29, 2018, 2:37am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/18 "2018-01-29T02:37:19Z")

</div>

Yes it has all the log levels

---

<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: [January 29, 2018, 7:00am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/19 "2018-01-29T07:00:39Z")

</div>

Unless you have configured Logstash to drop certain messages I find it hard to believe that some messages aren't being processed. What does your Logstash configuration look like? And have you tried creating a minimal example that reproduces the problem? Like a tiny file with just a few log entries and a `stdout { codec => rubydebug }` Logstash output that just dumps all events?

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 29, 2018, 8:03am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/20 "2018-01-29T08:03:12Z")

</div>

Thanks for the acknowledgement,

I have created a file named logstash.conf inside /etc/logstash/conf.d/logstash.conf. The configuration is as below. But when with the below command. Even though I have added the line **path.settings: /etc/logstash/conf.d/** inside logstash.conf I still get the same issue.

```
  **sawyer@ford11:/usr/share/logstash$ bin/logstash -f logstash.conf**
  WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or 
  /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
  Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using 
  default config which logs errors to the console
 [ERROR] 2018-01-29 11:27:50.728 [Ruby-0-Thread-1: 
  /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] 
  sourceloader - No configuration found in the configured sources.

   input { stdin { } } 
   filter {
      mutate {
          strip => "message"
         }
     }
    output { 
            stdout { } 
            }
```

---

<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: [January 29, 2018, 8:08am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/21 "2018-01-29T08:08:33Z")

</div>

There are several problems here.

- You're running `bin/logstash -f logstash.conf` from /usr/share/logstash but logstash.conf is stored in /etc/logstash/conf.d so the file obviously won't be found.
- `path.settings` isn't a valid Logstash setting (see [https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html)).
- Even if `path.settings` were valid it should go in the settings file, logstash.yml, not a pipeline configuration file stored in /etc/logstash/conf.d.

---

<div class="post-metadata">

### Author: ![SawyerFord](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SawyerFord](https://discuss.elastic.co/u/SawyerFord)
#### Post date: [January 29, 2018, 9:38am UTC](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004/22 "2018-01-29T09:38:32Z")

</div>

Please let me know where do I run  
bin/logstash -f logstash.conf

when I run as below I get the error as  
saywer@ford11:/etc/logstash/conf.d$ logstash -f logstash.conf  
logstash: command not found

[Next page](https://discuss.elastic.co/t/logstash-conf-not-found-for-after-installing-logstash/117004.md?page=2)
