If I read your samples right, each of that "data" block is its own event. Is this correct? (By the way, you would help volunteers and yourself greatly if you post sample/mock data in raw text format...
See more...
If I read your samples right, each of that "data" block is its own event. Is this correct? (By the way, you would help volunteers and yourself greatly if you post sample/mock data in raw text format which is JSON compliant; Splunk's beautified display is not.) In that case, Splunk would have given you three fields of your interest: data.entity_id, data.message-name, and data.total-received. Do you get these? Assuming both assumptions are correct, xyseries is your friend, like this | stats sum(data.total-received) as subtotal by data.message-name data.entity-id
| xyseries "data.entity-id" "data.message-name" subtotal Your mock events give you data-entity-id handshake switchPlayer 1 10 42 2 12 55 Note, I reconstructed JSON compliant events as the following: {
"data": {
"entity-id": 1,
"message-code": 445,
"message-name": "handshake",
"total-received": 10
}
}
{
"data": {
"entity-id": 1,
"message-code": 269,
"message-name": "switchPlayer",
"total-received": 20
}
}
{
"data": {
"entity-id": 1,
"message-code": 269,
"message-name": "switchPlayer",
"total-received": 22
}
}
{
"data": {
"entity-id": 2,
"message-code": 445,
"message-name": "handshake",
"total-received": 12
}
}
{
"data": {
"entity-id": 2,
"message-code": 269,
"message-name": "switchPlayer",
"total-received": 25
}
}
{
"data": {
"entity-id": 2,
"message-code": 269,
"message-name": "switchPlayer",
"total-received": 30
}
} This is an emulation you can play with and compare with real data | makeresults
| eval data = split("{
\"data\": {
\"entity-id\": 1,
\"message-code\": 445,
\"message-name\": \"handshake\",
\"total-received\": 10
}
}
{
\"data\": {
\"entity-id\": 1,
\"message-code\": 269,
\"message-name\": \"switchPlayer\",
\"total-received\": 20
}
}
{
\"data\": {
\"entity-id\": 1,
\"message-code\": 269,
\"message-name\": \"switchPlayer\",
\"total-received\": 22
}
}
{
\"data\": {
\"entity-id\": 2,
\"message-code\": 445,
\"message-name\": \"handshake\",
\"total-received\": 12
}
}
{
\"data\": {
\"entity-id\": 2,
\"message-code\": 269,
\"message-name\": \"switchPlayer\",
\"total-received\": 25
}
}
{
\"data\": {
\"entity-id\": 2,
\"message-code\": 269,
\"message-name\": \"switchPlayer\",
\"total-received\": 30
}
}", "
")
| mvexpand data
| rename data AS _raw
| spath
``` data emulation above ```