cuigh / swirl

A web UI for Docker, focused on swarm cluster.
MIT License
604 stars 78 forks source link

请问一下 怎麼通过 Prometheus 创建图表 有什么文档推荐一下 #13

Closed 502647092 closed 3 years ago

cuigh commented 6 years ago

其实跟 Grafana 之类的工具写法是一样的,具体可以参考 Prometheus 官方文档,另外这里也有几个示例:#7

502647092 commented 6 years ago

@cuigh 请教一下 网络流量监控的语法怎么写 研究了半天没搞懂

cuigh commented 6 years ago

网络流量监控服务状态页已经内置了吧,查询表达式是(依赖 cadvisor 数据):

502647092 commented 6 years ago

@cuigh emm 我想要的是node节点的网络统计

cuigh commented 6 years ago

这个推荐用 node-exporter,查询表达式示例:sum(irate(node_network_receive_bytes_total[5m])) by(host_name)

502647092 commented 6 years ago

@cuigh image 这个是怎么回事儿 百分比好多小数点 image 这个是配置

cuigh commented 6 years ago

把图表的单位设置为 None 吧,Gauge 类型的图表目前对单位的处理不够完善,下个版本将修复此问题。 @502647092

502647092 commented 6 years ago

@cuigh 还有就是希望可以叠加多条查询的结果 比如 入网出网同一个图标显示

cuigh commented 6 years ago

这个之前我也考虑过,不过在现在的版本上修改我需要先想好一个比较好的向下兼容方案

cuigh commented 6 years ago

@502647092 v0.8.1 已经支持单图表多指标,Gauge 图表的单位和小数点问题也已经修复

matri commented 5 years ago

hello,我添加图表的时候有一些问题,不确定哪里做错了,麻烦帮忙看一下:

Prometheus的情况是这样的:

prometheus

然后swirl的配置是这样的,也按要求重启了swirl service:

swirl

然后我在swirl后台增加图表的时候,一直报这样的错:

error

不知道还有哪里有问题,swirl也没有错误日志,谢谢!另外fork版的 Prometheus 是否有使用指引?

cuigh commented 5 years ago
  1. 没有录入 Metrics 吧 Metrics

  2. Prometheus 的说明在 Docker hub 上有:Prometheus

matri commented 5 years ago

感谢回复,我不确定您说的录入 Metrics 是什么概念,因为在 Prometheus 上面我是可以搜索各种 Metrics的,swirl 我尝试增加的图表也是复制您在另外一个 issue 里面给的样例,不知道是不是我漏了什么东西?

cuigh commented 5 years ago

看我上面的截图,图表这一块后来有调整,之前 issue 中的示例有些过时了(不过我刚修改了)

matri commented 5 years ago

看我上面的截图,图表这一块后来有调整,之前 issue 中的示例有些过时了(不过我刚修改了)

看明白了,应该是调整了以后之前的那个示例不能用了,因为我一直用导入功能测试,还以为是我配置有问题,现在ok了,非常感谢!