From 1252dd66c7fe5490cd7d2004294524e32b35aaa9 Mon Sep 17 00:00:00 2001 From: ekristov Date: Thu, 8 Jun 2023 12:37:26 +0200 Subject: [PATCH] RHDEVDOCS-3819: [UG] How to store and retrieve logs --- _topic_maps/_topic_map.yml | 2 + cicd/gitops/viewing-argo-cd-logs.adoc | 16 +++++++ ...s-storing-and-retrieving-argo-cd-logs.adoc | 44 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 cicd/gitops/viewing-argo-cd-logs.adoc create mode 100644 modules/gitops-storing-and-retrieving-argo-cd-logs.adoc diff --git a/_topic_maps/_topic_map.yml b/_topic_maps/_topic_map.yml index 3993f9b58dea..721c98a6955a 100644 --- a/_topic_maps/_topic_map.yml +++ b/_topic_maps/_topic_map.yml @@ -1942,6 +1942,8 @@ Topics: File: configuring-resource-quota - Name: Monitoring Argo CD custom resource workloads File: monitoring-argo-cd-custom-resource-workloads + - Name: Viewing Argo CD logs + File: viewing-argo-cd-logs - Name: Running Control Plane Workloads on Infra nodes File: run-gitops-control-plane-workload-on-infra-nodes - Name: Sizing requirements for GitOps Operator diff --git a/cicd/gitops/viewing-argo-cd-logs.adoc b/cicd/gitops/viewing-argo-cd-logs.adoc new file mode 100644 index 000000000000..9d6ee627e6e4 --- /dev/null +++ b/cicd/gitops/viewing-argo-cd-logs.adoc @@ -0,0 +1,16 @@ +:_content-type: ASSEMBLY +[id="viewing-argo-cd-logs"] += Viewing Argo CD logs +include::_attributes/common-attributes.adoc[] +:context: viewing-argo-cd-logs + +toc::[] + +You can view the Argo CD logs with the {logging-title}. The {logging} visualizes the logs on a Kibana dashboard. The OpenShift Logging Operator enables logging with Argo CD by default. + +include::modules/gitops-storing-and-retrieving-argo-cd-logs.adoc[leveloffset=+1] + +[role="_additional-resources"] +[id="additional-resources_viewing-argo-cd-logs"] +== Additional resources +* xref:../../logging/cluster-logging-deploying.adoc#cluster-logging-deploy-console_cluster-logging-deploying[Installing the {logging-title} using the web console] diff --git a/modules/gitops-storing-and-retrieving-argo-cd-logs.adoc b/modules/gitops-storing-and-retrieving-argo-cd-logs.adoc new file mode 100644 index 000000000000..1b1860162914 --- /dev/null +++ b/modules/gitops-storing-and-retrieving-argo-cd-logs.adoc @@ -0,0 +1,44 @@ +// Module included in the following assemblies: +// +// * cicd/gitops/viewing-argo-cd-logs.adoc + +:_content-type: PROCEDURE +[id="gitops-storing-and-retrieving-argo-cd-logs_{context}"] += Storing and retrieving Argo CD logs + +You can use the Kibana dashboard to store and retrieve Argo CD logs. + +.Prerequisites + +* The {gitops-title} Operator is installed in your cluster. +* The {logging-title} is installed with default configuration in your cluster. + +.Procedure + +. In the {product-title} web console, go to the {rh-app-icon} menu -> *Observability* -> *Logging* to view the Kibana dashboard. + +. Create an index pattern. + +.. To display all the indices, define the index pattern as `pass:[*]`, and click *Next step*. + +.. Select *@timestamp* for *Time Filter field name*. + +.. Click *Create index pattern*. + +. In the navigation panel of the Kibana dashboard, click the *Discover* tab. + +. Create a filter to retrieve logs for Argo CD. The following steps create a filter that retrieves logs for all the pods in the `openshift-gitops` namespace: + +.. Click *Add a filter +*. + +.. Select the *kubernetes.namespace_name* field. + +.. Select the *is* operator. + +.. Select the *openshift-gitops* value. + +.. Click *Save*. + +. Optional: Add additional filters to narrow the search. For example, to retrieve logs for a particular pod, you can create another filter with `kubernetes.pod_name` as the field. + +. View the filtered Argo CD logs in the Kibana dashboard.