-
Notifications
You must be signed in to change notification settings - Fork 2
Logging (Kibana)
TLDR: Link to Kibana for Logging
Logs can be queried via Kibana. Kibana is an open-source data visualization and exploration tool developed by Elastic. It is designed to work in conjunction with Elasticsearch, a distributed search and analytics engine, to provide a user-friendly interface for analyzing and visualizing data stored in Elasticsearch.
- Create an index (e.g. app-*), then click "Next step"
- Select a Time filter field name (@timestamp) and click "Create index pattern"
- Click "Discover" (see blue arrow in below screenshot) to begin your search. By default, any output from a console log will be captured here, in any of your applications associated with your idir. You can narrow down the results using the search field (green arrow in below screenshot). For example, you can filter logs by pod name or even by text (e.g. typing "backend" will return all the logs that contain the text "backend").
Note: Ensure that the time period is set correctly, by default only the last 15 minutes of logs are displayed (see orange arrow in below screenshot).
Logs can be viewed for specific pods in specific OpenShift namespaces. To do so:
- Select the pod of your choice (https://console.apps.silver.devops.gov.bc.ca/k8s/ns/c1c7ed-test/core~v1~Pod)
- Click the "Logs" tab, and then click "Show in Kibana"
There doesn't appear to be a way to save filters; however, we can save a bookmark that contains the filter logic. For example, this link contains filters that users can enable/disable for the dev and test environments. There are also some excluding filters to remove some of the noise.