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

L2SS-358: Add lofar_id to messages to have a field describing the instance across the lofar station

parent 17b3304a
No related branches found
No related tags found
1 merge request!157L2SS-358: Get ready for Darkrai
...@@ -94,6 +94,9 @@ class LogAnnotator(logging.Formatter): ...@@ -94,6 +94,9 @@ class LogAnnotator(logging.Formatter):
# annotate record with currently executing Tango device, if any # annotate record with currently executing Tango device, if any
record.tango_device = self.get_current_tango_device() record.tango_device = self.get_current_tango_device()
# construct an identifier we can add for other devices as well
record.lofar_id = f"tango - {record.tango_device}"
# annotate record with the current software version # annotate record with the current software version
record.software_version = get_version() record.software_version = get_version()
......
...@@ -19,7 +19,7 @@ To monitor the logs remotely, or to browse older logs, use the *ELK stack* that ...@@ -19,7 +19,7 @@ To monitor the logs remotely, or to browse older logs, use the *ELK stack* that
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, based on the *index pattern* ``logstash-*``. There is a lot to take in, and there are excellent Kibana tutorials on the web. 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, based on the *index pattern* ``logstash-*``. There is a lot to take in, and there are excellent Kibana tutorials on the web.
To get going, use 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:!())>`_, which 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: To get going, use 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.lofar_id,level,message),filters:!(),index:'1e8ca200-1be0-11ec-a85f-b97e4206c18b',interval:auto,query:(language:kuery,query:''),sort:!())>`_, which 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 .. image:: elk_last_hour.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment