argoproj-labs / argocd-extension-metrics

An Argo CD extension to enable visualization of metrics in Argo CD UI.
Apache License 2.0
111 stars 25 forks source link

Can't make it work with helm installation #76

Open phgeraldeli opened 4 months ago

phgeraldeli commented 4 months ago

Can we have a docs or an example using the helm chart github.com/argoproj/argo-helm?

phgeraldeli commented 4 months ago

I`ve edited manually, and still got the problem below

Changed source in configmap manifests to use my prometheus at: image

When trying to access got No metrics to display and accessing the url:

"Invalid headers: header "Argocd-Application-Name" must be provided"

Followed all instruction on readme. Someone can help me?

phgeraldeli commented 4 months ago

It would be great something like this:

https://github.com/argoproj-labs/rollout-extension/pull/72/files

yalattas commented 3 months ago

this is great. Yet, I think it misses to deploy argocd-metrics-server at the first place, I've been trying to find it in the helm values but I found the extension without the actual deployment https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/values.yaml

As a workaround, I guess I can use extraObjects to deploy the metrics-server.

Currently stuck at the final step

Finally Argo CD needs to be configured so it knows how to reach the metrics server. In order to do so, add the following section in the argocd-cd.

extension.config: |-
  extensions:
    - name: metrics
      backend:
        services:
          - url: <METRICS_SERVER_URL>

README stating I should put above snippet in argocd-cd which I don't have in my cluster. Even though, I thought its typo and should be argocd-cm but it doesn't make sense with the mentioned syntax. argocd-cm takes a different input

  cm:
    create: true
    admin.enabled: true
    server.rbac.log.enforce.enable: true
  params:
    create: true
    server.insecure: true
    server.enable.proxy.extension: "true"
antodoms commented 3 months ago

still trying to figure out why i am getting empty dashboard in the argocd metrics extension tab. the issue seems to be similar to this.

Screenshot 2024-04-18 at 4 25 36 pm

i am using the below for metrics-server-configmap

{
...
...
"provider":
      {
        "Name": "default",
        "default": true,
        "address": "http://prometheus-server.prometheus.svc.cluster.local"
      }

and then for argocd helm chart values.txt i got the below values

configs:
    cm:
        create: true
        server.rbac.log.enforce.enable: true
        extension.config: |-
           extensions:
             - name: metrics
               backend:
                  services:
                     - url: http://argocd-metrics-server:9003
    params:
        create: true
        server.insecure: true
        server.enable.proxy.extension: "true"
yalattas commented 3 months ago

still trying to figure out why i am getting empty dashboard in the argocd metrics extension tab. the issue seems to be similar to this. Screenshot 2024-04-18 at 4 25 36 pm

i am using the below for metrics-server-configmap

{
...
...
"provider":
      {
        "Name": "default",
        "default": true,
        "address": "http://prometheus-server.prometheus.svc.cluster.local"
      }

and then for argocd helm chart values.txt i got the below values

configs:
    cm:
        create: true
        server.rbac.log.enforce.enable: true
        extension.config: |-
           extensions:
             - name: metrics
               backend:
                  services:
                     - url: http://argocd-metrics-server:9003
    params:
        create: true
        server.insecure: true
        server.enable.proxy.extension: "true"

how did deploy argocd-metrics-server ? via helm with the official ArgoCD values ?

In my case I don't see any metrics

Screenshot from 2024-04-27 13-10-05

Should I use extraObjects to deploy the metrics server ?

mcanevet commented 2 months ago

Have you tried to escape the curly braces in the ConfigMap. i.e, using:

"queryExpression": "sum(rate(container_cpu_usage_seconds_total{pod=~\"{{`{{.name}}`}}\", image!=\"\", container!=\"POD\", container!=\"\", container_name!=\"POD\"}[5m])) by (pod)"

instead of:

"queryExpression": "sum(rate(container_cpu_usage_seconds_total{pod=~\"{{.name}}\", image!=\"\", container!=\"POD\", container!=\"\", container_name!=\"POD\"}[5m])) by (pod)"