Skip to content

Commit

Permalink
Health: show metrics cardinality (#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak authored Jan 14, 2025
1 parent 24c216a commit 6322f85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/dashboards/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func CreateHealthDashboard(netobsNs, nsFlowsMetric string) (string, error) {
NewTarget(`sum(increase(netobserv_encode_prom_errors[1m])) by (error)`, "metrics {{error}}"),
NewTarget(`sum(increase(netobserv_loki_batch_retries_total[1m]))`, "loki retries"),
),
NewPanel("By namespace", metricslatest.ChartTypeLine, "", 6,
NewPanel("By namespace", metricslatest.ChartTypeLine, "", 4,
NewTarget(
fmt.Sprintf(`topk(10,sum(rate(%s{SrcK8S_Namespace!=""}[1m])) by (SrcK8S_Namespace))`, nsFlowsMetric),
"From {{SrcK8S_Namespace}}",
Expand All @@ -64,10 +64,11 @@ func CreateHealthDashboard(netobsNs, nsFlowsMetric string) (string, error) {
"To {{DstK8S_Namespace}}",
),
),
NewPanel("By node", metricslatest.ChartTypeLine, "", 6,
NewPanel("By node", metricslatest.ChartTypeLine, "", 4,
NewTarget(`topk(10,sum(rate(netobserv_node_flows_total{SrcK8S_HostName!=""}[1m])) by (SrcK8S_HostName))`, "From {{SrcK8S_HostName}}"),
NewTarget(`topk(10,sum(rate(netobserv_node_flows_total{DstK8S_HostName!=""}[1m])) by (DstK8S_HostName))`, "To {{DstK8S_HostName}}"),
),
NewPanel("Metrics cardinality", metricslatest.ChartTypeLine, "", 4, NewTarget(`count({__name__=~"netobserv_.*"}) by (job)`, "{{job}}")),
}),
)

Expand Down

0 comments on commit 6322f85

Please sign in to comment.