Browse Source

docs++

pull/1/head
Alexey Velikiy 7 years ago
parent
commit
96ec2b2af1
  1. 10
      HOOKS.md
  2. 21
      README.md

10
HOOKS.md

@ -1,8 +1,9 @@
# Anomaly hooks # Anomaly hooks
- HASTIC_ALERT_ENDPOINT - (optional) endpoint you want to send alerts to It's possible to get notifications about new anomalies via [WebHooks](https://en.wikipedia.org/wiki/Webhook)
Alert example (method: POST): You need to set variable `HASTIC_ALERT_ENDPOINT` with your endpoint and expects `POST` methods
from hastic-server if format:
``` ```
{ {
@ -16,14 +17,15 @@ Alert example (method: POST):
- `OK` - `OK`
## Docker run ## Docker run
``` ```bash
docker run -d --name hastic-server -p 80:8000 -e HASTIC_API_KEY=<your_grafana_api_key> HASTIC_ALERT_ENDPOINT="http://exam.ple" hastic-server docker run -d --name hastic-server -p 80:8000 -e HASTIC_API_KEY=<your_grafana_api_key> HASTIC_ALERT_ENDPOINT="http://exam.ple" hastic-server
``` ```
## Node run ## Node run
Add variable before launch node.js server Add variable before launch node.js server
```
```bash
$ export HASTIC_ALERT_ENDPOINT=http://alert.example.com $ export HASTIC_ALERT_ENDPOINT=http://alert.example.com
$ cd hastic-server/server $ cd hastic-server/server
$ npm start $ npm start

21
README.md

@ -36,19 +36,17 @@ See [hooks docs](https://github.com/hastic/hastic-server/blob/master/HOOKS.md) f
#### Dependencies #### Dependencies
- git - git
- python3 with: - python3
- pandas - nodejs >= 6.0.0
- seglearn
- scipy
- tsfresh
- nodejs >= 9
Example of running hastic-server on Debian / Ubuntu host: Example of running hastic-server on Debian / Ubuntu host:
``` ```bash
$ export HASTIC_API_KEY=<your_grafana_api_key> $ export HASTIC_API_KEY=<your_grafana_api_key>
$ export HASTIC_PORT=<port_you_want_to_run_server_on> $ export HASTIC_PORT=<port_you_want_to_run_server_on>
# sudo apt-get install \ # If you don't have nodejs, uncomment next line:
# curl -sL https://deb.nodesource.com/setup_9.x | bash -
# apt-get install \
python3 \ python3 \
python3-pip \ python3-pip \
gnupg \ gnupg \
@ -56,8 +54,11 @@ $ export HASTIC_PORT=<port_you_want_to_run_server_on>
make \ make \
g++ \ g++ \
git git
$ sudo pip3 install pandas seglearn scipy tsfresh $ pip3 install pandas
$ curl -sL https://deb.nodesource.com/setup_9.x | bash - $ pip3 install seglearn
$ pip3 install scipy
$ pip3 install tsfresh
# apt-get update && apt-get install -y nodejs # apt-get update && apt-get install -y nodejs
$ git clone https://github.com/hastic/hastic-server.git $ git clone https://github.com/hastic/hastic-server.git
$ cd hastic-server/server $ cd hastic-server/server

Loading…
Cancel
Save