如何从Logstash的字段中提取子字符串?

时间:2019-07-29 16:47:43

标签: logstash

我正在尝试从字段中提取子字符串(“ groceryGateway”)。我正在使用grok和logstash,但遇到了麻烦。

我尝试使用grok中提供的模式,但无法提取所需的子字符串。

{
    "@timestamp" => 2019-07-29T16:35:54.256Z,
          "host" => "MacBook-Pro-51.local",
      "@version" => "1",
       "message" => "Iogo 0% Multi Pack With Stevia Strawberry/Blueberry/Vanilla/Mango,5.99, 16x100g,https://www.grocerygateway.com/store/groceryGateway/en/Yogurt-and-Cottage-Cheese/Multi-Pack/Iogo-0%25-Multi-Pack-With-Stevia-Strawberry-Blueberry-Vanilla-Mango/p/00629025420053\r",
          "name" => "Iogo 0% Multi Pack With Stevia Strawberry/Blueberry/Vanilla/Mango",
          "path" => "/Users/kevinliu/Desktop/Wanda/thanos/output_data/grocery_gateway-2019-07-25_16:17.csv",
          "type" => "grocery_item",
          "unit" => " 16x100g",
           "url" => "https://www.grocerygateway.com/store/groceryGateway/en/Yogurt-and-Cottage-Cheese/Multi-Pack/Iogo-0%25-Multi-Pack-With-Stevia-Strawberry-Blueberry-Vanilla-Mango/p/00629025420053",
          "test" => "0",
         "price" => "5.99"
}

0 个答案:

没有答案