How to upgrade the graylog in docker-compose?

Hi,
I am new to Graylog, and Docker too.
I was able to deploy the Graylog by using the Docker compose.
mongodb: # Mongodb service
image: mongo:4.2
elasticsearch: # ElasticSearch service
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
graylog:
image: graylog/graylog:4.2

Once opened in the browser in the Notifications I got " You are running an outdated Graylog version"
Q1: How can upgrade this? without affecting any of my data may be in the future?

I am using persistent Volumes.
volumes:
- mongo_data:/data/db
- es_data:/usr/share/elasticsearch/data
- graylog_data:/usr/share/graylog/data
volumes:
mongo_data:
driver: local
es_data:
driver: local
graylog_data:
driver: local

Q2:How can I verify the data locations in my HOST?

Kind Request:
FYI: I was not comfortable with the Graylog documentation, went with How to Centralize Log Management with Graylog Docker
if any suggestions please let me know step by step.

Hello

Upgrading Graylog Docker using Docker-compose. Before continuing insure you read the changelogs. Check that system requirement’s are met. Last, make sure you pull the same image and match’s the current one installed.

1.Stop Graylog container
2.Modify the docker-compose
FROM

graylog:
    image: graylog/graylog-enterprise:4.2-jre11 <---- Here
    network_mode: bridge
    dns:
      - 8.8.8.8
      - 8.8.4.4

TO

graylog:
    image: graylog/graylog-enterprise:4.3-jre11 <---- Here
    network_mode: bridge
    dns:
      - 8.8.8.8
      - 8.8.4.4

3.Start Graylog container.
4.Refreash Web Browser

Results:

Hi gsmith,

Thank you for your time.

My bad I am not able to get you. mentioned my .yaml file below could you please add a view and give me an update.

FYI: I have tried changing the
graylog:
image: graylog/graylog:4.2
to
graylog:
image: graylog/graylog:4.3.3

after that, I am not able to run the MongoDB container. it’s exited with code 64.
i guess due to the persistent volume,
What is the way here to update without any data loss in DB and application?

version: '2'
services:
  # MongoDB: https://hub.docker.com/_/mongo/
  mongodb: # Mongodb service
    image: mongo:4.2 # Version of Mongodb docker image 
    volumes:
      - mongo_data:/data/db # Persisted mongodb data
  # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
  elasticsearch: # ElasticSearch service

    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 # Version of elasticsearch image
    volumes:
      - es_data:/usr/share/elasticsearch/data # Persisted elasticsearch data 
    environment:
      - http.host=0.0.0.0
      - transport.host=localhost
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      # Unlimited amount of memory set for elasticsearch container
      memlock:
        soft: -1
        hard: -1
          # Resource limit for elasticsearch set to 1 gigabyte
    mem_limit: 1g
  # Graylog: https://hub.docker.com/r/graylog/graylog/
  graylog:
    image: graylog/graylog:4.2 # Version of Graylog docker image
    volumes:
      - graylog_data:/usr/share/graylog/data # Persisted Graylog data
    environment:
      # CHANGE ME (must be at least 16 characters)!
      - GRAYLOG_PASSWORD_SECRET=<somesecret>
      # Password: admin
      - GRAYLOG_ROOT_PASSWORD_SHA2=<somepass>
      - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
      - GRAYLOG_WEB_ENDPOINT_URI=http://127.0.0.1:9000/api
        # Command to run as soon as components are started
    entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 --  /docker-entrypoint.sh
      # Containers that Graylog depends on 
    links:
      - mongodb:mongo
      - elasticsearch
    restart: always # Graylog container set to always restart when stopped
    depends_on:
      - mongodb
      - 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
# Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/
volumes:
  mongo_data:
    driver: local
  es_data:
    driver: local
  graylog_data:
    driver: local

Hello,

I’m not sure why Mongo container would not run. My procedure shown above is what I did.
Perhaps a clarification on my steps will help.

1.Get container id

root # docker ps

834a83939ca9   graylog/graylog-enterprise:4.3-jre11                             "tini -- /docker-ent…"   5 weeks ago    Up About a minute (healthy)   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:5044->5044/tcp, :::5044->5044/tcp, 0.0.0.0:5055->5055/tcp, :::5055->5055/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:25->25/udp, :::8443->8443/tcp, :::25->25/udp, 0.0.0.0:8514->8514/tcp, :::8514->8514/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 0.0.0.0:9300->9300/tcp, 0.0.0.0:8514->8514/udp, :::9300->9300/tcp, :::8514->8514/udp, 0.0.0.0:9515->9515/tcp, :::9515->9515/tcp, 0.0.0.0:9515->9515/udp, :::9515->9515/udp, 0.0.0.0:13301-13302->13301-13302/tcp, :::13301-13302->13301-13302/tcp, 0.0.0.0:49180->1281/tcp, :::49180->1281/tcp, 0.0.0.0:49179->1525/tcp, :::49179->1525/tcp   bin_graylog_1
871e601dbe2f   docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2-amd64   "/tini -- /usr/local…"   2 months ago   Up 4 weeks                    9200/tcp, 9300/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           bin_elasticsearch_1
791ee497f251   b313026e6fbd                                                     "/tini -- /usr/local…"   2 months ago   Up 6 weeks                    9200/tcp, 9300/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           home_elasticsearch_1
025df2d373ff   aa61e4b09cef                                                     "docker-entrypoint.s…"   2 months ago   Up 6 weeks                    27017/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    home_mongodb_1
040d0a505874   mongo:4.4                                                        "docker-entrypoint.s…"   2 months ago   Up 4 weeks                    27017/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    bin_mongodb_1

2.Stop Graylog container

root# docker stop 834a83939ca9

3.Find new image

root# docker images

root@ansible:/usr/local/bin# docker images
REPOSITORY                                          TAG            IMAGE ID       CREATED         SIZE
kong                                                latest         e457308de474   3 weeks ago     139MB
graylog/graylog-enterprise                          4.3-jre11      ec6db44b0465   7 weeks ago     841MB
mongo                                               4.4            aa61e4b09cef   2 months ago    438MB
postgres                                            9.6            027ccf656dc1   4 months ago    200MB
docker.elastic.co/elasticsearch/elasticsearch-oss   7.10.2-amd64   b313026e6fbd   18 months ago   699MB
pantsel/konga                                       latest         113950dafdbb   2 years ago     409MB

4.Modify the docker-compose YAML file with new image name as shown above.

graylog:
    image: graylog/graylog-enterprise:4.3-jre11
    network_mode: bridge

5.Start Graylog container

root# docker start 834a83939ca9

Example of the commands used.

root@ansible:/usr/local/bin# docker stop 834a83939ca9
834a83939ca9
root@ansible:/usr/local/bin# docker start 834a83939ca9
834a83939ca9
root@ansible:/usr/local/bin#

NOTE: Mongo and Elasticsearch should still be active during this time.

6.Tail container logs to insure no issues.

root# docker logs -f 834a83939ca9

Results:

I actually walk through each step above to insure it works. If this was tried already I would look into container logs to find out why.

EDIT: I forgot to mention, if your using the Graylog configuration file ( graylog.conf) within the container you may need to insure its correct.

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