Skip to content

Commit 2f3ee0e

Browse files
author
Ruben van Vreeland
committed
Add elastalert arguments to Readme
Added example configuration using start and end time.
1 parent f9bda16 commit 2f3ee0e

File tree

2 files changed

+38
-35
lines changed

2 files changed

+38
-35
lines changed

README.md

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -57,50 +57,35 @@ You can then start the build by running `node lib/index.js`.
5757
## Config
5858
In `config/config.example.json` you'll find the default config. You can make a `config.json` file in the same folder that overrides the default config. When forking this repository it is recommended to remove `config.json` from the `.gitignore` file. For local testing purposes you can then use a `config.dev.json` file which overrides `config.json`.
5959
60+
### ElastAlert parameters
61+
ElastAlert supports additional arguments, that can be passed in the `config.json` file. An example is given in `config/config-historic-data-example.json`.
62+
6063
### Install ElastAlert to /opt/elastalert
6164
And run `pip install -r requirements.txt` or read the installation guide of ElastAlert.
6265
6366
You can use the following config options:
6467
6568
```javascript
6669
{
67-
// The name of the app / server, used by the logging framework.
68-
"appName": "elastalert-server",
69-
70-
// The port to bind to
71-
"port": 3030,
72-
73-
// The path to the root ElastAlert folder. It's the folder that contains the `setup.py` script and the `config.yaml.example` file.
74-
"elastalertPath": "/opt/elastalert",
75-
76-
// The path to the rules folder containing all the rules. If the folder is empty a dummy file will be created to allow ElastAlert to start.
77-
"rulesPath": {
78-
79-
// Whether to use a path relative to the `elastalertPath` folder.
80-
"relative": true,
81-
82-
// The path to the rules folder.
83-
"path": "/rules"
70+
"appName": "elastalert-server", // The name used by the logging framework.
71+
"port": 3030, // The port to bind to
72+
"elastalertPath": "/opt/elastalert", // The path to the root ElastAlert folder. It's the folder that contains the `setup.py` script.
73+
"start": "2014-01-01T00:00:00", // Optional date to start querying from
74+
"end": "2016-01-01T00:00:00", // Optional date to stop querying at
75+
"verbose": true, // Optional, will increase the logging verboseness, which allows you to see information about the state of queries.
76+
"es_debug": true, // Optional, will enable logging for all queries made to Elasticsearch
77+
"debug": false, // Will run ElastAlert in debug mode. This will increase the logging verboseness, change all alerts to DebugAlerter, which prints alerts and suppresses their normal action, and skips writing search and alert metadata back to Elasticsearch.
78+
"rulesPath": { // The path to the rules folder containing all the rules. If the folder is empty a dummy file will be created to allow ElastAlert to start.
79+
"relative": true, // Whether to use a path relative to the `elastalertPath` folder.
80+
"path": "/rules" // The path to the rules folder.
8481
},
85-
86-
// The path to the rules folder containing all the rules. If the folder is empty a dummy file will be created to allow ElastAlert to start.
87-
"templatesPath": {
88-
89-
// Whether to use a path relative to the `elastalertPath` folder.
90-
"relative": true,
91-
92-
// The path to the rules folder.
93-
"path": "/rule_templates"
82+
"templatesPath": { // The path to the rules folder containing all the rule templates. If the folder is empty a dummy file will be created to allow ElastAlert to start.
83+
"relative": true, // Whether to use a path relative to the `elastalertPath` folder.
84+
"path": "/rule_templates" // The path to the rule templates folder.
9485
},
95-
96-
// The path to a folder that the server can use to store data and temporary files.
97-
"dataPath": {
98-
99-
// Whether to use a path relative to the `elastalertPath` folder.
100-
"relative": true,
101-
102-
// The path to the data folder.
103-
"path": "/server_data"
86+
"dataPath": { // The path to a folder that the server can use to store data and temporary files.
87+
"relative": true, // Whether to use a path relative to the `elastalertPath` folder.
88+
"path": "/server_data" // The path to the data folder.
10489
}
10590
}
10691
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"appName": "elastalert-server",
3+
"port": 3030,
4+
"elastalertPath": "/opt/elastalert",
5+
"start": "2014-01-01T00:00:00",
6+
"end": "2016-01-01T00:00:00",
7+
"verbose": true,
8+
"es_debug": true,
9+
"debug": false,
10+
"rulesPath": {
11+
"relative": true,
12+
"path": "/rules"
13+
},
14+
"templatesPath": {
15+
"relative": true,
16+
"path": "/rule_templates"
17+
}
18+
}

0 commit comments

Comments
 (0)