How can we query Kibana?

后端 未结 2 1849
夕颜
夕颜 2021-02-05 16:42

How can we request Kibana with REST API to get the visualization request and response?

Like this:

I want to do that using NodeJS to manipulate this results of K

相关标签:
2条回答
  • 2021-02-05 17:06

    You can go to kibana\kibana-4.5.1-windows\optimize\bundles\kibana.bundle.js file, search the function "Transport.prototype.request = function (params, cb)", and add in the first line parent.postMessage(params.body, "*"); Now go to the controller or script that manage the iframe(iframe parent) and add

    $window.addEventListener("message", function (event) {          
                  var data=event.data;          
                });
    

    for example:

        <iframe id="ifr" src="http://localhost:5601/goto/6ba8a6b8ceef3tyt454789e4fe5cf5"></iframe>
    
        <script>
            $window.addEventListener("message", function (event) {          
              var data=event.data;          
            });
        </script
    

    Now you will get the request query

    0 讨论(0)
  • 2021-02-05 17:10

    You can directly request the ES. The documentation is here

    0 讨论(0)
提交回复
热议问题