# \[SOLVE\] Logstash output works but fail to feed elasticsearch

**URL:** <https://discuss.elastic.co/t/solve-logstash-output-works-but-fail-to-feed-elasticsearch/127602>\
**Category:** Logstash\
**Created:** [April 11, 2018, 9:57am UTC](https://discuss.elastic.co/t/solve-logstash-output-works-but-fail-to-feed-elasticsearch/127602 "2018-04-11T09:57:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lu1her](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lu1her/32/29857_2.png) [@lu1her](https://discuss.elastic.co/u/lu1her)\
**Post date:** [April 11, 2018, 9:57am UTC](https://discuss.elastic.co/t/solve-logstash-output-works-but-fail-to-feed-elasticsearch/127602/1 "2018-04-11T09:57:28Z")

</div>

I am trying to pass my API custom log files to Kibana. For that I use myLogFiles.log -\> Logstash -\> Elasticsearch -\> Kibana.

PROBLEM

Logstash output tells that everything is fine, but Elasticsearch remain empty (I checked that with kibana or elasticsearch web visualisation plugins)

QUESTION

How can I feed elasticsearch to visualise my data in kibana ?

DEBUG SO FAR

To have some debug I told Logstash to ouput in a .log file and on console. see my logstash.conf:

```
input {
    file {
        path => '/home/***/dev_logstach/acci.log'
    start_position => beginning
    }
}

filter {
    grok {
        match => {"message" => "%{WORD:key} %{WORD:userID} %{WORD:lakeID} %{WORD:ballID} %{NUMBER:longitude} %{NUMBER:latitude} %{TIMESTAMP_ISO8601:date_evenement}"}
    }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "testACCI"
  }
  stdout { codec => rubydebug }
  file {
   path => "/home/***/dev_logstach/testLog.log"
   create_if_deleted => true
  }
}

```

And a logstash output with my datas

```
{
            "userID" => "HJcOX",
        "@timestamp" => 2018-04-10T13:27:47.723Z,
          "latitude" => "-123.8",
           "message" => "{message:ACWWCI HJcOX qHYFM ABCCCC -22.5 -123.8 2018-04-10T09:11:06.173Z,level:info}",
              "path" => "/home/***/dev_logstach/acci.log",
    "date_evenement" => "2018-04-10T09:11:06.173Z",
          "@version" => "1",
            "lakeID" => "qHYFM",
               "key" => "ACWWCI",
         "ballID" => "ABCCCC",
              "host" => "sd-10 ****",
         "longitude" => "-22.5"
}

```

When I run again it to not log (or print on console) previous data, and when logstash run if I

`echo -e "new data line" >> acci.log`  
the new data appear in the logs. I then suppose that the data are send somewhere but I have no clue where and how can I move forward.

In elasticsearch log I just see a warning:

```
2018-04-10T17:01:52,507][WARN][o.e.d.i.m.MapperService] [_default_] mapping is deprecated since it is not useful anymore now that indexes cannot have more than one type

```

P.S. I read some problem like that but it was due to date format mine is valide (YYYY-MM-DD...)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 11, 2018, 10:02am UTC](https://discuss.elastic.co/t/solve-logstash-output-works-but-fail-to-feed-elasticsearch/127602/2 "2018-04-11T10:02:23Z")

</div>

> [@lu1her](#):
>
> index =\> "testACCI"

I believe index names must be lowercase, which might be causing issues. I would expect you to see this in the logs if you enable debug logging.

---

<div class="post-metadata">

**Author:** ![lu1her](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lu1her/32/29857_2.png) [@lu1her](https://discuss.elastic.co/u/lu1her)\
**Post date:** [April 11, 2018, 12:41pm UTC](https://discuss.elastic.co/t/solve-logstash-output-works-but-fail-to-feed-elasticsearch/127602/3 "2018-04-11T12:41:17Z")

</div>

**[FIX]**

Well I had 2 errors, the first, as you said and the second one, I had to first create the index in elasticsearch.

Thanks

---

<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 9, 2018, 12:41pm UTC](https://discuss.elastic.co/t/solve-logstash-output-works-but-fail-to-feed-elasticsearch/127602/4 "2018-05-09T12:41:23Z")

</div>

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