(键)字段[@timestamp]未找到

时间:2014-06-17 15:19:28

标签: elasticsearch timestamp logstash kibana

在过去几天尝试了很多配置,但无法正常启动和运行ELK:

ES says Facet [0]: (key) field [@timestamp] not found
LS says Parse Failure [No mapping found for [@timestamp] in order to sort on]]

帖子说转到你的信息中心 - >设置 - >索引并用[logstash *]替换[_all]并不能解决问题。所以第一个问题是:哪里是寻找解决方案的正确位置 - ES,LS或Kibana?

我目前的配置如下:

版本

  • Ubuntu 14.04 LTS
  • ES 1.1.1 LS 1.4.1
  • Kibana 3(不是LS内置而是单独运行)

Kibana

我的Kibana仪表板索引设置如下:

时间戳:日

索引模式:[logstash-] YYYY.MM.DD

LS

  • 在LS启动时加载的default.conf - 有两个字:
  • 加载包含时间戳,UUID加整数值的相同结构的2个文件。

`

input {
  file {
    type => "registrations1"
    path   => [ "/opt/source/EU/A1/reg1/*.log" ]
    start_position => "beginning"
    discover_interval => 1
  }
  file {
    type => "registrations2"
    path   => [ "/opt/source/EU/A1/reg2/*.log" ]
    start_position => "beginning"
    discover_interval => 1
  }
}
filter {
  if [type] == "registrations1"
  {
    if "_grokparsefailure" in [tags] {
      drop { }
    }
    grok {
      patterns_dir => "/opt/logstash-1.4.1/patterns"
      match => [ "message", "%{TIMESTAMP_ISO8601:logdate} %{UUID:pat} %{NUMBER:cntpat:int}" ]
    }
    date {
      match => [ "logdate", "ISO8601" ]
    }
  }
  if [type] == "registrations2"
  {
    if "_grokparsefailure" in [tags] {
      drop { }
    }
    grok {
      patterns_dir => "/opt/logstash-1.4.1/patterns"
      match => [ "message", "%{TIMESTAMP_ISO8601:logdate} %{UUID:inst} %{NUMBER:cntinst:int}" ]
    }
    date {
      match => [ "logdate", "ISO8601" ]
    }
  }
}
output {
  elasticsearch {
    host => localhost
  }
}

`

文件类型registrations1的一些示例条目:

2014-01-03T12:19:05.683 00000000-0000-0000-0000-000000000001 1 2014-01-03T14:51:22.690 00000000-0000-0000-0000-000000000002 1 2014-01-05T16:09:03.970 00000000-0000-0000-0000-000000000003 1 2014-01-06T11:42:12.963 00000000-0000-0000-0000-000000000004 1 2014-01-06T13:35:54.697 00000000-0000-0000-0000-000000000005 1 2014-01-06T13:40:26.513 00000000-0000-0000-0000-000000000006 1 2014-01-07T13:51:12.777 00000000-0000-0000-0000-000000000007 1 2014-01-07T14:19:37.620 00000000-0000-0000-0000-000000000008 1

registrations2条目几乎相同 - 具有不同的时间戳和UUID。

registrations1文件包含485个条目 - 在Kibana中只显示213个(或有时为199个)。为什么?是的,我已经从default.conf调整了Kibana datetime picker + removed drop语句。

任何想法都受到高度赞赏。

最佳, 亚历

0 个答案:

没有答案
相关问题