rpi.carlosedp.cluster-monit.../traefik.jsonnet

47 lines
1014 B
Plaintext
Raw Normal View History

2019-08-08 22:09:53 +02:00
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
2019-02-01 14:43:22 +01:00
2019-02-27 13:28:00 +01:00
{
2019-02-01 14:43:22 +01:00
_config+:: {
namespace: 'monitoring',
2019-02-27 13:28:00 +01:00
// Add custom dashboards
grafanaDashboards+:: {
2019-03-13 22:44:01 +01:00
'traefik-dashboard.json': (import 'grafana-dashboards/traefik-dashboard.json'),
2019-02-27 13:28:00 +01:00
},
2019-02-01 14:43:22 +01:00
},
traefikExporter+:: {
2019-02-01 14:43:22 +01:00
serviceMonitor:
{
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
metadata: {
name: 'traefik',
2019-02-27 13:28:00 +01:00
namespace: $._config.namespace,
labels: {
'app': 'traefik',
2019-02-27 13:28:00 +01:00
},
2019-02-01 14:43:22 +01:00
},
spec: {
jobLabel: 'traefik-exporter',
2019-02-27 13:28:00 +01:00
selector: {
matchLabels: {
'app': 'traefik',
2019-02-01 14:43:22 +01:00
},
2019-02-27 13:28:00 +01:00
},
endpoints: [
{
port: 'metrics',
2019-02-27 13:28:00 +01:00
scheme: 'http',
interval: '30s',
2019-02-01 14:43:22 +01:00
},
2019-02-27 13:28:00 +01:00
],
namespaceSelector: {
matchNames: [
'kube-system',
2019-03-13 22:44:01 +01:00
],
2019-02-27 13:28:00 +01:00
},
2019-02-01 14:43:22 +01:00
},
},
},
2019-03-13 22:44:01 +01:00
}