Skip to content

Commit

Permalink
Merge pull request #623 from brancz/add-kubelet-probes-metrics
Browse files Browse the repository at this point in the history
Add scraping of endpoint for kubelet probe metrics
  • Loading branch information
brancz committed Jul 29, 2020
2 parents df3bfc6 + 7c35752 commit f0955e0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions jsonnet/kube-prometheus/prometheus/prometheus.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,23 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
},
],
},
{
port: 'https-metrics',
scheme: 'https',
path: '/metrics/probes',
interval: '30s',
honorLabels: true,
tlsConfig: {
insecureSkipVerify: true,
},
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
relabelings: [
{
sourceLabels: ['__metrics_path__'],
targetLabel: 'metrics_path',
},
],
},
],
selector: {
matchLabels: {
Expand Down
12 changes: 12 additions & 0 deletions manifests/prometheus-serviceMonitorKubelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ spec:
scheme: https
tlsConfig:
insecureSkipVerify: true
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
interval: 30s
path: /metrics/probes
port: https-metrics
relabelings:
- sourceLabels:
- __metrics_path__
targetLabel: metrics_path
scheme: https
tlsConfig:
insecureSkipVerify: true
jobLabel: k8s-app
namespaceSelector:
matchNames:
Expand Down

0 comments on commit f0955e0

Please sign in to comment.