An open API service indexing awesome lists of open source software.

https://github.com/forecho/graylog-docker

graylog docker
https://github.com/forecho/graylog-docker

graylog

Last synced: about 1 year ago
JSON representation

graylog docker

Awesome Lists containing this project

README

          

# graylog-docker

## Install

### Install Docker

```shell
sudo curl -sSL https://get.docker.com/ | sh
sudo curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
```

中国版安装

```shell
sudo curl -sSL https://get.daocloud.io/docker | sh
sudo curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d52bcda9.m.daocloud.io
sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
```

换中国源

```shell
vim /etc/docker/daemon.json
```

添加代码:

```json
{
"registry-mirrors": [
"https://dockerhub.azk8s.cn",
"https://docker.mirrors.ustc.edu.cn"
]
}
```

重启服务

```
sudo systemctl daemon-reload && sudo systemctl restart docker
```

### Clone Code

```shell
git clone https://github.com/forecho/graylog-docker.git
cd graylog-docker
```

### Config env

```shell
cp .env.example .env
```

change config

- **`GRAYLOG_PASSWORD_SECRET`**: This field is used to encrypt Graylog passwords. Must be at least 16 characters.
- **`GRAYLOG_ROOT_PASSWORD_SHA2`**: This is a SHA2 hash of the password for the admin user (above, the hash is for the password “admin”). You can generate your own password hash with the following command:

```shell
echo -n "Enter Password: " && head -1

## Test

```shell
echo '{"version": "1.1","host":"example.org","short_message":"A short message that helps you identify what is going on","full_message":"Backtrace here\n\nmore stuff","level":1,"_user_id":9001,"_some_info":"foo","_some_env_var":"bar"}' | gzip | nc -u -w 1 127.0.0.1 12201
```

## Link

- [How to Create a Graylog Container in Docker](https://hometechhacker.com/how-to-create-a-graylog-container-in-docker/)
- [Docker - Graylog 3.2.0 documentation](https://docs.graylog.org/en/3.2/pages/installation/docker.html)
- [镜像加速器](https://yeasy.gitbooks.io/docker_practice/install/mirror.html)