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

L2SS-434: Add ELK stack description and example

parent 0e5bbd6f
No related branches found
No related tags found
1 merge request!150L2SS-434: Add sphinx documentation content
File suppressed by a .gitattributes entry, the file's encoding is unsupported, or the file size exceeds the limit.
File suppressed by a .gitattributes entry, the file's encoding is unsupported, or the file size exceeds the limit.
......@@ -16,6 +16,7 @@ Welcome to LOFAR2.0 Station Control's documentation!
devices/recv
control
monitoring
logs
Indices and tables
......
Logs
==================
The devices, and the docker containers in general, produce logging output. The easiest way to access the logs of a specific container is to ask docker directly. For example, to access and follow the most recent logs of the `device-sdp` container, execute on the host::
docker logs -n 100 -f device-sdp
This is mostly useful for interactive use.
ELK stack
------------------
To monitor the logs remotely, or to browse older logs, use the *ELK stack* that is included on the station, and served on http://localhost:5601. ELK, or ElasticSearch + Logstash + Kibana, is a popular log collection and querying system. Currently, the following logs are collected in our ELK installation:
- Logs of all devices,
- Logs of the Jupyter notebook server.
If you browse to the ELK stack (actually, it is Kibana providing the GUI), your go-to is the *Discover* view at http://localhost:5601/app/discover. There, you can construct (and save, load) a dashboard that provides a custom view of the logs. For example, `this dashboard http://localhost:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-60m,to:now))&_a=(columns:!(extra.tango_device,level,message),filters:!(),index:'1e8ca200-1be0-11ec-a85f-b97e4206c18b',interval:auto,query:(language:kuery,query:''),sort:!())` shows the logs of the last hour, with some useful columns added to the default timestamp and message columns. Expand the time range if no logs appear, to look further back. You should see something like:
.. image:: elk_last_hour.png
ELK allows you to filter, edit the columns, and a lot more. We enrich the log entries with several extra fields, for example the device that generated it, and stack traces if available. Click on the `>` before a log entry and the information expands, showing for example:
.. image:: elk_log_fields.png
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment