0
私はLogastashを使用してmysqlからデータを収集しています。 Jsonの結果は次のようになります:Logstashで特定のキーと値を抽出する
"_source" : {
"username" : "[email protected]",
"timestamp" : 1481785195811703,
"peer" : "[email protected]/1596084304715518942270426",
"bare_peer" : "[email protected]",
"xml" : "<message to='[email protected]' type='groupchat' from='[email protected]'><body>msg</body><jid>456-345</jid></message>",
"txt" : "msg",
"id" : 6452,
"kind" : "groupchat",
"nick" : "user",
"created_at" : "2016-12-15T06:59:55.000Z",
"@version" : "1",
"@timestamp" : "2017-02-25T12:17:52.043Z"
}
「xml」キーから別の値として抽出値が必要です。この「jid」のように:456-345
ありがとう