-
Feature Request
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
None
-
None
-
Product / Portfolio Work
-
None
-
False
-
-
None
-
None
-
None
-
-
None
-
None
-
None
-
None
-
None
1. Proposed title of this feature request
Applications with a "Failed" condition fail to appear in argocd_app_condition metric in the argocd controller pod
2. What is the nature and description of the request?
Need to make the argocd track the metric "argocd_app_condition" for the applications with a "Failed" condition.
Below is an example of the customer's configurations. Not able to monitor metrics using Argo CD on any application that are in a failed condition:
Controller's Configurations:
spec:
controller:
extraCommandArgs:
- --metrics-application-conditions
- SyncFailed,SyncError,Failed,OrphanedResourceWarning
prometheus:
enabled: true
Applcaition state:
status:
conditions:
- type: Failed
status: 'True'
Not able to grep for the argocd_app_condition in the argocd controller pod, as argocd_app_condition is not triggered with the "Failed" condition type above (no output to the command below):
sh-4.4$ curl -s 127.0.0.1:8082/metrics | grep -i condition
We have tested in our lab conditions diffrent than than failed and it worked with these conditions (InvalidSpecError,SyncError) :
a- We have tested with the InvalidSpecError and it worked with a test application:
status:
conditions:
- lastTransitionTime: "2025-07-08T01:24:02Z"
message: Application referencing project default which does not exist
type: InvalidSpecError
sh-4.4$ curl -s 127.0.0.1:8082/metrics | grep -i condi
- HELP argocd_app_condition Report application conditions.
- TYPE argocd_app_condition gauge
argocd_app_condition{condition="InvalidSpecError",name="test",namespace="openshift-gitops",project="default"} 1
b- We tried the following config in the lab with the "SyncError" condition and it worked with a test application:
prometheus:
enabled: true
controller:
extraCommandArgs:
- --metrics-application-conditions
- SyncFailed,SyncError,OrphanedResourceWarning[root@openshift-jumpserver-0 ~]# oc rsh -n openshift-gitops openshift-gitops-application-controller-0
sh-4.4$ curl -s 127.0.0.1:8082/metrics | grep -i condi
- HELP argocd_app_condition Report application conditions.
- TYPE argocd_app_condition gauge
argocd_app_condition{condition="SyncError",name="spring-petclinic",namespace="openshift-gitops",project="default"} 1
3. Why does the customer need this? (List the business requirements here)
The customer needs this improve automated testing with Argo CD hooks with a job to verify the deployment after all objects are synced. But they are not able to do it for the applications with a "Failed" type condition.
4. List any affected packages or components.
Not able to monitor failed production applications using the argocd_app_condition with a "Failed" type condition