docker-elk icon indicating copy to clipboard operation
docker-elk copied to clipboard

No index in Kibana

Open DavidRBarcelo opened this issue 9 years ago • 3 comments

Hi everyone, i have a issue this message appears when use docker-compose up command and Kibana dont discover any Index

elasticsearch_1  | [2017-04-22T15:09:07,565][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [title]
elasticsearch_1  | [2017-04-22T15:09:07,567][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [timeFieldName]
elasticsearch_1  | [2017-04-22T15:09:07,569][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [intervalName]
elasticsearch_1  | [2017-04-22T15:09:07,572][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [fields]
elasticsearch_1  | [2017-04-22T15:09:07,574][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [sourceFilters]
elasticsearch_1  | [2017-04-22T15:09:07,574][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [fieldFormatMap]
elasticsearch_1  | [2017-04-22T15:09:07,579][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [title]
elasticsearch_1  | [2017-04-22T15:09:07,580][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [timeFieldName]
elasticsearch_1  | [2017-04-22T15:09:07,585][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [intervalName]
elasticsearch_1  | [2017-04-22T15:09:07,585][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [fields]
elasticsearch_1  | [2017-04-22T15:09:07,586][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [sourceFilters]
elasticsearch_1  | [2017-04-22T15:09:07,587][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [fieldFormatMap]

This is the logstash.conf

input {
  tcp {
    port => 5000
    type => syslog
  }
  udp {
    port => 5000
    type => syslog
  }
}

filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:sysl$
      add_field => [ "received_at", "%{@timestamp}" ]
      add_field => [ "received_from", "%{host}" ]
    }
    date {
      match => [ "syslog_timestamp", "MMM  d HH:mm:ss", "MMM dd HH:mm:ss" ]
    }
  }
}

output {
  elasticsearch { hosts => "elasticsearch:9200" }
}

I think i need a grok filter.

DavidRBarcelo avatar Apr 22 '17 16:04 DavidRBarcelo

Did you create the logstash index pattern in Kibana? (see README)

antoineco avatar Apr 22 '17 16:04 antoineco

Yes the index pattern was created with * (wildcard).

> logstash_1       | [2017-04-26T16:29:44,844][ERROR][logstash.pipeline        ] Error registering plugin {:plugin=>"#<LogStash::FilterDelegator:0x430b4b6a @id=\"56dc9ad36000d4723a06e207ca1d600768f0b2d8-3\", @klass=LogStash::Filters::Grok, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x16833ea1 @metric=#<LogStash::Instrument::Metric:0xc1965c2 @collector=#<LogStash::Instrument::Collector:0x47f44af7 @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x5ebd1978 @store=#<Concurrent::Map:0x51444238 @default_proc=nil>, @structured_lookup_mutex=#<Mutex:0x16b40aa7>, @fast_lookup=#<Concurrent::Map:0x73724974 @default_proc=nil>>>>, @namespace_name=[:stats, :pipelines, :main, :plugins, :filters, :\"56dc9ad36000d4723a06e207ca1d600768f0b2d8-3\", :events]>, @logger=#<LogStash::Logging::Logger:0x361437a7 @logger=#<Java::OrgApacheLoggingLog4jCore::Logger:0x757f8a85>>, @filter=<LogStash::Filters::Grok match=>{\"message\"=>\"<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\\\\[%{PO\\nSINT:syslog_pid}\\\\])?: %{GREEDYDATA:syslog_message}\"}, id=>\"56dc9ad36000d4723a06e207ca1d600768f0b2d8-3\", enable_metric=>true, periodic_flush=>false, patterns_files_glob=>\"*\", break_on_match=>true, named_captures_only=>true, keep_empty_captures=>false, tag_on_failure=>[\"_grokparsefailure\"], timeout_millis=>30000, tag_on_timeout=>\"_groktimeout\">>", :error=>"pattern %{PO\nSINT:syslog_pid} not defined"}
> logstash_1       | [2017-04-26T16:29:44,873][ERROR][logstash.agent           ] Pipeline aborted due to error {:exception=>#<Grok::PatternError: pattern %{PO
> logstash_1       | SINT:syslog_pid} not defined>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.4/lib/grok-pure.rb:123:in `compile'", "org/jruby/RubyKernel.java:1479:in `loop'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.4/lib/grok-pure.rb:93:in `compile'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-3.4.0/lib/logstash/filters/grok.rb:286:in `register'", "org/jruby/RubyArray.java:1613:in `each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-3.4.0/lib/logstash/filters/grok.rb:280:in `register'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-3.4.0/lib/logstash/filters/grok.rb:275:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:257:in `register_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:268:in `register_plugins'", "org/jruby/RubyArray.java:1613:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:268:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:278:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:207:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:389:in `start_pipeline'"]}
> logstash_1       | [2017-04-26T16:29:45,027][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
> logstash_1       | [2017-04-26T16:29:47,912][WARN ][logstash.agent           ] stopping pipeline {:id=>"main"}
> logstash_1       | Sending Logstash's logs to /usr/share/logstash/logs which is now configured via log4j2.properties

It looks like a issue in filter installation. Dockerfile:

# https://github.com/elastic/logstash-docker
FROM docker.elastic.co/logstash/logstash:5.3.0

# Add your logstash plugins setup here
# Example: RUN logstash-plugin install logstash-filter-json
RUN logstash-plugin install logstash-filter-grok

DavidRBarcelo avatar Apr 26 '17 16:04 DavidRBarcelo

@DavidRBarcelo this is an issue with your match condition.

I'd recommend you to ask non-Docker related questions in the Elastic forums instead.

antoineco avatar May 08 '17 16:05 antoineco