蛮子哥 蛮子哥
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)

蛮子哥

业精于勤,荒于嬉
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)
  • ansible系列文章

  • Kubernetes笔记

  • elk

  • jenkins

  • GitLabCI_CD

  • AI编程

  • 提示词

  • ArgoCD

    • argocd部署
    • argocd+gitlab应用自动发布
    • ArgoCD仓库管理
    • ArgoCD集群管理
    • ArgoCD项目管理
    • ArgoCD监控
      • 查看metrics信息
      • 创建ServiceMonitor资源
      • 验证targets
      • 导入dashboard
      • 查看数据
  • 专题
  • ArgoCD
蛮子哥
2024-05-18
目录

ArgoCD监控

参考文档:https://argo-cd.readthedocs.io/en/stable/operator-manual/metrics/

# 配置targets

# 查看metrics信息

[root@tiaoban ~]# kubectl get svc -n argocd 
NAME                                      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
argocd-applicationset-controller          ClusterIP   10.97.81.94      <none>        7000/TCP,8080/TCP            27d
argocd-dex-server                         ClusterIP   10.106.72.83     <none>        5556/TCP,5557/TCP,5558/TCP   27d
argocd-metrics                            ClusterIP   10.103.26.87     <none>        8082/TCP                     27d
argocd-notifications-controller-metrics   ClusterIP   10.105.181.100   <none>        9001/TCP                     27d
argocd-redis                              ClusterIP   10.100.131.134   <none>        6379/TCP                     27d
argocd-repo-server                        ClusterIP   10.100.123.80    <none>        8081/TCP,8084/TCP            27d
argocd-server                             NodePort    10.106.11.146    <none>        80:30701/TCP,443:30483/TCP   27d
argocd-server-metrics                     ClusterIP   10.105.164.150   <none>        8083/TCP                     27d
[root@tiaoban ~]# kubectl exec -it rockylinux -- bash
[root@rockylinux /]# curl argocd-metrics.argocd.svc:8082/metrics
# HELP argocd_app_info Information about application.
# TYPE argocd_app_info gauge
argocd_app_info{autosync_enabled="true",dest_namespace="default",dest_server="https://kubernetes.default.svc",health_status="Healthy",name="blue-green",namespace="argocd",operation="",project="default",repo="http://gitlab.local.com/devops/argo-demo",sync_status="Synced"} 1
# HELP argocd_app_reconcile Application reconciliation performance.
# TYPE argocd_app_reconcile histogram
argocd_app_reconcile_bucket{dest_server="https://kubernetes.default.svc",namespace="argocd",le="0.25"} 12
argocd_app_reconcile_bucket{dest_server="https://kubernetes.default.svc",namespace="argocd",le="0.5"} 18
argocd_app_reconcile_bucket{dest_server="https://kubernetes.default.svc",namespace="argocd",le="1"} 21
argocd_app_reconcile_bucket{dest_server="https://kubernetes.default.svc",namespace="argocd",le="2"} 21
argocd_app_reconcile_bucket{dest_server="https://kubernetes.default.svc",namespace="argocd",le="4"} 22
argocd_app_reconcile_bucket{dest_server="https://kubernetes.default.svc",namespace="argocd",le="8"} 24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# 创建ServiceMonitor资源

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: argocd-exporter # ServiceMonitor名称
  namespace: monitoring # ServiceMonitor所在名称空间
spec:
  jobLabel: argocd-exporter # job名称
  endpoints: # prometheus所采集Metrics地址配置,endpoints为一个数组,可以创建多个,但是每个endpoints包含三个字段interval、path、port
  - port: metrics # prometheus采集数据的端口,这里为port的name,主要是通过spec.selector中选择对应的svc,在选中的svc中匹配该端口
    interval: 30s # prometheus采集数据的周期,单位为秒
    scheme: http # 协议
    path: /metrics # prometheus采集数据的路径
  selector: # svc标签选择器
    matchLabels:
      app.kubernetes.io/name: argocd-metrics
  namespaceSelector: # namespace选择
    matchNames:
    - argocd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# 验证targets

image-20260518140124905

# grafana查看数据

# 导入dashboard

参考文档:https://grafana.com/grafana/dashboards/14584-argocd/

# 查看数据

image-20260518140141887

原文链接 (opens new window)

微信 支付宝
上次更新: 2026/05/18, 14:03:08

← ArgoCD项目管理

最近更新
01
kubernetes证书续签到100年
05-04
02
istio入门
04-29
03
ES故障排查命令
04-29
更多文章>
Theme by Vdoing | Copyright © 2019-2026 | 点击查看十年之约 | 鄂ICP备2024072800号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式