# Logstash not pushing data which are adding in a log file

**URL:** <https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982>\
**Category:** Logstash\
**Created:** [July 20, 2016, 1:12pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982 "2016-07-20T13:12:56Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:12pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/1 "2016-07-20T13:12:56Z")

</div>

Hi,

My logstash conf file is

input {  
file {  
type =\> "name1"  
path =\> "/var/log/alerts.json"  
codec =\> "json"  
}  
}  
filter {

}

output {  
#stdout { codec =\> rubydebug }  
elasticsearch {  
hosts =\> ["127.0.0.1:9200"]  
index =\> "ossec-%{+YYYY.MM.dd}"  
document\_type =\> "osq"  
template =\> "/etc/logstash/xys.json"  
template\_name =\> "xyz"

```
}

```

}

For the first time ,new index got created but with time new rows gets added in /var/log/alerts.json file ,but our logstash service is not pushing new data to ES an don ES it show only one index and no new data .

Please Help

Thanks  
Gaurav

---

<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:** [July 20, 2016, 1:16pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/2 "2016-07-20T13:16:24Z")

</div>

To debug, disable your elasticsearch output and enable the currently commented out stdout output. Append a line to /var/log/alerts.json:

```
echo '{"message": "test"}' >> /var/log/alerts.json

```

What happens?

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:20pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/3 "2016-07-20T13:20:22Z")

</div>

Nothing happend .The message got appended in my log file but nothing on my console

---

<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:** [July 20, 2016, 1:24pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/4 "2016-07-20T13:24:42Z")

</div>

Okay. Enable at least verbose logs by starting Logstash with `--verbose` and check the logs for clues. It'll tell you which files the filename pattern expands to (should of course be exactly one in this case) and whether it has any trouble opening the file.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:27pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/5 "2016-07-20T13:27:06Z")

</div>

I am running logstash as 'service logstash start' and how should i enable verbose here and where should i see logs

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:27pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/6 "2016-07-20T13:27:47Z")

</div>

Is there any .sincedb issue

---

<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:** [July 20, 2016, 1:30pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/7 "2016-07-20T13:30:07Z")

</div>

> I am running logstash as 'service logstash start' and how should i enable verbose here

See /etc/sysconfig/logstash or /etc/default/logstash depending on your distribution.

> and where should i see logs

I'm confused. You said there was nothing produced by the stdout output and now you don't seem to know where the logs are. So you're starting Logstash with `service logstash start`? Exactly how did you determine that nothing happened when you appended a line to the .json file?

> Is there any .sincedb issue

Probably not since we're appending new data.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:34pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/8 "2016-07-20T13:34:10Z")

</div>

more logstash.log  
{:timestamp=\>"2016-07-20T17:52:32.612000+0530", :message=\>"Pipeline main started  
"}

---

<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:** [July 20, 2016, 1:37pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/9 "2016-07-20T13:37:23Z")

</div>

And where is this logstash.log file?

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:39pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/10 "2016-07-20T13:39:29Z")

</div>

under /etc/default/logstash

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 1:49pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/11 "2016-07-20T13:49:34Z")

</div>

any help

---

<div class="post-metadata">

**Author:** ![Gaurav\_Harsola](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gaurav\_Harsola](https://discuss.elastic.co/u/Gaurav_Harsola)\
**Post date:** [July 20, 2016, 2:13pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/12 "2016-07-20T14:13:46Z")

</div>

I have tried all the option ..Help highly appreciated

---

<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:** [July 20, 2016, 2:34pm UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/13 "2016-07-20T14:34:51Z")

</div>

> under /etc/default/logstash

What? That's not where any sanely configured Logstash stores its log. When you start Logstash as a service it'll send its logs to the /var/log/logstash directory.

---

<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, 4:47am UTC](https://discuss.elastic.co/t/logstash-not-pushing-data-which-are-adding-in-a-log-file/55982/14 "2017-07-06T04:47:16Z")

</div>


