Hello guys,
I am a newbie in logstash filtering and i having issues to get a specific field.
i want to get the sum of "Accounting-Output-Octets" that is inside the "service_data_container" field, is it possible using mutate add_field? also i would like that elastic do not round up the number, i want it to show exactly as it is, is there a way to avoid the "1E+9" ?
Below is the Json format of the log, thanks in advance!
{
"_index": "pgw-2020.02",
"_type": "doc",
"_id": "FpJBRXABJNWfzHeFZoqc",
"_version": 1,
"_score": null,
"_source": {
"service_data_container": [
{
"SGSN-Address": "xxx.xxx.xxx.xxx",
"Local-Sequence-Number": 21,
"Charging-Rule-Base-Name": "Default",
"QoS-Information": {
"QoS-Class-Identifier": 9,
"APN-Aggregate-Max-Bitrate-DL": 8192000,
"APN-Aggregate-Max-Bitrate-UL": 2048000,
"Allocation-Retention-Priority": {
"Priority-Level": 15
}
},
"Change-Condition": 7,
"Change-Time": "2020-02-14T19:27:45.000000Z",
"Time-Usage": 80,
"Time-First-Usage": "2020-02-14T19:26:25.000000Z",
"Time-Last-Usage": "2020-02-14T19:27:45.000000Z",
"Accounting-Input-Packets": 2,
"Accounting-Input-Octets": 139,
"Accounting-Output-Octets": 127,
"Accounting-Output-Packets": 1,
"Rating-Group": 1
},
{
"SGSN-Address": "201.23.189.107",
"Local-Sequence-Number": 22,
"Charging-Rule-Base-Name": "Default",
"Change-Time": "2020-02-14T19:50:46.000000Z",
"Accounting-Input-Packets": 11,
"Time-Usage": 136,
"Time-First-Usage": "2020-02-14T19:27:45.000000Z",
"Time-Last-Usage": "2020-02-14T19:40:54.000000Z",
"Accounting-Input-Octets": 664,
"Accounting-Output-Octets": 140,
"Accounting-Output-Packets": 2,
"Rating-Group": 1,
"3GPP-User-Location-Info": [
130,
39,
244,
80,
158,
164,
39,
244,
80,
1,
213,
135,
1
]
}
]
}