Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
2f294573
Unverified
Commit
2f294573
authored
Feb 22, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69099 from ehashman/issue-66790
Rename cadvisor metric labels to match instrumentation guidelines
parents
fba3c54b
3539e89a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
prober_manager.go
pkg/kubelet/prober/prober_manager.go
+7
-1
worker.go
pkg/kubelet/prober/worker.go
+2
-0
server.go
pkg/kubelet/server/server.go
+2
-0
No files found.
pkg/kubelet/prober/prober_manager.go
View file @
2f294573
...
@@ -39,7 +39,13 @@ var ProberResults = prometheus.NewGaugeVec(
...
@@ -39,7 +39,13 @@ var ProberResults = prometheus.NewGaugeVec(
Name
:
"probe_result"
,
Name
:
"probe_result"
,
Help
:
"The result of a liveness or readiness probe for a container."
,
Help
:
"The result of a liveness or readiness probe for a container."
,
},
},
[]
string
{
"probe_type"
,
"container_name"
,
"pod_name"
,
"namespace"
,
"pod_uid"
},
[]
string
{
"probe_type"
,
"container_name"
,
"container"
,
"pod_name"
,
"pod"
,
"namespace"
,
"pod_uid"
},
)
)
// Manager manages pod probing. It creates a probe "worker" for every container that specifies a
// Manager manages pod probing. It creates a probe "worker" for every container that specifies a
...
...
pkg/kubelet/prober/worker.go
View file @
2f294573
...
@@ -101,7 +101,9 @@ func newWorker(
...
@@ -101,7 +101,9 @@ func newWorker(
w
.
proberResultsMetricLabels
=
prometheus
.
Labels
{
w
.
proberResultsMetricLabels
=
prometheus
.
Labels
{
"probe_type"
:
w
.
probeType
.
String
(),
"probe_type"
:
w
.
probeType
.
String
(),
"container_name"
:
w
.
container
.
Name
,
"container_name"
:
w
.
container
.
Name
,
"container"
:
w
.
container
.
Name
,
"pod_name"
:
w
.
pod
.
Name
,
"pod_name"
:
w
.
pod
.
Name
,
"pod"
:
w
.
pod
.
Name
,
"namespace"
:
w
.
pod
.
Namespace
,
"namespace"
:
w
.
pod
.
Namespace
,
"pod_uid"
:
string
(
w
.
pod
.
UID
),
"pod_uid"
:
string
(
w
.
pod
.
UID
),
}
}
...
...
pkg/kubelet/server/server.go
View file @
2f294573
...
@@ -865,8 +865,10 @@ func containerPrometheusLabelsFunc(s stats.StatsProvider) metrics.ContainerLabel
...
@@ -865,8 +865,10 @@ func containerPrometheusLabelsFunc(s stats.StatsProvider) metrics.ContainerLabel
metrics
.
LabelName
:
name
,
metrics
.
LabelName
:
name
,
metrics
.
LabelImage
:
image
,
metrics
.
LabelImage
:
image
,
"pod_name"
:
podName
,
"pod_name"
:
podName
,
"pod"
:
podName
,
"namespace"
:
namespace
,
"namespace"
:
namespace
,
"container_name"
:
containerName
,
"container_name"
:
containerName
,
"container"
:
containerName
,
}
}
return
set
return
set
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment