Logs
Overview#
The logs of every container in your namespaces are collected automatically and stored in Loki. You don't need to label anything or change your application: write your logs to standard output and standard error.
Logs are kept for 30 days.
How to read logs#
- Open your project in Perses.
- Go to Explore and choose the
lokidata source. -
Write a query, for example all logs of one namespace:
{k8s_namespace_name="my-app"}
How to add logs to a dashboard#
Add a panel to a dashboard, choose a logs visualisation and the loki data source, write your query and save the dashboard.