Skip to content

Commit ca56c8d

Browse files
committed
Add metrics for domains.
1 parent 3a50da4 commit ca56c8d

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
kind: CustomResourceStateMetrics
2+
spec:
3+
resources:
4+
- groupVersionKind:
5+
group: networking.datumapis.com
6+
kind: "Domain"
7+
version: "v1alpha"
8+
metricNamePrefix: datum_cloud_networking_domain
9+
labelsFromPath:
10+
name: [metadata, name]
11+
namespace: [metadata, namespace]
12+
metrics:
13+
- name: "info"
14+
help: "Domain information"
15+
each:
16+
type: Info
17+
info:
18+
labelsFromPath:
19+
uid: [metadata, uid]
20+
domain_name: [spec, domainName]
21+
- name: "created"
22+
help: "created timestamp"
23+
each:
24+
type: Gauge
25+
gauge:
26+
path: [metadata, creationTimestamp]
27+
- name: "deleted"
28+
help: "deletion timestamp"
29+
errorLogV: 10
30+
each:
31+
type: Gauge
32+
gauge:
33+
path: [metadata, deletionTimestamp]
34+
- name: "status_condition"
35+
help: "The current status conditions of the Domains"
36+
each:
37+
type: Gauge
38+
gauge:
39+
path: [status, conditions]
40+
labelsFromPath:
41+
condition: [type]
42+
reason: [reason]
43+
status: [status]
44+
valueFrom: [status]
45+
- name: "status_condition_last_transition_time"
46+
help: "last transition time for status conditions"
47+
each:
48+
type: Gauge
49+
gauge:
50+
path: [status, conditions]
51+
labelsFromPath:
52+
type: [type]
53+
reason: [reason]
54+
status: [status]
55+
valueFrom: [lastTransitionTime]
56+
- name: "status_next_verification_attempt"
57+
help: "The next time a verification attempt will be made"
58+
errorLogV: 10
59+
each:
60+
type: Gauge
61+
gauge:
62+
path: [status, verification]
63+
valueFrom: [nextVerificationAttempt]

config/resource-metrics/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ configMapGenerator:
1313
- locations.yaml
1414
- gateways.yaml
1515
- httpproxies.yaml
16+
- domains.yaml
1617
options:
1718
labels:
1819
telemetry.miloapis.com/resource-metrics-config: "true"

0 commit comments

Comments
 (0)