# test-alert-load-kbn

> command-line utility for doing kibana alerting load tests

Latest version **2.9.0** (published 2022-03-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install test-alert-load-kbn
pnpm add test-alert-load-kbn
yarn add test-alert-load-kbn
bun add test-alert-load-kbn
```

Provides the command `kbn-alert-load`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.9.0 |
| Published | 2022-03-02 |
| First published | 2022-02-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 9.8 MB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | pmuellr |
| Maintainers | nikitakhristinin |

## Links

- npm: https://www.npmjs.com/package/test-alert-load-kbn
- Repository: https://github.com/pmuellr/kbn-alert-load
- Issues: https://github.com/pmuellr/kbn-alert-load/issues
- npm.io page: https://npm.io/package/test-alert-load-kbn

## Dependencies (5)

- [meow](https://npm.io/package/meow.md) ^7.0.1
- [axios](https://npm.io/package/axios.md) ^0.21.0
- [tempy](https://npm.io/package/tempy.md) ^1.0.0
- [test-alert-load-kbn](https://npm.io/package/test-alert-load-kbn.md) 2.7.0
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) ^7.9.1

## Recent versions

- 2.9.0 (latest) — 2022-03-02
- 2.8.0 — 2022-02-28
- 2.7.0 — 2022-02-28
- 2.6.0 — 2022-02-24
- 2.5.0 — 2022-02-24
- 2.3.1 — 2022-02-24
- 2.3.0 — 2022-02-23
- 2.2.0 — 2022-02-23
- 2.1.0 — 2022-02-22

## README

kbn-alert-load: command-line utility for doing kibana alerting load tests
===============================================================================
Modified for use with detection rules

## usage

    kbn-alert-load <args> <options>

or from local env 

    ./kbn-alert-load <args> <options>

TBD; run `kbn-alert-load` with no parameters for help.


## install pre-reqs

- install Node.js - the current version Kibana uses
- have an account set up at https://cloud.elastic.co or equivalent
- create an API key at the cloud site for use with `ecctl`
- install `ecctl` - https://www.elastic.co/guide/en/ecctl/current/ecctl-installing.html
- create an initial config for `ecctl` with `ecctl init`, providing your API key 
    - When running against Cloud it is possible to run into provisioning limitations on cluster size 
    - Staging can be used by updating ~/.ecctl/config.json
    ```
    {
      "host": "https://api.staging.foundit.no",
      "api_key": $API_KEY,
      "region": "gcp-us-central1",
      "output": "text",
      "timeout": 30000000000,
      "insecure": true
    }
    ```


## install

    npm install -g kbn-alert-load


## run via npx without installing

    npx kbn-alert-load <args> <opts>


## running test suites
List the available test suites
    
    kbn-alert-load ls
    
Specify the test suite with run

    kbn-alert-load run create-indicator-rules
    
Specify the length of the test suite with -M for minutes.  By default the length of the test is 10 minutes.
    
    kbn-alert-load run -M 30 create-indicator-rules

When running a test suite the against the staging ESS it may take more time for the staging cloud to provision enough backend resources to run the test than the timeout to wait for the deployment to be healthy.  In the case this happens cleanup to the existing deployments and try again:

    kbn-alert-load rmdall
 
## Different tests by rule types 
By default `kbn-alert-load` run tests for alerts rule. But it is also possible to run tests with security detection  Indicator match rule by specifying `--type='im'`
        
    kbn-alert-load.js run im-test --type='im' 

## Running against an existing deployment
By default `kbn-alert-load` create deployment for each scenario in `suite.scenarios`. But it possible to run you test again existing deployment.

1. Run just one specific scenarios from suite (by deafult run the first one)

        kbn-alert-load run im-test --type='im' -e ESURL -k KBURL -s 3   

2. Run all scenarios from a suite in sequience mode
    
        kbn-alert-load.js runSequence im-test --type='im'  -r 'report-im.html' -o 'yourFolderReport' -e ESURL -k KBURL


## Specifying new test suites
Test suites are defined under suites.js

## change log

#### 2.1.0 - 2021-07-14

- updated to work with the latest ecctl v1.4.0
- changed RAM size calculation to match closest available values per region
- various other small updates
- pull request: https://github.com/pmuellr/kbn-alert-load/pull/5

#### 1.x.x - ????-??-??

- add lsd, rmd, and rmdall commands
- print existing deployments at begin and end of run command

#### 1.0.0 - 2020-10-29

- initial release

---
_Source: https://npm.io/package/test-alert-load-kbn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
