elastalert-kibana-plugin
elastalert-kibana-plugin copied to clipboard
ECONNREFUSED 127.0.0.1:3030
Added elastalert-kibana-plugin.serverHost: "127.0.0.1" elastalert-kibana-plugin.serverPort: 3030 in kibana.yml file as mentioned by other users.
I installed elastalert server from https://github.com/bitsensor/elastalert.git and did make build command.
But still I couldn't resolve 502-Bad getaway issue in elastalert-kibana-plugin. Please help.
I'm stuck on this also. In my case I have installed the plugin in my own container.
I have env ELASTALERT_KIBANA_PLUGIN_SERVERHOST set, ~but in the logs the plugin is still trying to use localhost.~ Actually the logs don't seem to have anything related to accessing the api. I just get the app message
502 - Bad Gateway
connect ECONNREFUSED 127.0.0.1:3030```
...
I've tried a bunch of different env keys
- ELASTALERT_KIBANA_PLUGIN_SERVERHOST
- ELASTALERT-KIBANA-PLUGIN_SERVERHOST
- elastalert-kibana-plugin.serverHost
- ELASTALERT_SERVERHOST
- SERVERHOST
But always localhost is used.
I added
elastalert-kibana-plugin.serverHost: elastalert
elastalert-kibana-plugin.serverPort: 3030
to kibana.yml and that works. So I guess environment variables can only override, but not introduce new keys.
as all of you mentioned above. I added most of keywords (such as elastalert, localhost and 127.0.0.1) for the configuration. but still I got "ECONNREFUSED 127.0.0.1:3030".
my Kibina version : 6.4.2 elastalert version : 1.0.1
elastalert-kibana-plugin.serverHost: elastalert # already tried localhost, 127.0.0.1
elastalert-kibana-plugin.serverPort: 3030
need your useful advices.
I got rid of this error using my IPv4 address in kibana.yml
elastalert-kibana-plugin.serverHost: 192.168.1.36
elastalert-kibana-plugin.serverPort: 3030
I also tried for my personal IP starts with 192.168... unfortunately in my case, it didn't work need another way to do this.
If you are running the elastalert server as a container on docker, then you must use this command
elastalert-kibana-plugin.serverHost: elastalert
elastalert-kibana-plugin.serverPort: 3030
otherwise replace the 3030 with whatever port your Elastalert server is running on. This is defined in docker-compose.yml under elastalert under ports
Your elastalert in docker-compose should look something like this
elastalert: links: - elasticsearch image: bitsensor/elastalert container_name: elastalert environment: ELASTALERT_USER: "elastalert" ELASTALERT_PWD: "changeme" ELASTICSEARCH_HOST: "YOUR ELASTICSEARCH HOST" ELASTICSEARCH_PORT: "YOUR ELASTICSEARCH PORT" volumes: - ./elastalert/config/elastalert.yaml:/opt/elastalert/config.yaml:ro - ./elastalert/config/config.json:/opt/elastalert-server/config/config.json:ro - ./elastalert/rules/:/opt/elastalert/rules/ - ./elastalert/rule_templates/:/opt/elastalert/rule_templates/ ports: - 3030:3030 #logging: # driver: syslog # options: # syslog-address: "tcp://:5000" networks: - YOURNETWORKNAME
thanks, i have used as @pihlajus suggested its worked @jin-dev