Hi Team,
I have parsed the XML based logs can you please help me to get the elements as mentioned below.
Parsed Logs:
"payload" => "<bal:balanceTopUp xmlns:bal="http://soa.three.ie/balancemanagementdata_1_0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> bal:subscriptionId353861350479</bal:subscriptionId> bal:idhrhy565</bal:id> bal:typeCASH RECHARGE</bal:type> bal:descriptiontopup required</bal:description> bal:channel bal:name3RDPARTY</bal:name> </bal:channel> bal:place bal:namePAYZONE</bal:name> </bal:place> bal:requestor bal:nameusha</bal:name> </bal:requestor> bal:amount bal:amount10</bal:amount> bal:unitsEUR</bal:units> </bal:amount> bal:paymentMean bal:id34567</bal:id> bal:nameRPM</bal:name> </bal:paymentMean> bal:relatedParty bal:id797</bal:id> bal:nameHarshitha</bal:name> </bal:relatedParty> bal:reasonrecharge</bal:reason> </bal:balanceTopUp>",
"parsed" => {
"reason" => [
[0] "recharge"
],
"xmlns:bal" => "http://soa.three.ie/balancemanagementdata_1_0",
"subscriptionId" => [
[0] "353861350479"
],
"xmlns:wsse" => "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
"channel" => [
[0] {
"name" => [
[0] "3RDPARTY"
]
}
],
"requestor" => [
[0] {
"name" => [
[0] "usha"
]
}
],
"amount" => [
[0] {
"amount" => [
[0] "10"
],
"units" => [
[0] "EUR"
]
}
],
"id" => [
[0] "hrhy565"
],
"place" => [
[0] {
"name" => [
[0] "PAYZONE"
]
}
],
"paymentMean" => [
[0] {
"id" => [
[0] "34567"
],
"name" => [
[0] "RPM"
]
}
],
"xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/",
"description" => [
[0] "topup required"
],
"type" => [
[0] "CASH RECHARGE"
],
"relatedParty" => [
[0] {
"id" => [
[0] "797"
],
"name" => [
[0] "Harshitha"
]
}
]
}
Please, can someone help me to get below elements in those parsed elements?
subscriptionId
channel
requestor
amount
units
description
type
type
I need to pick above elements and pass these elements to CSV file using logstash.
Thanks
Manju