Skip to content

Commit

Permalink
Add crio metrics as an endpoint of nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
brancz committed Jan 31, 2019
1 parent f697a14 commit 37f4059
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
17 changes: 17 additions & 0 deletions assets/prometheus-k8s/service-monitor-kubelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ spec:
scheme: https
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- interval: 30s
port: https-metrics
relabelings:
- action: replace
regex: (.+)(?::\d+)
replacement: $1:9537
sourceLabels:
- __address__
targetLabel: __address__
- action: replace
replacement: crio
sourceLabels:
- endpoint
targetLabel: endpoint
- action: replace
replacement: crio
targetLabel: job
jobLabel: k8s-app
namespaceSelector:
matchNames:
Expand Down
24 changes: 24 additions & 0 deletions jsonnet/prometheus.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,30 @@ local namespacesRole =
caFile: '/var/run/secrets/kubernetes.io/serviceaccount/ca.crt',
},
},
{
interval: '30s',
port: 'https-metrics',
relabelings: [
{
sourceLabels: ['__address__'],
action: 'replace',
targetLabel: '__address__',
regex: '(.+)(?::\\d+)',
replacement: '$1:9537',
},
{
sourceLabels: ['endpoint'],
action: 'replace',
targetLabel: 'endpoint',
replacement: 'crio',
},
{
action: 'replace',
targetLabel: 'job',
replacement: 'crio',
},
],
},
],
jobLabel: 'k8s-app',
namespaceSelector: {
Expand Down

0 comments on commit 37f4059

Please sign in to comment.