elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Any way to install Yelp/Elastalert by using pip install in Dockerfile?

Open yichingwu opened this issue 6 years ago • 0 comments

I found that we need to download yelp/elastalert source code and run. In my case, I try to change to install yelp/elastalert by using pip install but not working. I review the source code:

*elastalert/src/controllers/process/index.js

    // Create ElastAlert index if it doesn't exist yet
    logger.info('Creating index');
    var indexCreate = spawnSync('python', ['-m', 'elastalert.create_index', '--index', config.get('writeback_index'), '--old-index', ''], {
      cwd: this._elastalertPath
    });
    logger.info('Starting elastalert with arguments ' + (startArguments.join(' ') || '[none]'));

    this._process = spawn('python', ['-m', 'elastalert.elastalert'].concat(startArguments), {
      cwd: this._elastalertPath
    });

pip install elastalert should be used

elastalert-create-index -> to create new elasticsearch  index
elastalert -> to run elastalert instance

yichingwu avatar Aug 10 '19 03:08 yichingwu