简体   繁体   中英

Graylog docker installation, /api/api-browser/ page not showing

I installed the default graylog docker installation as the graylog documentation suggests. I just change the graylog version to 4.3.5. Here is my docker-compose.yml file:

version: '3.1'

services:
  # MongoDB: https://hub.docker.com/_/mongo
  mongo:
    image: mongo:4.2
    networks:
      - graylog

  # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
    environment:
      - http.host=0.0.0.0
      - transport.host=localhost
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    deploy:
      resources:
        limits:
          memory: 1g
    networks:
      - graylog

  # Graylog https://hub.docker.com/u/graylog
  graylog:
    image: graylog/graylog:4.3.5
    environment:
        # CHANGE ME (must be at least 16 characters)!
        - GRAYLOG_PASSWORD_SECRET=somepasswordpepper
        # Password: admin
        - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
        - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
    entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 --  /docker-entrypoint.sh
    networks:
      - graylog
    restart: always
    depends_on:
      - mongo
      - elasticsearch
    ports:
      # Graylog web interface and REST API
      - 9000:9000
      # Syslog TCP
      - 1514:1514
      # Syslog UDP
      - 1514:1514/udp
      # GELF TCP
      - 12201:12201
      # GELF UDP
      - 12201:12201/udp

networks:
    graylog:
      driver: bridge

It is running well but when I navigate the "Nodes" page and then click the "API Browser" link it navigates the http://172.18.0.4:9000/api/api-browser/ and nothing there. If I change the url with localhost it just showed a broken page.

Graylog REST API 浏览器

Some people have mentioned nginx but I can't find a well source on how to implement that. What do I need to do to view this API page?

I think you are accessing the wrong URL Please try "/api/api-browser/global/index.html" instead of "/api/api-browser/"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM