Skip to content
Snippets Groups Projects
Commit bf1f4f0f authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-445: Added documentation for adding log sources

parent 88bc080d
No related branches found
No related tags found
1 merge request!159L2SS-445: Forward logs from the Docker containers to ELK
...@@ -89,13 +89,10 @@ The ``common.lofar_logging`` module provides an easy way to log to the ELK stack ...@@ -89,13 +89,10 @@ The ``common.lofar_logging`` module provides an easy way to log to the ELK stack
Log from Docker Log from Docker
````````````````` `````````````````
Not all Docker containers run our Python programs, and can forward the logs themselves. For those, we use the ``syslog`` log driver in Docker. Extend the ``docker compose`` files with:: Not all Docker containers run our Python programs, and can forward the logs themselves. For those, we use the ``syslog`` log driver in Docker. Extend the ``docker compose`` files with:
logging: .. literalinclude:: ../../docker-compose/rest.yml
driver: syslog :start-at: logging:
options: :end-before: restart:
syslog-address: udp://${HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
Logs forwarded in this way are provided with the container name, their timestamp, and a log level guessed by Docker. It is thus wise to parse the message content further in Logstash (see above). Logs forwarded in this way are provided with the container name, their timestamp, and a log level guessed by Docker. It is thus wise to parse the message content further in Logstash (see above).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment