48
48
- --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,foos,horizontalpodautoscalers,ingresses,jobs,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments,verticalpodautoscalers
49
49
` ` `
50
50
51
+ NOTE: The ` group`, `version`, and `kind` common labels are reserved, and will be overwritten by the values from the `groupVersionKind` field.
52
+
51
53
# ## Examples
52
54
53
55
The examples in this section will use the following custom resource :
@@ -114,7 +116,7 @@ spec:
114
116
Produces the metric :
115
117
116
118
` ` ` prometheus
117
- kube_myteam_io_v1_Foo_uptime 43.21
119
+ uptime{group="myteam.io", kind="Foo", version="v1"} 43.21
118
120
` ` `
119
121
120
122
# ### Multiple Metrics/Kitchen Sink
@@ -165,8 +167,8 @@ spec:
165
167
Produces the following metrics :
166
168
167
169
` ` ` prometheus
168
- kube_myteam_io_v1_Foo_active_count{ active="1",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-a"} 1
169
- kube_myteam_io_v1_Foo_active_count{ active="3",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-b"} 3
170
+ active_count{group="myteam.io", kind="Foo", version="v1", active="1",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-a"} 1
171
+ active_count{group="myteam.io", kind="Foo", version="v1", active="3",custom_metric="yes",foo="bar",name="foo",bar="baz",qux="quxx",type="type-b"} 3
170
172
` ` `
171
173
172
174
# ## Metric types
@@ -201,7 +203,7 @@ spec:
201
203
Produces the metric :
202
204
203
205
` ` ` prometheus
204
- kube_myteam_io_v1_Foo_uptime 43.21
206
+ uptime{group="myteam.io", kind="Foo", version="v1"} 43.21
205
207
` ` `
206
208
207
209
# ### StateSet
@@ -227,15 +229,15 @@ spec:
227
229
list: [Pending, Bar, Baz]
228
230
` ` `
229
231
230
- Metrics of type ` SateSet ` will generate a metric for each value defined in `list` for each resource.
232
+ Metrics of type `StateSet ` will generate a metric for each value defined in `list` for each resource.
231
233
The value will be 1, if the value matches the one in list.
232
234
233
235
Produces the metric :
234
236
235
237
` ` ` prometheus
236
- kube_myteam_io_v1_Foo_status_phase{ phase="Pending"} 1
237
- kube_myteam_io_v1_Foo_status_phase{ phase="Bar"} 0
238
- kube_myteam_io_v1_Foo_status_phase{ phase="Baz"} 0
238
+ status_phase{group="myteam.io", kind="Foo", version="v1", phase="Pending"} 1
239
+ status_phase{group="myteam.io", kind="Foo", version="v1", phase="Bar"} 0
240
+ status_phase{group="myteam.io", kind="Foo", version="v1", phase="Baz"} 0
239
241
` ` `
240
242
241
243
# ### Info
@@ -265,7 +267,7 @@ spec:
265
267
Produces the metric :
266
268
267
269
` ` ` prometheus
268
- kube_myteam_io_v1_Foo_version{ version="v1.2.3"} 1
270
+ version{group="myteam.io", kind="Foo", version="v1", version="v1.2.3"} 1
269
271
` ` `
270
272
271
273
# ## Naming
@@ -287,7 +289,7 @@ spec:
287
289
288
290
Produces :
289
291
` ` ` prometheus
290
- myteam_foos_uptime 43.21
292
+ myteam_foos_uptime{group="myteam.io", kind="Foo", version="v1"} 43.21
291
293
` ` `
292
294
293
295
To omit namespace and/or subsystem altogether, set them to the empty string :
0 commit comments