Logstash转换条目// JSON

时间:2014-11-25 12:11:18

标签: javascript json http logstash

当我发送http帖子到logstash时,我的条目似乎是这样的:

{
  "_index": "logstash-2014.11.25",
  "_type": "logs",
  "_id": "PyALYOSjRi-N8cfg8axyMg",
  "_score": null,
  "_source": {
    "message": "technology=apache",
    "@version": "1",
    "@timestamp": "2014-11-25T11:57:56.931Z",
    "host": "127.0.0.1"
  },
  "sort": [
    1416916676931,
    1416916676931
  ]
}

您是否有任何想法处理该消息,以便它看起来像这样:

{
  "_index": "logstash-2014.11.25",
  "_type": "logs",
  "_id": "PyALYOSjRi-N8cfg8axyMg",
  "_score": null,
  "_source": {

    "@version": "1",
    "@timestamp": "2014-11-25T11:57:56.931Z",
    "host": "127.0.0.1"
  },
  "sort": [
    1416916676931,
    1416916676931
  ]
**"technology": "apache"**
}

0 个答案:

没有答案