Kibana on dockers and behind Nginx

Hi Im trying to send webhooks to logstash using Kibana Rules an Actions, but Im getting this error:

The following error was found:
error calling webhook, request failed
Details:
[ECONNREFUSED] connect ECONNREFUSED 127.0.0.1:80

Docker-compose.yml

version: '2'
services:
    nginx:
        networks:
            - docker_nk
        image: nginx:1.16
        volumes:
            - './config/nginx.conf:/etc/nginx/nginx.conf'
            - './conf.d:/etc/nginx/conf.d:ro'
        ports:
            - '8080:80'
        links:
            - kibana
        depends_on:
            - kibana
    kibana:
        networks:
            - docker_nk
              #        image: kibana:7.17.5
        image: docker.elastic.co/kibana/kibana:7.17.5
        volumes:
            - './config/kibana.yml:/usr/share/kibana/config/kibana.yml'
            - './certs/kibana.crt.pem:/usr/share/kibana/config/kibana.crt.pem'
            - './certs/kibana.key.pem:/usr/share/kibana/config/kibana.key.pem'
            - './icon.logo_kibana-js.bundle.dll.js:/usr/share/kibana/built_assets/dlls/icon.logo_kibana-js.bundle.dll.js'
        environment:
            NODE_OPTIONS: "--max-old-space-size=2048"
networks:
    docker_nk:
        driver: bridge

@Patrick_Mueller can we please get some help here?

Thanks,
Bhavya

Can we see the configuration for your webhook connector? Screenshot of the web page is fine.

Given the error message, it sounds like the webhook is pointing to localhost port 80, and I would be very surprised to find port 80 open in the Kibana docker container.

I'm not sure I've ever seen anyone trying to use webhooks to talk to LogStash - not sure how well that will work. Is there any chance you could use the index connector to write a document directly into an elasticseach index instead of indirectly via LogStash?

Thanks for you answer, im using logstash to execute a script and send alerts to another plataform.

image

Based on the screenshot, the URL is invalid. It should be http://... - two / characters, not one.

I've opened up a bug to track this - we should be marking values like you entered as invalid, but are not currently doing that. [ResponseOps] webhook connector url not validated · Issue #140524 · elastic/kibana · GitHub

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.