Skip to content

Commit

Permalink
ml-jira-2756:Documented monitoring Argo CD instances
Browse files Browse the repository at this point in the history
  • Loading branch information
masauso-lungu committed Aug 24, 2023
1 parent cefd8fe commit 561ef91
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,8 @@ Topics:
File: uninstalling-openshift-gitops
- Name: Setting up a new Argo CD instance
File: setting-up-argocd-instance
- Name: Monitoring Argo CD instances
File: monitoring-argo-cd-instances
- Name: Using Argo Rollouts for progressive deployment delivery
File: using-argo-rollouts-for-progressive-deployment-delivery
- Name: Configuring an OpenShift cluster by deploying an application with cluster configurations
Expand Down
17 changes: 17 additions & 0 deletions cicd/gitops/monitoring-argo-cd-instances.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:_content-type: ASSEMBLY
[id="monitoring-argo-cd-instances"]
= Monitoring Argo CD instances
include::_attributes/common-attributes.adoc[]
:context: monitoring-argo-cd-instances

toc::[]

By default, the {gitops-title} Operator automatically detects an installed Argo CD instance in your defined namespace, for example, `openshift-gitops`, and connects it to the monitoring stack of the cluster to provide alerts for out-of-sync applications.

.Prerequisites
* You have access to the cluster with `cluster-admin` privileges.
* You have access to the {product-title} web console.
* You have installed the {gitops-title} Operator in your cluster.
* You have installed an Argo CD application in your defined namespace, for example, `openshift-gitops`.
include::modules/gitops-monitoring-argo-cd-health-using-prometheus-metrics.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Module included in the following assemblies:
//
// * cicd/gitops/monitoring-argo-cd-instances.adoc

:_content-type: PROCEDURE
[id="gitops-monitoring-argo-cd-health-using-promethous-metrics_{context}"]
= Monitoring Argo CD health using Prometheus metrics

You can monitor the health status of an Argo CD application by running Prometheus metrics queries against it.

.Procedure

. In the *Developer* perspective of the web console, select the namespace where your Argo CD application is installed, and navigate to *Observe* -> *Metrics*.
. From the *Select query* drop-down list, select *Custom query*.
. To check the health status of your Argo CD application, enter the Prometheus Query Language (PromQL) query similar to the following example in the *Expression* field:
+
.Example
[source, query]
----
sum(argocd_app_info{dest_namespace=~"<your_defined_namespace>",health_status!=""}) by (health_status) <1>
----
<1> Replace the `<your_defined_namespace>` variable with the actual name of your defined namespace, for example `openshift-gitops`.


0 comments on commit 561ef91

Please sign in to comment.