GithubHelp home page GithubHelp logo

webiks / kibana-api Goto Github PK

View Code? Open in Web Editor NEW
125.0 125.0 31.0 2.3 MB

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

License: Apache License 2.0

JavaScript 97.88% CSS 0.09% HTML 2.03%

kibana-api's People

Contributors

arbelzinger avatar josselinchevalay avatar rgheleribefore avatar ytzlax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kibana-api's Issues

Support for elastic v 6.3

Hello,

Thank you guys for such an awesome plugin.
I am already using it with elastic v6.1 and was just wondering if the same version of this plugin is compatible with elastic v6.3? and if not what are your plans to release that (for v6.3)?

kibana 6.7.1

We use Kibana 6.2 and we want to upgrade to 6.7
I'd install Kibana 6.7.1 on my computer to try it, but I can't install the kbn_api.
I download the 6.X version and this is the error i got:

Maybe you have any solutions?

Npm warn no repository field

When install packages, get the next error:
"Npm warn no repository field".
To fix that simple add the next lines to the package. json file:
"repository": { "type": "git", "url": "git://github.com/username/repository.git" }

Request New API related to kibana embedded object

Hi, thanks for the API plug-in.
It is extremely effective way to visualize data source :)

Change the embedded(iframe) dashboard based on parameterized date(From, To)
I think new API would be helpful which can apply date range to embedded dashboard and refresh with API.
We put some embedded dashboard and visualization. And we want to adjust period range which is attached on our UI date range controller. And after setting is done, we want to let embedded kibana object display data based on the modified date range.
i.e.) ConfigureVisualizationByDate(from date, to date)

Support for Kibana 6.4

Hello, i just want to ask if is there any ongoing improvements to support kibana 6.4?

kibana-api-service.js comments

It is hard to understand what a method does.

  • When you describe what a method/function accepts, use the word accept and not get.
  • Add a short description of what a method does (and in what context it is used).
  • In your tests, the description of each it is a bit lacking. For instance: it('should not call callElastic',... - what does that mean? Should not call callElastic when? Ever? Moreover, should call beforeCallElastic appears twice. If they are the same, they should be combined. If they are not, they should be described better. This goes for the rest of the tests file.
  • beforeCallElastic test - doesn't seem to get the main biz logic of the method. The method does something inside the forEach. We do not expect to get an array of a certain length from the method. We expect to get an array of certain objects from the method.
  • When using spies (or stubs) remove the stub from the description: it('should call getWellFormVisStateStub') should be it('should call getWellFormVisState()'.
  • getWellFormVisState tests - you create an it for every case, which is quite confusing. Eventually, you have 4 cases that can be handled by a method that accepts the the visState, the path and the value. It then parses the path to set the value. This way, you are not only clearer, but also cover more cases with your test.

Filtering with saved searches

Hi,
I'm using Kibana 6.5.4 and installed the plugin according to the instructions. Then I wanted to add a visualisation and copied and pasted your code into my js file. But in my web app the Kibana dashboard continues saying "This dashboard is empty. Let’s fill it up!".
Do you have any ideas what I might have done wrong?
Thanks!

Version 6.0.1

Hi, thanks for the plugin. I've tried to fork it and just change package.json so it can work with 6.0.1 but I'm getting the error:
Plugin installation was unsuccessful due to error "No kibana plugins found in archive"

What I'm doing wrong?
https://github.com/vladan-me/kibana-API/releases

Maybe you can release it in the meanwhile.

Thanks

Cant Get This To Work with ELK 5.6.3 and Angular 4

I am having a difficult time getting this workingin our Angular4 webapp. My markup:

  <div class="mdc-layout-grid">
    <div class="mdc-layout-grid__inner">
      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-10-desktop mdc-layout-grid__cell--span-6-tablet tabs">
        <iframe id="test1" src="http://localhost:5601/app/kibana#/dashboard/AV813bSSz9YDXQ5d_VDH?embed=true&_g=()" height="600" width="800"></iframe>
      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2">
        <h4 translate>smart-advisors-recommendations</h4>
      </div>
    </div>
  </div>

and my typsecript that is being run:

ngOnInit() {
    const iframe= document.getElementById('test1');
    //Set visualiztion ID
    let visPartial = {id: "bankAge"};

    //Set isFullState to false meaning: the programmer pass minimal defenetion attributes
    visPartial["isFullState"] = false;

    //Set the elasticsearch index where the data store
    visPartial["visIndex"] = "bank";

    //Set minimal attributes of the visualization, in this example, create pie visualization on the field age
    visPartial["visState"] = {visType: 'pie', field: 'age'};
    visPartial["visDashboardDefenetion"] = {
      col: 1,
      id: "age",
      panelIndex: 9,
      row: 1,
      size_x: 3,
      size_y: 3,
      type: "visualization"
    };

    //Replace visualization with id=memory with the new visualization 
    //visPartial["prevoiusVisId"] = "test1";
    
    var iWindow = (<HTMLIFrameElement>iframe).contentWindow;
    console.log(iWindow);
    
    iWindow.postMessage({actionType: "setVisualization", visDefenetion: [visPartial]}, '*');

I am running elastic search and Kibana 5.6.3. Any insights?

Kibana 6.4 with security

Hi.
When I turn on the security in kibana 6.4, for some reason, the Kibana-API doesn't work properly.
Do you know why?
Thanks!

"setDashboardTime" disables refresh interval

"setDashboardTime" was the last "case" inside switch statement. When you added "setRefreshInterval" after it you forgot to put "break" statement and execution flow continues to "setRefreshInterval" and refresh interval affected.
Another issue that reproduces itself about 50% of the time: refresh interval does not appear in globalState when you build URL for Kibana and therefore it being reset to 0.

Is there a Plugin for 5.6.4?

Just wondering if there is a version of the plugin that will work with Kibana 5.6.4. Currently porting a project to a new 6.5 project and was hoping to use this plugin to export the index pattern.

Feature request - control refresh interval

It would be great if you add one more feature to your plugin: ability to externally control refresh interval in the Kibana.
We use Kibana 6.3.2 ;-)

Thank you in advance.

Filter per session

If you added a filter (e.g. addSearchChip) to a visualisation, does this affect all users embedding the visualisation or just for the current session?

Add default filter for dashboard

Please add possibility to set a default filter for a dashboard when visualization is created.
(I wont create a visualization from filtered data)

Installation

I am trying to install this API for the kibana ver 5.5.1 but am getting error of version problem. It is expecting 5.5.0.

Is there any alternative to fix the issue

when I install this plugin, restart the kibana is error

elasticsearch 5.1.1
kibana 5.1.1
the error message is follow:

/data/work/elastic/kibana-5.1.1/bin$ ./kibana
log [06:00:03.111] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
log [06:00:03.153] [info][status][plugin:[email protected]] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [06:00:03.178] [fatal] TypeError: server.plugins.elasticsearch.getCluster is not a function
at exports.default (/data/work/elastic/kibana-5.1.1/plugins/kibana_api/server/routes.js:8:59)
at ScopedPlugin.init [as externalInit] (/data/work/elastic/kibana-5.1.1/plugins/kibana_api/index.js:32:13)
at ScopedPlugin.tryCatcher (/data/work/elastic/kibana-5.1.1/node_modules/bluebird/js/main/util.js:26:23)
at Promise.attempt.Promise.try (/data/work/elastic/kibana-5.1.1/node_modules/bluebird/js/main/method.js:30:24)
at /data/work/elastic/kibana-5.1.1/src/server/plugins/plugin.js:160:44
at undefined.next (native)
at step (/data/work/elastic/kibana-5.1.1/src/server/plugins/plugin.js:11:273)
at process._tickCallback (internal/process/next_tick.js:103:7)
FATAL TypeError: server.plugins.elasticsearch.getCluster is not a function
at exports.default (/data/work/elastic/kibana-5.1.1/plugins/kibana_api/server/routes.js:8:59)
at ScopedPlugin.init [as externalInit] (/data/work/elastic/kibana-5.1.1/plugins/kibana_api/index.js:32:13)
at ScopedPlugin.tryCatcher (/data/work/elastic/kibana-5.1.1/node_modules/bluebird/js/main/util.js:26:23)
at Promise.attempt.Promise.try (/data/work/elastic/kibana-5.1.1/node_modules/bluebird/js/main/method.js:30:24)
at /data/work/elastic/kibana-5.1.1/src/server/plugins/plugin.js:160:44
at undefined.next (native)
at step (/data/work/elastic/kibana-5.1.1/src/server/plugins/plugin.js:11:273)
at process._tickCallback (internal/process/next_tick.js:103:7)

Couldn't install plugin for Kibana 6.4.2

I can not install plugin.

~# /usr/share/kibana/bin/kibana-plugin install https://github.com/Webiks/kibana-API/releases/download/v6.4.2_0.6.0/kibana_api-0.6.0.zip
Attempting to transfer from https://github.com/Webiks/kibana-API/releases/download/v6.4.2_0.6.0/kibana_api-0.6.0.zip
Transferring 1564420 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation was unsuccessful due to error "Command failed: /usr/share/kibana/node/bin/node /usr/share/kibana/src/cli --env.name=production --optimize.useBundleCache=false --server.autoListen=false --plugins.initialize=false --uiSettings.enabled=false
(node:13061) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

{"type":"log","@timestamp":"2018-10-26T13:52:32Z","tags":["warning","config","deprecation"],"pid":13061,"message":"uiSettings.enabled is deprecated and is no longer used"}
{"type":"log","@timestamp":"2018-10-26T13:52:41Z","tags":["info","optimize"],"pid":13061,"message":"Optimizing and caching bundles for ml, stateSessionStorageRedirect, status_page, timelion, graph, monitoring, login, logout, dashboardViewer, apm, kibana_api and kibana. This may take a few minutes"}
"

And I can't remove it by bin/kibana-plugin remove after failed installation:

~# /usr/share/kibana/bin/kibana-plugin install https://github.com/Webiks/kibana-API/releases/download/v6.4.2_0.6.0/kibana_api-0.6.0.zip
Found previous install attempt. Deleting...
Attempting to transfer from https://github.com/Webiks/kibana-API/releases/download/v6.4.2_0.6.0/kibana_api-0.6.0.zip
Transferring 1564420 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin kibana_api already exists, please remove before installing a new version

Now i need to reinstall Kibana or manual removing of broken plugin installiation.

Info:

Description:	Ubuntu 18.04.1 LTS
~# dpkg -s kibana
Package: kibana
Status: install ok installed
Priority: optional
Section: default
Installed-Size: 432754
Maintainer: Kibana Team <[email protected]>
Architecture: amd64
Version: 6.4.2
Conflicts: kibana-oss
Conffiles:
 /etc/default/kibana bcce7272035f46da444492dd983f0522
 /etc/init.d/kibana fe5ea9236312a48ac0a55777937040dd
 /etc/kibana/kibana.yml e0be5e3da5403f48abb95ecbfba68a00
 /etc/systemd/system/kibana.service 1732c2e2d62990933c030bdecf9813a0
Description: Explore and visualize your Elasticsearch data
License: Elastic-License
Vendor: Elasticsearch, Inc.
Homepage: https://www.elastic.co
~# cat /usr/share/kibana/package.json | grep "version"
  "version": "6.4.2",

How to create visualization dynamically

Hi team,

I want to use API in my script so that I can create visualization dynamically. I have already created a script by which i am able to create index pattern dynamically now I want to use that index pattern further so that i can create visualization dynamically.
So I have apache-access* index pattern(created through script) now how i can use this index pattern to create visualization dynamically?
Please help.

Also I installed the Kibana API plugin then restart the service but still i m not able to see Kibana API in Kibana tool??

Documentation

It seems the documentation isn't finished.
A few tips here:

  • Add comments to the JSON config examples or an explanation regarding what each line does. It would make it clearer to users.
  • Add a full code example with screenshots of what happens (unless you can setup a live demo which might be better). So here https://github.com/Webiks/kibana-API/wiki/Add-Visualization I'd add a full code on how to use the plugin:
// import or require the plugin
import * as myPlugin from ... (or require);

// Use the plugin
// set some x that would set the ___ as a ___ (for instance, would set a pie chart with certain params)
const x = {};
// initiate the call
myPlugin.someMethod(x);
...

So a user would be able to follow step by step on how to use the plugin.

Kibana 6.8.0

Hi
I was trying to install the latest version of the plugin on Kibana 6.8.0.
This is the error I get the second I login to Kibana (with and without the security enable)
and than the Kibana crushed:

C:\Users\gilm\Desktop\ek 6.8.0\kibana-6.8.0-windows-x86_64\plugins\kibana_api\server\routes.js:27
reply(obj);
^
TypeError: reply is not a function
at C:/Users/gilm/Desktop/ek 6.8.0/kibana-6.8.0-windows-x86_64/plugins/kibana_api/server/routes.js:34:17
at C:\Users\gilm\Desktop\ek 6.8.0\kibana-6.8.0-windows-x86_64\plugins\kibana_api\node_modules\jsonfile\index.js:46:5
at C:\Users\gilm\Desktop\ek 6.8.0\kibana-6.8.0-windows-x86_64\plugins\kibana_api\node_modules\graceful-fs\graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)

There's something to do about it?
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.