argoproj-labs / argocd-extension-metrics

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

Can not use url in local cluster #82

Open PhamQuang-512 opened 2 months ago

PhamQuang-512 commented 2 months ago

i have set metrics url to argocd-metrics-server.argocd.svc.cluster.local but it seem not work. argocd-server and argocd-metrics-server do not show any logs. here is my config: extension.config: |- extensions:

vikramalmosafer commented 2 months ago

@PhamQuang-512 try with port like this : "http://argocd-metrics-server.argocd.svc.cluster.local:9003" it should work...

PhamQuang-512 commented 2 months ago

@PhamQuang-512 try with port like this : "http://argocd-metrics-server.argocd.svc.cluster.local:9003" it should work...

yeah it works, but now there is no metrics no show image image

logs from metrics server:

[GIN] 2024/08/16 - 04:16:55 | 200 |      221.72µs |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/dashboards"
pod pod
[GIN] 2024/08/16 - 04:16:55 | 400 |   21.117186ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/pod/graphs/pod_cpu_line?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:55 | 400 |    2.263399ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/pod/graphs/pod_cpu_pie?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:55 | 400 |     2.22914ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/pod/graphs/pod_memory_line?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:55 | 400 |     1.92753ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/pod/graphs/pod_memory_pie?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:56 | 400 |     2.23645ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/container/graphs/container_cpu_line?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:56 | 400 |    2.068919ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/container/graphs/container_cpu_pie?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:56 | 400 |     2.14581ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/container/graphs/container_memory_line?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
pod pod
[GIN] 2024/08/16 - 04:16:56 | 400 |     2.09328ms |       127.0.0.1 | GET      "/api/applications/my-test-application-helm/groupkinds/pod/rows/container/graphs/container_memory_pie?name=my-test-application-helm-test-chart-65b6455984-8dtb7.*&namespace=default&application_name=my-test-application-helm&project=default&uid=309a31b3-4f93-46c8-b5ca-5af42cb024ad&duration=1h"
vikramalmosafer commented 2 months ago

@PhamQuang-512 can you share sample of your configmap.

PhamQuang-512 commented 2 months ago

@PhamQuang-512 can you share sample of your configmap.

sure, this is my configmap:

  cm:
    kustomize.buildOptions: "--enable-alpha-plugins"
    application.resourceTrackingMethod: annotation
    exec.enabled: true
    admin.enabled: true
    dex.config: |
      connectors:
      - config:
          issuer: $ISSUER
          clientID: $CLIENT_ID
          clientSecret: $CLIENT_SECRET
        type: oidc
        id: google
        name: Google
    url: http://localhost:8080
    extension.config: |-
      extensions:
        - name: metrics
          backend:
            services:
              - url: "http://argocd-metrics-server.argocd.svc.cluster.local:9003"
  params:
    server.insecure: true
    server.enable.proxy.extension: "true"
    controller.sharding.algorithm: "consistent-hashing"