elastalert2-server icon indicating copy to clipboard operation
elastalert2-server copied to clipboard

is there is any way to run elastalert without using docker

Open WaqasNUST opened this issue 4 years ago • 10 comments

WaqasNUST avatar Jun 27 '22 10:06 WaqasNUST

Yes - you need the same stuff that is installed in container like node, python etc.

IMO https://github.com/Karql/elastalert2-server/blob/master/Dockerfile is self documented to do that.

Karql avatar Jun 27 '22 10:06 Karql

can you explain me a little bit that what are the requirements to run the elastalert 2 server ?

WaqasNUST avatar Jun 28 '22 07:06 WaqasNUST

or your provided directory is the complete package to run elastalert2 server

WaqasNUST avatar Jun 28 '22 07:06 WaqasNUST

Like I said Dockerfile contains detailied instruction step by step what you need.

Karql avatar Jun 28 '22 07:06 Karql

one last question Capture

these docker commands means that we have to run elastalert firstly then elastalert 2 server will work?

WaqasNUST avatar Jun 28 '22 10:06 WaqasNUST

No.

This mount file /config/elastalert.yaml from host (server, your computer) in running container in location /opt/elastalert/config.yaml.

https://docs.docker.com/storage/volumes/#choose-the--v-or---mount-flag

elastalert2-server run elastalert2 itself (new process https://github.com/Karql/elastalert2-server/blob/master/src/services/process.service.ts#L108).

Karql avatar Jun 28 '22 10:06 Karql

Hello Sir Sir can we change the localhost:3030 to ip? if possible so where i can do this

Thank you for your time

WaqasNUST avatar Jun 29 '22 06:06 WaqasNUST

By default server listen on all interfaces so you can access it by host or ip.

image

Karql avatar Jun 29 '22 06:06 Karql

sir when i wrote the rule name and then i press the save button it gave me the message "internal server error" and in terminal it give me the error like that

node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^

[Error: EACCES: permission denied, open '/opt/elastalert/rules/Spam Alert.yaml'] { errno: -13, code: 'EACCES', syscall: 'open', path: '/opt/elastalert/rules/Spam Alert.yaml' }

WaqasNUST avatar Jul 01 '22 07:07 WaqasNUST

EACCES: permission denied is clear enough. ` - probably user that is used to run elastalert2-server does not have access to this folder.

@Kiscitkahutta sory this place is for submit issues not for learning you IT.

Karql avatar Jul 01 '22 09:07 Karql