修改Grafana Dashboard for Kubernet

2018-02-11  本文已影响0人  getsu

使用https://grafana.com/dashboards/315时,添加namespace,方法如下:

  1. 下载doashboard的json文件,在templating.list中添加以下内容:
      {
        "allValue": null,
        "current": {
          "tags": [],
          "text": "All",
          "value": "$__all"
        },
        "datasource": "prometheus",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": false,
        "name": "Namespace",
        "options": [],
        "query": "label_values(namespace)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
  1. 对于需要filter的栏目,在targets.expr添加namespace=~\"$Namespace\"

  2. 导入dashboard即可。

上一篇 下一篇

猜你喜欢

热点阅读