Split series by object keys

Hello,

I do not use kibana that often, therefore sorry in advance for me stupid question.

I am analyzing logs from an application. These logs sometimes contains profiler information, structure like this.

{
    "logLevel": "Information",
    "profiler": {
      "MethodA": {
        "elapsedMsAvg": 1183,
        "count": 1,
        "elapsedMsTotal": 1183
      },
      "MethodB": {
        "elapsedMsAvg": 1183,
        "count": 1,
        "elapsedMsTotal": 1183
      }
    }

is it possible to create a line chart based on the keys / method names?

Right now I have created the different series manually, but it is a boring task and you can easily forget a method.

If not, can I provide the output in a different format?

2 Likes

Hey, to do so, you would have to split up your documents like this:

{
    "logLevel": "Information",
    "profiler": {
      "methodName: "MethodA",
      "elapsedMsAvg": 1183,
      "count": 1,
      "elapsedMsTotal": 1183
    }
},
{
    "logLevel": "Information",
    "profiler": {
      "methodName: "MethodB",
      "elapsedMsAvg": 1183,
      "count": 1,
      "elapsedMsTotal": 1183
    }
}

Then you can use a terms aggregation on profiler.methodName to split the series without worrying to forget a method.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.