0

このチュートリアルを正常に完了した後:

Cent OS 上の ELK

私は現在、以下で構成される ELK スタックに取り組んでいます。

サーバー A: Kibana / Elasticsearch

サーバー B: Elasticsearch / Logstash

(AとBの作業後、スケーリング) Server N: Elasticsearch / Logstash

これまでのところ、サーバー A / B に ES をインストールすることができ、IP 経由で各サーバーの ES インスタンスへのカールが成功しました ( curl -XGET "server A and B's IP:9200", 200 / ステータス メッセージが返されます)。

サーバー A:

host: "[server A ip]"
elasticsearch_url: "[server a ip:9200]"

サーバー B:

network.host: "[server b ip]"

サーバーAでKibanaをカールすることもできます[server a ip]:5601

残念ながら、ブラウザでキバナを開こうとすると、502 bad gateway が表示されます。

ヘルプ?

サーバーAからのnginx構成(プロジェクトの要件により、実際にはあまり変更できません):

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
}

kibana.conf "conf.d内"

server {
    listen 80;

    server_name kibana.redacted.com;

    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.users;

    location / {
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;        
    }
}

nginx エラー ログ:

2015/10/15 14:41:09 [error] 3416#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: [my vm "centOS", no clue why it's in here], server: kibana.redacted.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5601/", host: "kibana.redacted.com"
4

1 に答える 1

0

「1 つのインデックス、1 つのドキュメント」というテスト データをロードすると、魔法のように機能しました。Kibana3 では、接続できなくてもダッシュと有用なエラーが発生する可能性がありました。

しかし、それは Kibana4 ... のやり方ではありません。

于 2015-10-15T19:44:19.393 に答える