

Centos docker syslog password#
Generate your own admin password with the following command and put the SHA-256 hash into the GRAYLOG_ROOT_PASSWORD_SHA2environment variable: echo -n "Enter Password: " & head -1 < /dev/stdin | tr -d '\n' | sha256sum | cut -d " " -f1Īll these settings and command line parameters can be put in a docker-compose.ymlįile, so that they don’t have to be executed one after the other. In this case you can login to Graylog with the username and password admin.
Centos docker syslog how to#
Graylog comes with a default configuration that works out of the box, but you have to set a password for the admin user and the web interface needs to know how to connect from your browser to the Graylog REST API.īoth settings can be configured via environment variables (also see Configuration): -e GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 Which you can then view in the Graylog UI: You can leave most these options as their defaults, but note that you’ll need to provide a name for the input, as well as select the node, or “Global” for the location for the input.Īfter that you can send a plaintext message to the Graylog Raw/Plaintext TCP input running on port 5555 using the following command: $ echo 'First log message' | nc localhost 5555

Once on the Inputs page, search for Raw/Plaintext TCPand click Launch new inputĪfter launching the input, you’ll see a dialog box pop up with several options. Similarly, the same can be done for UDP by appending -p 5555:5555/udp.Īfter ensuring that your Graylog Docker container is listening on :5555, create a Raw/Plaintext Input by navigating to your Graylog port, e.g.

p 9000:9000 -p 12201:12201 -p 1514:1514 -p 5555:5555 \įor example, to start a Graylog Docker container listening on port 5555, stop your container and recreate it, while appending -p 5555:5555to your docker run command: docker run -link mongo -link elasticsearch \ However, you can only use ports that have been properly mapped to your Docker container, otherwise data will not show up in the Graylog UI. You can create different kinds of inputs under System / Inputs. Should those be used on external servers, adjust GRAYLOG_HTTP_EXTERNAL_URIand add GRAYLOG_HTTP_PUBLISH_URIand GRAYLOG_HTTP_EXTERNAL_URIaccording to the nf documentation. All configuration examples are created to run on the local computer.
