diff --git a/HOOKS.md b/HOOKS.md index ba81204..10d0e80 100644 --- a/HOOKS.md +++ b/HOOKS.md @@ -1,8 +1,9 @@ # 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` ## Docker run -``` +```bash docker run -d --name hastic-server -p 80:8000 -e HASTIC_API_KEY= HASTIC_ALERT_ENDPOINT="http://exam.ple" hastic-server ``` ## Node run Add variable before launch node.js server -``` + +```bash $ export HASTIC_ALERT_ENDPOINT=http://alert.example.com $ cd hastic-server/server $ npm start diff --git a/README.md b/README.md index 99857b4..5decbc5 100644 --- a/README.md +++ b/README.md @@ -36,19 +36,17 @@ See [hooks docs](https://github.com/hastic/hastic-server/blob/master/HOOKS.md) f #### Dependencies - git -- python3 with: - - pandas - - seglearn - - scipy - - tsfresh -- nodejs >= 9 +- python3 +- nodejs >= 6.0.0 Example of running hastic-server on Debian / Ubuntu host: -``` +```bash $ export HASTIC_API_KEY= $ export HASTIC_PORT= -# 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-pip \ gnupg \ @@ -56,8 +54,11 @@ $ export HASTIC_PORT= make \ g++ \ git -$ sudo pip3 install pandas seglearn scipy tsfresh -$ curl -sL https://deb.nodesource.com/setup_9.x | bash - +$ pip3 install pandas +$ pip3 install seglearn +$ pip3 install scipy +$ pip3 install tsfresh + # apt-get update && apt-get install -y nodejs $ git clone https://github.com/hastic/hastic-server.git $ cd hastic-server/server