# Kibana plugin or custom app

**URL:** <https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648>\
**Category:** Kibana\
**Created:** [November 25, 2020, 11:28am UTC](https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648 "2020-11-25T11:28:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnc943](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jnc943/32/78918_2.png) [@jnc943](https://discuss.elastic.co/u/jnc943)\
**Post date:** [November 25, 2020, 11:28am UTC](https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648/1 "2020-11-25T11:28:16Z")

</div>

I would like to automate some current troubleshooting workflows that are done manually. Essentially, I would like to be able to run a query, extract some fields/information which can then be passed down to subsequent queries. Ideally, I'd also like to be able to run an alternate query if a certain query returns no results.  
It would need to ability to take some input fields (text fields) and a timestamp and the output will be search results after running through the multiple queries.

I am wondering if writing an external Kibana plugin is the right approach? Or should I be writing my custom app which calls the elasticsearch REST apis to chain my queries and extract the information that I need before passing down to subsequent queries.

I am struggling to find a ton of info about Kibana plugins and what are their capabilities and limitations so any information/guidance would be super helpful!

Thanks

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [November 25, 2020, 3:06pm UTC](https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648/2 "2020-11-25T15:06:25Z")

</div>

Hi @jnc943,

You can try using [saved queries](https://www.elastic.co/guide/en/kibana/master/save-load-delete-query.html), but it does not solve a need to do alternative one. You can build a scripted field with flexible logic using [painless](https://www.elastic.co/guide/en/elasticsearch/painless/7.10/painless-walkthrough.html), it might solve part of your needs. Also I suggest to look at [compound queries](https://www.elastic.co/guide/en/elasticsearch/reference/current/compound-queries.html), maybe you can it can solve your need.

Still if you want to understand better the process of adding external plugin, please check the [https://www.elastic.co/guide/en/kibana/current/external-plugin-development.html](https://www.elastic.co/guide/en/kibana/current/external-plugin-development.html)  
The [process](https://www.elastic.co/guide/en/kibana/current/plugin-tooling.html) is pretty straight forward, but it may require some time.

Regards, Dzmitry

---

<div class="post-metadata">

**Author:** ![jnc943](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jnc943/32/78918_2.png) [@jnc943](https://discuss.elastic.co/u/jnc943)\
**Post date:** [November 25, 2020, 5:02pm UTC](https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648/3 "2020-11-25T17:02:07Z")

</div>

Hi Dzmitry,  
Thank you so much for your helpful response!  
I will look into painless as well as compound queries.

Did I understand correctly that it would not seem that a Kibana plugin would be an obvious choice fir my use case? What I did like about it is that it could potentially minimise UI efforts when compared to building my own app/service on top of the Elasticsearch APIs.

Thanks again!

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [November 26, 2020, 8:26am UTC](https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648/4 "2020-11-26T08:26:35Z")

</div>

Hi @jnc943,

I would suggest exploring existing functionality before you start work on your own plugin. You might find a solution. Plugin is always an option and you can integrate it in existing Kibana instance rather than developing a separate application from scratch using ES APIs.

We do create plugins for testing purpose, you can check it [here](https://github.com/elastic/kibana/tree/master/test/common/fixtures/plugins) to get more understanding how to start.

Regards, Dzmitry

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 24, 2020, 8:26am UTC](https://discuss.elastic.co/t/kibana-plugin-or-custom-app/256648/5 "2020-12-24T08:26:38Z")

</div>

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