Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana Kindling WorkLoad Detail 无法查看只有出流量的pod #517

Open
llhhbc opened this issue May 13, 2023 · 10 comments
Open

Grafana Kindling WorkLoad Detail 无法查看只有出流量的pod #517

llhhbc opened this issue May 13, 2023 · 10 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@llhhbc
Copy link
Contributor

llhhbc commented May 13, 2023

Is your feature request related to a problem? Please describe.

测试发下,如果这个pod只有出去的流量,没有入流量,无法在Kindling WorkLoad Detail界面中筛选出该pod

Describe the solution you'd like

func getKindlingPrefix(isServer bool) string {
	var kindMark string
	if isServer {
		kindMark = EntityPrefix
	} else {
		kindMark = TopologyPrefix
	}
	return NPMPrefixKindling + "_" + kindMark + "_"
}

这里有明确的限制,只有isServer的流量,会生成 kindling_entity_request_total指标,而只有出口流量,则只会生成kindling_topology_request_total指标,导致界面上无法筛选。筛选规则为:label_values(kindling_entity_request_total{namespace ="$namespace"} , workload_name)

Describe alternatives you've considered

我尝试改成{__name__=~"kindling_topology_request_total|kindling_entity_request_total"},但标签不统一。可能需要单独出一个针对这种只有出口流量的页面。

Additional context

@llhhbc llhhbc added the enhancement New feature or request label May 13, 2023
@dxsup
Copy link
Member

dxsup commented May 15, 2023

这里有明确的限制,只有isServer的流量,会生成 kindling_entity_request_total指标,而只有出口流量,则只会生成kindling_topology_request_total指标

你说的是对的,因为在设计时,这两个指标的含义是确定的:

  • kindling_entity_request_total: 用来统计服务端对外提供服务的服务质量。
  • kindling_topology_request_total: 用来统计网络调用情况,用客户端数据更准确。

Kindling WorkLoad Detail 这个dashboard设计的目的是展示workload层级对外提供服务的质量,所以这个dashboard的筛选是基于kindling_entity_request_total这个指标的。

请问需要查看”只有出口流量“的数据的使用场景是什么?这个使用场景“Kindling Topology”能否满足?

@llhhbc
Copy link
Contributor Author

llhhbc commented May 15, 2023

场景“Kindling Topology”无法满足。
比如operator组件,它会访问apiserver,只有出口流量,而我想监听它的流量情况就无法做到了。
比如还有其它组件,它是定期扫描数据库,并做些数据更新处理动作,它也只有出口流量,我想深入分析它的性能问题。

@dxsup
Copy link
Member

dxsup commented May 15, 2023

Kindling Topology也能看到这些调用的调用次数和平均耗时,是为什么无法满足需求?

@llhhbc
Copy link
Contributor Author

llhhbc commented May 15, 2023

我想分析请求的url与执行的sql,比如哪些sql在频繁的执行

@dxsup
Copy link
Member

dxsup commented May 15, 2023

了解,那这个需求确实只能新建一个dashboard来实现。不过目前其他工作较多,这个需求的优先级只能排在后面了😵

@dxsup dxsup added help wanted Extra attention is needed good first issue Good for newcomers labels May 15, 2023
@llhhbc
Copy link
Contributor Author

llhhbc commented May 15, 2023

我这边尝试添加了个,发现有点问题

@dxsup
Copy link
Member

dxsup commented May 15, 2023

直接在当前dashboard添加可能会有问题,建议新建一个dashboard,然后只使用kindling_topology_request_total指标中的src_workload作为筛选条件

@llhhbc
Copy link
Contributor Author

llhhbc commented May 15, 2023

是的,我新建了一个dashboard,里面的相关指标都替换了

@dxsup
Copy link
Member

dxsup commented May 15, 2023

如果解决了问题,欢迎提个PR

@llhhbc
Copy link
Contributor Author

llhhbc commented May 15, 2023

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants