You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
686 B

6 years ago
# Anomaly hooks
6 years ago
It's possible to get notifications about new anomalies via [WebHooks](https://en.wikipedia.org/wiki/Webhook)
6 years ago
6 years ago
You need to set variable `HASTIC_ALERT_ENDPOINT` with your endpoint and expects `POST` methods
from hastic-server if format:
6 years ago
```
{
anomaly: 'cpu_load',
status: <str>
}
```
`status` field can be one of:
- `alert`
- `OK`
6 years ago
6 years ago
## Docker run
6 years ago
```bash
6 years ago
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
```
6 years ago
## Node run
6 years ago
Add variable before launch node.js server
6 years ago
```bash
6 years ago
$ export HASTIC_ALERT_ENDPOINT=http://alert.example.com
$ cd hastic-server/server
$ npm start
```