github.com/argoproj-labs/argocd-operator@v0.10.0/docs/usage/monitoring.md (about)

     1  # Instance workload monitoring 
     2  
     3  Instance workload monitoring allows you to be better informed of the state of your Argo CD instance by enabling alerts for the instance. Alerts are triggered when the instance's component workload (application-controller, repo-server, server etc.) pods are unable to come up for whatever reason and there is a drift between the number of ready replicas and the number of desired replicas for a certain period of time.  
     4  
     5  **Note:** Pre-requisites for this feature:
     6  - Your cluster is configured with Prometheus, and the Argo CD instance is in a namespace that can be monitored via Prometheus
     7  - Your cluster has the `kube-state-metrics` service running 
     8  
     9  **Note:** This feature is only concerned with availability of Argo CD workloads, and does not focus on monitoring for performance. 
    10  
    11  
    12  Instance workload monitoring can be enabled by setting `.spec.monitoring.enabled` to `true` on a given Argo CD instance.
    13  For example:
    14  
    15  ```
    16  apiVersion: argoproj.io/v1alpha1
    17  kind: ArgoCD
    18  metadata:
    19    name: example-argocd
    20    labels:
    21      example: example-argocd
    22  spec:
    23    ...
    24    monitoring:
    25      enabled: true
    26    ...
    27  ```
    28  
    29  Instance workload monitoring is set to `false` by default.
    30  
    31  Enabling this setting allows the operator to create a `PrometheusRule` containing pre-configured alert rules for all the workloads 9statefulsets/deployments) managed by the instance. Here is a sample alert rule included in the PrometheusRule created by the operator:
    32  
    33  ```
    34  apiVersion: monitoring.coreos.com/v1
    35  kind: PrometheusRule
    36  metadata:
    37    name: argocd-component-status-alert
    38    namespace: $NAMESPACE
    39  spec:
    40    groups:
    41      - name: ArgoCDComponentStatus
    42        rules:
    43          ...
    44          - alert: ApplicationSetControllerNotReady
    45            annotations:
    46              message: >-
    47                applicationSet controller deployment for Argo CD instance in
    48                namespace "default" is not running
    49            expr: >-
    50              kube_deployment_status_replicas{deployment="argocd-applicationset-controller",
    51              namespace="default"} !=
    52              kube_deployment_status_replicas_ready{deployment="argocd-applicationset-controller",
    53              namespace="default"} 
    54            for: 10m
    55            labels:
    56              severity: warning
    57          ...
    58  ```
    59  
    60  Users are free to modify/delete alert rules as wish, changes made to the rules will not be overwritten by the operator. 
    61  
    62  Instance workload monitoring can be disabled by setting `.spec.monitoring.enabled` to `false` on a given Argo CD instance.
    63  For example:
    64  
    65  ```
    66  apiVersion: argoproj.io/v1alpha1
    67  kind: ArgoCD
    68  metadata:
    69    name: example-argocd
    70    labels:
    71      example: example-argocd
    72  spec:
    73    ...
    74    monitoring:
    75      enabled: false
    76    ...
    77  ```
    78  
    79  Disabling workload monitoring will delete the created PrometheusRule.