Skip to content

Commit 75954eb

Browse files
author
Ruben van Vreeland
committed
Add support for alerting over stale data
1 parent 4102c8e commit 75954eb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/controllers/process/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,16 @@ export default class ProcessController {
5858
logger.warn('ElastAlert will start but might not be able to save its data!');
5959
}
6060

61-
this._process = spawn('python', ['-m', 'elastalert.elastalert'], {
61+
let startArguments = [];
62+
63+
if (config.get('start') !== undefined && config.get('start') !== '') {
64+
logger.info('Setting ElastAlert query beginning to time ' + config.get('start'));
65+
startArguments.push('--start', config.get('start'));
66+
}
67+
68+
logger.info('Starting elastalert with arguments ' + (startArguments.join(' ') || '[none]'));
69+
70+
this._process = spawn('python', ['elastalert/elastalert.py'].concat(startArguments), {
6271
cwd: this._elastalertPath
6372
});
6473

0 commit comments

Comments
 (0)