Praeco is an alerting tool for elasticsearch – a GUI for elastalert, using the elastalert API.
- Interactively build alert rules using a query builder
- View a preview of your query and a graph of results
- Test your alerts against historical data
- See a preview of your alert subject/body as you are editing
- Supports notifications to Slack, Email or HTTP POST
- Supports Any, Blacklist, Whitelist, Change, Frequency, Flatline, Spike and Metric Aggregation elastalert rule types
- View logs of when your alerts are checked and when they fire
- Use templates to pre-fill commonly used rule options
First, edit rules/BaseRule.config and change the slack and smtp settings to match your environment.
Then run the app using docker:
export PRAECO_ELASTICSEARCH=<your elasticsearch ip>
docker-compose up
ℹ️ Don't use 127.0.0.1 for PRAECO_ELASTICSEARCH. See first item under the Troubleshooting section.
Praeco should now be available on http://127.0.0.1:8080
A walkthrough article is available to guide you through creating your first rule.
docker pull servercentral/praeco; docker pull servercentral/elastalert
docker-compose up --force-recreate --build; docker image prune -f
ℹ️ You may need to update your config files when a new version comes out. Please see UPGRADING.md for version-specific instructions.
OPTIONAL: Edit config/api.config.json, config/elastalert.yaml, and/or public/praeco.config.json for advanced configuration options. See the api docs and the example elastalert config for more information on config options.
The following config settings are available in praeco.config.json:
// link back to your praeco instance, used in slack alerts
"appUrl": "http://praeco-app-url:8080",
// a recordatus (https://github.com/ServerCentral/recordatus) instance for javascript error reporting
"errorLoggerUrl": "",
// hide these fields when editing rules, if they are already filled in template
"hidePreconfiguredFields": []
Edit config/api.config.json
and set/add "es_ssl": true
.
The praeco UI is served by an included nginx server. Configure it as you would any nginx project by editing the files in nginx_config
. Then update your docker-compose.yml and add your certificate files (under webapp volumes).
Edit config/elastalert.yaml
and config/api.config.json
and change the writeback_index values.
Edit config/elastalert.yaml
and uncomment the appropriate lines.
First, install docker and docker-compose.
Then, using powershell, run these commands:
$Env:PRAECO_ELASTICSEARCH="1.2.3.4"
docker-compose.exe up
Replace 1.2.3.4 with your Elasticsearch IP.
Praeco, running within a docker container, cannot communicate with your ES bound to localhost. You need to change your ES network.host
setting
to something different. The value of _site_
is suggested, that will bind to a local network IP on your machine. Then use that
IP address for PRAECO_ELASTICSEARCH. Here's a working example:
elasticsearch -E network.host=_site_
export PRAECO_ELASTICSEARCH=192.168.1.145
docker-compose up
Replace 192.168.1.145 with the IP address your ES binds to (look for bound_addresses in the elasticsearch launch log).
First of all, try to test your alert with varying time frames and see if that is returning any results.
If the test is returning results, but you are not receiving any alerts, check the error log. There may be a problem with your slack or email settings. Make sure you edited rules/BaseRule.config and have correct values in there.
If the test is not returning results, even though you think it should, try reading the elastalert docs for your rule type. Compare the yaml from praeco with the options from the docs to make sure the rule is being created as expected. If praeco is generating the wrong yaml, please file an issue.
You will see this error when launching if praeco cannot find elasticsearch at the IP address you specified at $PRAECO_ELASTICSEARCH. Please make sure you can communicate with this IP address by issuing the following command: curl http://$PRAECO_ELASTICSEARCH:9200
. If the connection is refused, your machine cannot communicate with Elasticsearch, it may be a networking problem.
Make sure the channel/username you are trying to post to exists.
If you want to develop for praeco, run the built-in development server:
npm install
npm run serve
To build a docker container from local changes:
docker build -t praeco .
Unit tests:
npm run test:unit
E2E tests:
npm run test:e2e