2

i am using Embedded iframe Kibana dashboard in my web page,

Now i want to filter Dashboard by elastic query.

I can't find solution so i am looking your suggestion to do this.

Thank You

Pirai Sudie
  • 162
  • 3
  • 17

3 Answers3

2

Option 01:

The kibana dashboard is just a json document stored in elasticsearch , you need to update that json using the elasticsearch API endpoint.

First you need to see how that filter modifies that json , so just save the json before applying the filter in kibana , and then get the json again after applying that filter.

Once you know how your query filter modifies that json , you can then use the API in your web page to do the modifications , instead of using kibana UI.

Option 02: ( I havn't used this )

Use the kibana API to update an object. The update saved object API enables you to update the attributes for an existing Kibana saved object.

https://www.elastic.co/guide/en/kibana/master/saved-objects-api-update.html

Option 03 Passing the filter as part of the kibana url:

https://discuss.elastic.co/t/dashboard-search-parameter-via-url/84385

https://discuss.elastic.co/t/passing-parameters-or-filter-in-kibana-url-from-web-app/141568

https://discuss.elastic.co/t/pass-filter-to-dashboard-url-in-markdown-menu/50991

Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73
0

I think you can look at below plugin of kibana

https://github.com/Webiks/kibana-API

Kibana-API is an extension to Kibana that lets you tap in to the dashboard management board from your app and change the visualizations dynamically.

Kibana-API (webiks) Exposes an API with Kibana functionality. Use it to create, edit and embed visualizations, and also to search inside an embedded dashboard.

userguy
  • 107
  • 2
  • 13
  • hi thank you but i have to pass elastic query into filter..so how i can do it? for more: https://stackoverflow.com/questions/53020977/how-to-convert-elasticquery-into-kibana-url – Pirai Sudie Oct 27 '18 at 10:39
0
{
  "query": {
    "wildcard": {
      "endpoint": "*employees/v1/reports/accounts*"
    }
  }
}

You can use the above to filter all Apis containing accounts in last part by using Add filter and then Edit as Query DSL

Divya
  • 1
  • 1