Is it possible to generate or export a csv from Kibana dev tool

Hi, I wonder if it is possible to generate a CSV report from dev tool ?

The following is my query run on Kibana dev tool, it composed of query and aggregation.
I want to generate the query response to a csv.

if it is not possible, is there a way can let me generate a csv based on my query result

GET remo-traces-apm/_search
{
  "size": 0,
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "function_id": "504"
          }
        },
        {
          "term": {
            "deviceId": "0"
          }
        }
      ]
    }
  },
  "aggs": {
    "Project_id": {
      "terms": {
        "size": 50,
        "field": "project_id"
      },
      "aggs": {
        "Pa_key": {
          "terms": {
            "size": 10000,
            "field": "pa_key"
          }
        }
      }
    }
  }
}

Hi @JasonREC,

There is a CSV export under the share option in discover, but not directly in the DevTools. But I can think of a couple of ways to potentially get the data out:

  1. Writing a script using a language client and a CSV utility, such as Python. There is a StackOverflow thread here that shares that example.
  2. Using Logstash with an Elasticsearch filter processor and the CSV output plugin.

Others can maybe suggest other options as I'm sure there are other ways.

Hope that helps!

1 Like

@carly.richmond

Thanks for the suggestion. I eventually used the alternative 1 which is with the Python script

1 Like

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