1 Kubernetes for Prometheus Dashboard CN v20201010

Dashboard

【中文版本】2020.10.10更新,kubernetes资源全面展示!包含K8S整体资源总览、微服务资源明细、Pod资源明细及K8S网络带宽,优化重要指标展示。https://github.com/starsliao/Prometheus
Last updated: 14 days ago

Downloads: 512

Reviews: 0

  • k0.png
    k0.png
  • k1.png
    k1.png
  • k2.png
    k2.png
  • k3.png
    k3.png

如果使用的是grafana 6.x,请下载后编辑该json文件,把table-old替换成table,再导入到grafana即可。

整体资源总览

微服务资源明细

Pod资源明细

K8S网络带宽

注意:Prometheus需要能采集到cadvisorkube-state-metrics的指标。

  • cAdvisor作为kubelet内置的一部分程序可以直接使用。
  • kube-state-metrics部署可参考:https://github.com/starsliao/Prometheus/tree/master/kubernetes

Prometheus job配置参考(kube-state-metrics部署在ops-monit命名空间):

  - job_name: 'k8s-cadvisor'
    metrics_path: /metrics/cadvisor
    kubernetes_sd_configs:
    - role: node
    relabel_configs:
    - source_labels: [__address__]
      regex: '(.*):10250'
      replacement: '${1}:10255'
      target_label: __address__
      action: replace
    - action: labelmap
      regex: __meta_kubernetes_node_label_(.+)

    metric_relabel_configs:
    - source_labels: [instance]
      separator: ;
      regex: (.+)
      target_label: node
      replacement: $1
      action: replace

    - source_labels: [pod_name]
      separator: ;
      regex: (.+)
      target_label: pod
      replacement: $1
      action: replace
    - source_labels: [container_name]
      separator: ;
      regex: (.+)
      target_label: container
      replacement: $1
      action: replace

  - job_name: kube-state-metrics
    kubernetes_sd_configs:
    - role: endpoints
      namespaces:
        names:
        - ops-monit
    relabel_configs:
    - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name]
      regex: kube-state-metrics
      replacement: $1
      action: keep
    - action: labelmap
      regex: __meta_kubernetes_service_label_(.+)
    - source_labels: [__meta_kubernetes_namespace]
      action: replace
      target_label: k8s_namespace
    - source_labels: [__meta_kubernetes_service_name]
      action: replace
      target_label: k8s_sname

关注公众号【全栈运维开发】加入运维群交流,获取更多...

博客:StarsL.cn

问题请到github上提交issue。

GitHub:https://github.com/starsliao/Prometheus


Dependencies: