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

Remove non-existing CPU metrics #498

Merged
merged 2 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions collector/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1448,34 +1448,6 @@ func NewNodes(logger log.Logger, client *http.Client, url *url.URL, all bool, no
return append(defaultNodeLabelValues(cluster, node), "total")
},
},
{
Type: prometheus.CounterValue,
Desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "process", "cpu_time_seconds_sum"),
"Process CPU time in seconds",
append(defaultNodeLabels, "type"), nil,
),
Value: func(node NodeStatsNodeResponse) float64 {
return float64(node.Process.CPU.Sys) / 1000
},
Labels: func(cluster string, node NodeStatsNodeResponse) []string {
return append(defaultNodeLabelValues(cluster, node), "sys")
},
},
{
Type: prometheus.CounterValue,
Desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "process", "cpu_time_seconds_sum"),
"Process CPU time in seconds",
append(defaultNodeLabels, "type"), nil,
),
Value: func(node NodeStatsNodeResponse) float64 {
return float64(node.Process.CPU.User) / 1000
},
Labels: func(cluster string, node NodeStatsNodeResponse) []string {
return append(defaultNodeLabelValues(cluster, node), "user")
},
},
{
Type: prometheus.CounterValue,
Desc: prometheus.NewDesc(
Expand Down
6 changes: 0 additions & 6 deletions collector/nodes_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,6 @@ type NodeStatsOSSwapResponse struct {

// NodeStatsOSCPUResponse defines node stats operating system CPU usage structure
type NodeStatsOSCPUResponse struct {
Sys int64 `json:"sys"`
User int64 `json:"user"`
Idle int64 `json:"idle"`
Steal int64 `json:"stolen"`
LoadAvg NodeStatsOSCPULoadResponse `json:"load_average"`
Percent int64 `json:"percent"`
}
Expand Down Expand Up @@ -330,8 +326,6 @@ type NodeStatsProcessMemResponse struct {
// NodeStatsProcessCPUResponse defines node stats process CPU usage structure
type NodeStatsProcessCPUResponse struct {
Percent int64 `json:"percent"`
Sys int64 `json:"sys_in_millis"`
User int64 `json:"user_in_millis"`
Total int64 `json:"total_in_millis"`
}

Expand Down