Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Karql committed Mar 16, 2021
1 parent 972795a commit 04ebaf7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 91 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## 1.4.0 (2021-03-16)

### Features
- Migrate from legacy plugin to Kibana Plaftorm (thanks to: @ch-bas who started this migration)
- Support version Kibana >=7.10.0 <=7.11.2

### Braking changes
- config section name has been changed `elastalert-kibana-plugin -> elastalertKibanaPlugin`

### Bug fixes
- HttpRoutes
> All input (body, query parameters, and URL parameters) must be validated using the `@kbn/config-schema` package. If no validation schema is provided, these values will be empty objects
https://www.elastic.co/guide/en/kibana/current/migrating-legacy-plugins-examples.html#http-routes-migration

- EuiButtonToggle
EuiButtonToggle was removed: https://github.com/elastic/eui/blob/fe426f6f6828b5e9ed88dc82627c54e403801b59/CHANGELOG.md#3000

### Not working / TODO
- Testing rules (probably need changes in ElastAlert Server)
- Show error when delete rule fails
- Fix typings
41 changes: 20 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
## Development

See the [kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) for instructions setting up your development environment. Once you have completed that, you can use the commands below.
See the [kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md).

- `yarn kbn bootstrap`
If you would like to run this plugin:

Install dependencies and crosslink Kibana and all projects/plugins.
1) Clone kibana repo: `git clone https://github.com/elastic/kibana.git` and enter to the repo: `cd kibana`
2) Change branch: `git checkout 7.11`
3) Install nvm if you don't have
4) Install node: `nvm install $(cat .nvmrc)`
5) Configure node: `nvm use $(cat .nvmrc)`
6) Install yarn: `npm install -g yarn`
7) Run: `yarn kbn bootstrap`
8) Configure kibana (`config/kibana.yml`):

- `yarn start`
```
elastalertKibanaPlugin.serverSsl: false
elastalertKibanaPlugin.serverHost: localhost
elastalertKibanaPlugin.serverPort: 8030
logging.verbose: true
```

Start kibana and have it include this plugin. You can pass any arguments that you would normally send to `bin/kibana`
10) Clone this repo to: `plugins/`. `git clone https://github.com/karql/elastalert-kibana-plugin.git plugins/elastalert-kibana-plugin`
11) Run elastic with elastalert. For test purpose you can use: `plugins/elastalert-kibana-plugin/dev/elastic-dev-env/docker-compose.yml` by running:

```bash
yarn start --elasticsearch.url http://localhost:9220
```
`docker-compose -p elastic-dev-env -f dev\elastic-dev-env\docker-compose.yml up -d`

- `yarn build`

Build a distributable archive of the plugin.

- `yarn test:browser`

Run the browser tests in a real web browser.

- `yarn test:server`

Run the server tests using mocha.

For more information about any of these commands run `yarn ${task} --help`. For a full list of tasks checkout the `package.json` file, or run `yarn run`.
12) Run kibana: `yarn start --oss`

## Releasing

Expand Down
88 changes: 18 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Fork of [bitsensor/elastalert-kibana-plugin](https://github.com/bitsensor/elastalert-kibana-plugin)

Official repository is not maintained anymore.

Aim of this fork is to support new versions of Kibana (after migration to Kibana New Platform starts from 7.10).

There is still some work to be done, but this version should work ;)

For older versions check: [nsano-rururu/elastalert-kibana-plugin](https://github.com/nsano-rururu/elastalert-kibana-plugin)

# ElastAlert Kibana Plugin

> This plugin provides a way to create, test and edit ElastAlert rules within Kibana.
![GitHub release](https://img.shields.io/github/release/nsano-rururu/elastalert-kibana-plugin.svg)
![Github Releases](https://img.shields.io/github/downloads/nsano-rururu/elastalert-kibana-plugin/total.svg)
![GitHub stars](https://img.shields.io/github/stars/nsano-rururu/elastalert-kibana-plugin.svg?style=social&label=Stars)
![GitHub release](https://img.shields.io/github/release/karql/elastalert-kibana-plugin.svg)
![Github Releases](https://img.shields.io/github/downloads/karql/elastalert-kibana-plugin/total.svg)
![GitHub stars](https://img.shields.io/github/stars/karql/elastalert-kibana-plugin.svg?style=social&label=Stars)

---

## Demo
![Showcase](showcase.gif)

## Why I created a fork repository

Since the official site does not release the latest Kibana compatible version,
it is intended to publish the latest version until the release,
and there are no plans to add features or fix bugs.
If the official website resumes the latest release, this repository will be deleted.

## Requirements
- Our [ElastAlert server](https://github.com/bitsensor/elastalert) fork
- [Kibana 6.8.1~6.8.12、7.5.1~7.8.1](https://github.com/nsano-rururu/elastalert-kibana-plugin/releases/tag/1.2.0)
- [Kibana 7.9.0~7.9.3](https://github.com/nsano-rururu/elastalert-kibana-plugin/releases/tag/1.3.0)
- TODO: [Kibana 7.10.0~](https://github.com/nsano-rururu/elastalert-kibana-plugin/releases/tag/1.4.0)
- [ElastAlert Server](https://github.com/karql/elastalert) fork with latest version of ElastALert
- Kibana 7.10.0 or higher

## Installation
Check the [releases](https://github.com/nsano-rururu/elastalert-kibana-plugin/releases) page to download and install the latest version of this plugin that is compatible with your Kibana version. Please be aware that you will need a running ElastAlert server to make use of this plugin.
Check the [releases](https://github.com/karql/elastalert-kibana-plugin/releases) page to download and install the latest version of this plugin that is compatible with your Kibana version. Please be aware that you will need a running ElastAlert server to make use of this plugin.

[ElastAlert Server Docker Images](https://github.com/nsano-rururu/elastalert-kibana-plugin/wiki/ElastAlert-Server-Docker-Images)
[docker-compose sample](https://github.com/nsano-rururu/elastalert-kibana-plugin/wiki/docker-compose-sample)
[ElastAlert Server Docker Images](https://hub.docker.com/r/karql/elastalert)

## Configuration
By default the plugin will connect to `http://localhost:3030`. If your ElastAlert server is running on a different host or port add/change the following options in your `config/kibana.yml` file:
Expand All @@ -42,57 +42,5 @@ elastalertKibanaPlugin.serverPort: 3030
⚠️ from version 1.4.0 config section name has been changed:
`elastalert-kibana-plugin -> elastalertKibanaPlugin`

## Changelog

### 1.4.0 (2021-03-15)

**Features**
- Migrate to legacy plugin to Kibana Plaftorm (thanks to: @ch-bas who started this migration)
- Support version Kibana 7.11.1

**Braking changes**
- config section name has been changed `elastalert-kibana-plugin -> elastalertKibanaPlugin`

**Bug fixes**
- HttpRoutes
> All input (body, query parameters, and URL parameters) must be validated using the `@kbn/config-schema` package. If no validation schema is provided, these values will be empty objects
https://www.elastic.co/guide/en/kibana/current/migrating-legacy-plugins-examples.html#http-routes-migration

- EuiButtonToggle
EuiButtonToggle was removed: https://github.com/elastic/eui/blob/fe426f6f6828b5e9ed88dc82627c54e403801b59/CHANGELOG.md#3000

**Not working / TODO**
- Testing rules (probably need changes in ElastAlert Server)
- Show error when delete rule fails
- Fix typings

## Dev notes

If you would like to run this plugin:

1) Clone kibana repo: `git clone https://github.com/elastic/kibana.git` and enter to repo: `cd kibana`
2) Change branch: `git checkout 7.11`
3) Install nvm if you don't have
4) Install node: `nvm install $(cat .nvmrc)`
5) Configure node: `nvm use $(cat .nvmrc)`
6) Install yarn: `npm install -g yarn`
7) Run: `yarn kbn bootstrap`
8) Configure kibana (`config/kibana.yml`):

```
elastalertKibanaPlugin.serverSsl: false
elastalertKibanaPlugin.serverHost: localhost
elastalertKibanaPlugin.serverPort: 8030
logging.verbose: true
```

10) Clone this repo to: `plugins/`. `git clone https://github.com/nsano-rururu/elastalert-kibana-plugin.git plugins/elastalert-kibana-plugin`
11) Run elastic with elastalert. For test purpose you can use: `plugins/elastalert-kibana-plugin/dev/elastic-dev-env/docker-compose.yml` be running:

`docker-compose -p elastic-dev-env -f dev\elastic-dev-env\docker-compose.yml up -d`

12) Run kibana: `yarn start --oss`

## Contribution
Please report any issues or suggestions you have on the [issues page](https://github.com/nsano-rururu/elastalert-kibana-plugin/issues). If you want to create a pull request please check our [contribution guide](CONTRIBUTING.md).
Please report any issues or suggestions you have on the [issues page](https://github.com/karql/elastalert-kibana-plugin/issues). If you want to create a pull request please check our [contribution guide](CONTRIBUTING.md).

0 comments on commit 04ebaf7

Please sign in to comment.