@statengine/se-fixtures
Loads Kibana fixtures into Elasticsearch.
Last updated a year ago by chopchop .
GPL-3.0 · Original npm · Tarball · package.json
$ cnpm install @statengine/se-fixtures 
SYNC missed versions from official npm registry.

StatEngine Kibana Fixtures

Library to initialize Elasticsearch/Kibana with default dashboards, visulaizations, index patterns, and advanced settings

Installation

npm install @statengine/se-fixtures

Overview

Fixture templates are JSONish files, which are modified exports from Kibana.

Example template file:

{
  "_type": "config",
  "_id": "5.5.3-SNAPSHOT",
  "_source": {
    "buildNum": 15497,
    "dateFormat:tz": "{{ FireDepartment.timezone }}",
    "timelion:es.timefield": "description.event_opened",
    "state:storeInSessionStorage": true
  }
}

At seed time, dateFormat:tz field will be substituted with the value defined in FireDepartment.timezone.

Adding a new visualization

  1. To add a new visualization, export the JSON from Kibana via the Management->Saved Objects menu
  2. Copy the exported JSON to the templates folder.
  3. Replace any index names or other variables with the appropriate template expression.

Library Usage

const Fixtures = require('./lib');

const locals = {
  FireDepartment: {
    latitude: 55,
    longitude: -75,
    fd_id: '76000',
    name: 'Richmond Fire and Emergency Services',
    state: 'VA',
    firecares_id: '93345',
    latitude: 0,
    longitude: 0,
    timezone: 'US/Eastern',
    es_indicies: {
      fire-incident: '',
      apparatus-fire-incident: ''
    }
  },
};

Fixtures.deleteKibanaIndex({}, locals, (err) => {
  if (err) console.error('Oh no! Error occurred!!!');
  else console.info('Successfully initialized!');
});

Testing

You can test locally running npm run compile && node test

Current Tags

  • 2.0.3                                ...           latest (a year ago)

25 Versions

  • 2.0.3                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.0.20                                ...           2 years ago
  • 0.0.19                                ...           2 years ago
  • 0.0.18                                ...           2 years ago
  • 0.0.17                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |