Browse Source

docs++

pull/1/head
Alexey Velikiy 6 years ago
parent
commit
d67313e2af
  1. 15
      HOOKS.md
  2. 20
      README.md

15
HOOKS.md

@ -5,10 +5,10 @@ It's possible to get notifications about new anomalies via [WebHooks](https://en
You need to set variable `HASTIC_ALERT_ENDPOINT` with your endpoint and expects `POST` methods
from hastic-server if format:
```
```json
{
anomaly: 'cpu_load',
status: <str>
"anomaly": "cpu_load",
"status": "OK"
}
```
@ -26,9 +26,12 @@ docker run -d --name hastic-server -p 80:8000 -e HASTIC_API_KEY=<your_grafana_ap
Add variable before launch node.js server
```bash
$ export HASTIC_ALERT_ENDPOINT=http://alert.example.com
$ cd hastic-server/server
$ npm start
export HASTIC_API_KEY=<your_grafana_api_key>
export HASTIC_PORT=<port_you_want_to_run_server_on>
export HASTIC_ALERT_ENDPOINT=http://alert.example.com
cd hastic-server/server
npm start
```

20
README.md

@ -2,7 +2,7 @@
Implementation of basic pattern recognition and unsupervised learning for anomaly detection.
Implementation of analytic unit for Hastic.
Implementation of analytic unit for Hastic.
See also:
* [Hooks](https://github.com/hastic/hastic-server/blob/master/HOOKS.md) - notifications about events
@ -18,8 +18,15 @@ API key role needs only `Viewer` access.
Example of running hastic-server in Docker:
#### Build
```bash
git clone https://github.com/hastic/hastic-server.git
cd hastic-server
docker build -t hastic-server .
```
#### Run
```bash
docker run -d --name hastic-server -p 80:8000 -e HASTIC_API_KEY=<your_grafana_api_key> hastic-server
```
@ -35,10 +42,10 @@ You can export following environment variables for hastic-server to use:
You need in your system:
* [nodejs >= 6.0.0](https://nodejs.org/en/download/package-manager/)
* [python3 python3-pip](https://www.python.org/downloads/)
* [python3](https://www.python.org/downloads/) with pip3
* curl gnupg git make g++
### Intallation
#### Intallation
```bash
pip3 install pandas seglearn scipy tsfresh
@ -46,13 +53,12 @@ git clone https://github.com/hastic/hastic-server.git
cd ./hastic-server/server
npm install
npm run build
```
### Run
#### Run
```bash
$ export HASTIC_API_KEY=<your_grafana_api_key>
$ export HASTIC_PORT=<port_you_want_to_run_server_on>
export HASTIC_API_KEY=<your_grafana_api_key>
export HASTIC_PORT=<port_you_want_to_run_server_on>
cd ./hastic-server/server
npm start

Loading…
Cancel
Save