I have developed a small dashboard and website in React JS.
I want to insert it as a plugin into Kibana. I have some queries regarding the same. They are:
Can I convert a website to a plugin? Or should I start coding in Kibana plugin from scratch and implement the functionalities in my website?
How do I proceed?
Does Kibana plugin support React JS or should I re-write the code in Angular JS?
Can I convert a website into a plugin? If yes, how?
Do I need to clone the Kibana source code and modify the same to add in plugin?
Hello! You can definitely use React in Kibana - we use it heavily and have migrated away from Angular.
I'd recommend reading this page in the docs:
One of the things to notice is that a 3rd party plugin (which you want to build) must be made against a specific stack version and if you want it to work on a newer one it may have to updated.
So I need to clone the Kibana repo and make changes in the same right?
And should I also have Elasticsearch and Logstash configured on the same system, and then run Kibana locally?
[2022-08-15T09:42:45,344][ERROR][o.e.b.Elasticsearch ] [localhost.localdomain] fatal exception while booting Elasticsearch
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.initializeNatives(Elasticsearch.java:260) ~[elasticsearch-8.5.0-SNAPSHOT.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:166) ~[elasticsearch-8.5.0-SNAPSHOT.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:66) ~[elasticsearch-8.5.0-SNAPSHOT.jar:?]
I also have another instance of ES service running.
So rather than using yarn es snapshot, I tried connect my kibana to that running instance of ES by making necessary changes in kibana.yml (server.port, server.host, elasticsearch.host).
Then did yarn start --allow-root in kibana folder.
It doesnt give any error... but takes a loooooooot of time and then seeems to get stuck or fetch somethings sometimes. It has never showed that the service is running in :
Hi @Sheereen I'm sorry to hear you're running into issues.
Is it possible for you to open a terminal as a non-root user and then run yarn es snapshot and yarn start? Elasticsearch restricts itself from being able to run as the root user.
Building Kibana for the first time can take a while! It has to build bundles of all the plugins. One option, if you are not using or depending on x-pack plugins (like security) you can run yarn start --oss which only builds OSS plugins.
I just created a demo HelloWorld plugin to know how things work. Thanks to that I can now understand your comment better
So... I have to develop the plugin inside the kibana code itself right... inside plugins directory
Because while developing the helloworld plugin... I found that it differs from writing a normal HelloWorld application in ReactJS.
The binding of functions to this keyword, css , etc...
So... I think the solution is to code my website from scratch inside the kibana code repo. Please correct me if I'm wrong.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.