mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-12-22 19:09:30 +01:00
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
|
|
|
{
|
|
_config+:: {
|
|
namespace: 'monitoring',
|
|
// Add custom dashboards
|
|
grafanaDashboards+:: {
|
|
'traefik-dashboard.json': (import 'grafana-dashboards/traefik-dashboard.json'),
|
|
},
|
|
},
|
|
|
|
traefikExporter+:: {
|
|
serviceMonitor:
|
|
{
|
|
apiVersion: 'monitoring.coreos.com/v1',
|
|
kind: 'ServiceMonitor',
|
|
metadata: {
|
|
name: 'traefik-ingress-lb',
|
|
namespace: $._config.namespace,
|
|
labels: {
|
|
'k8s-app': 'traefik-ingress-lb',
|
|
},
|
|
},
|
|
spec: {
|
|
jobLabel: 'k8s-app',
|
|
selector: {
|
|
matchLabels: {
|
|
'k8s-app': 'traefik-ingress-lb',
|
|
},
|
|
},
|
|
endpoints: [
|
|
{
|
|
port: 'admin',
|
|
scheme: 'http',
|
|
interval: '30s',
|
|
},
|
|
],
|
|
namespaceSelector: {
|
|
matchNames: [
|
|
'kube-system',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|