小编gol*_*uty的帖子

在Logstash中解析JSON消息

我正在使用以下配置将jenkins日志发送到logstash:

 redis {
    host => "localhost"
    key => "logstash"
    data_type => "list"
    codec => json
    }
Run Code Online (Sandbox Code Playgroud)

这可以像预期的那样顺利,现在我在KIBANA中看到了以下消息:

{
  "_index": "logstash-2015.12.18",
  "_type": "logs",
  "_id": "AVG1BN5LXZBIbp7HE4xN",
  "_score": null,
  "_source": {
    "data": {
      "id": "965",
      "projectName": "NicePJ",
      "displayName": "#965",
      "fullDisplayName": "NicePJ",
      "url": "job/NIcePJ/965/",
      "buildHost": "Jenkins",
      "buildLabel": "master",
      "buildNum": 965,
      "buildDuration": 1,
      "rootProjectName": "NicePJ",
      "rootProjectDisplayName": "#965",
      "rootBuildNum": 965,
      "buildVariables": {
        "target_SUT": "0201",
        "report_warnings": "false",
        "product": "Ours",
        "testsuite": "Exciting_stuff5",
        "qft_version": "current",
        "target_task": "t324",
        "branch": "test",
        "testcase": "",
        "revision": "HEAD",
        "node": "hsqs960",
        "client": "Desktop",
        "run_specific_test": "false", …
Run Code Online (Sandbox Code Playgroud)

json jenkins logstash

10
推荐指数
1
解决办法
565
查看次数

标签 统计

jenkins ×1

json ×1

logstash ×1