This image contains a base AlmaLinux 8 installation with Graylog automatically installed, running on top of Docker.
Graylog (AlmaLinux 8)
- OS: almalinux 8
Description
Software included
Package | Version |
---|---|
Graylog | 5.0 |
Docker | 3.20.10 |
Docker compose | 2.12.2 |
containerd.io | 1.6.10 |
Initial start of the service
This application uses Docker to provide faster startup of the underlying software (Laravel) and direct use of it. This eliminates the need to familiarize yourself with its specifics in terms of configuration and installation. To start working directly with the application, all you have to do is start modifying the content uploaded to /opt/laravel/my-project
. Once you've done this, you can visit the IP address assigned to your virtual machine in your browser to view the content you've uploaded.
This application uses Docker to provide faster startup of the underlying software (Graylog) and direct use of it. This eliminates the need to familiarize yourself with its specifics in terms of configuration and installation. To start working directly with the application, all you have to do is open the IP, which your virtual machine uses, in a browser using the default Graylog port - 9000. (SERVER-IP:9000)
Note: By default Graylog can be accessed directly by IP address. To start using Graylog with your real domain, you first need to point the domain in question to your IP address and change the settings for where Laravel opens with the corresponding parameters in docker-compose.yml
. More information abount Graylog and its configuration options and parameters official documentation from the developer
Quick settings and frequently asked questions
- Logging into the cloud service is done using an SSH key or password that you have specified.
- Docker is installed as recommended by the official docker documentation.
- The standard
docker
anddocker compose
commands are now available in this application. - When the virtual machine is first started, it takes a few minutes before a Docker container containing Graylog is started.
- Graylog's data is set to be persistent and is located in
/opt/docker-graylog/data
. - By default Graylog starts at port 9000. (SERVER-IP:9000)
- By default the main administrator's user for Graylog is
admin
with passwordP@ssw0rd!
. Note: The main user's password can not be changed from the Web UI. It's neeed to be change via thedocker-compose.yml
file.
Additional Docker settings
Additional Graylog parameters which can be changed and directly controlled by Docker are stored as variables in the configuration file/opt/docker-graylog/docker-compose.yml
.
Note: After changing any of the values, you must restart the Docker container on which the application is running. For more information, please read the [Working with Docker section](## Working with Docker).
- GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/config/node-id"
- GRAYLOG_ROOT_TIMEZONE: "Europe/Sofia"
- GRAYLOG_PASSWORD_SECRET: PasswordSectret
- GRAYLOG_ROOT_PASSWORD_SHA2: "0e44ce7308af2b3de5232e4616403ce7d49ba2aec83f79c196409556422a4927" # Default password: P@ssw0rd!
- GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000"
- GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9000/"
- GRAYLOG_ELASTICSEARCH_HOSTS: "http://opensearch:9200"
- GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
How to change GRAYLOG_ROOT_PASSWORD_SHA2
You can generate new random root
password using the command below:
echo -n “Enter Password: ” && head -1 </dev/stdin | tr -d ‘\n’ | sha256sum | cut -d” ” -f1
How to change GRAYLOG_PASSWORD_SECRET
You can generate new random password secret
using the command below:
shuf -er -n72 {A..Z} {a..z} {0..9} | tr -d '\n'
Working with Docker
The organization of this application is entirely done using Docker. In this way, we can provide you with ready-made applications faster. In addition, their configuration is more flexible and quite controllable. To be able to control this application, however, you need to know some basic Docker functionalities and features.
Restart all services
Restarting the database and the Docker container that contains Laravel itself, along with the rest of the software, can be done in two ways:
- By restarting the entire virtual machine
- Restarting the Docker containers, which is the faster option. To do this, access your machine via SSH, and run the following commands:
sudo su -
cd /opt/docker-laravel
docker compose restart
Checking the status of the Docker application
To check, you need to run the following commands:
sudo su -
docker ps -a
Please pay attention to the STATUS
column. It should show how long the service has been running, for example Up X minutes
. If the status is Restarting
then you need to check what is wrong with the application. In such a case, you can check by following the application logs as follows:
- Get the application name that you can see in the
NAMES
column from the output of thedocker ps -a
command. View the logs with thedocker logs <NAME>
command, whereis the name of the container.
Changing settings
The settings in section [Additional Docker settings](## Additional Docker settings) can be set in the docker-compose.yml file
. The path to it is described again in this section. To change a setting, open the configuration file and note the environment
section under graylog
. Each configuration option must be described on a new line with a dash in front, as in the following example:
environment:
GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/config/node-id"
GRAYLOG_ROOT_TIMEZONE: "Europe/Sofia"
Please note that the correct indentation (number of spaces) must also be observed, as this is important for yaml configuration files.