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
|
|
|
},
|
|
|
|
|
2019-05-07 17:16:16 +02:00
|
|
|
traefikExporter+:: {
|
2019-02-01 14:43:22 +01:00
|
|
|
serviceMonitor:
|
|
|
|
{
|
|
|
|
apiVersion: 'monitoring.coreos.com/v1',
|
|
|
|
kind: 'ServiceMonitor',
|
|
|
|
metadata: {
|
2019-08-23 00:01:42 +02:00
|
|
|
name: 'traefik',
|
2019-02-27 13:28:00 +01:00
|
|
|
namespace: $._config.namespace,
|
|
|
|
labels: {
|
2019-08-23 00:01:42 +02:00
|
|
|
'app': 'traefik',
|
2019-02-27 13:28:00 +01:00
|
|
|
},
|
2019-02-01 14:43:22 +01:00
|
|
|
},
|
|
|
|
spec: {
|
2019-08-23 00:01:42 +02:00
|
|
|
jobLabel: 'traefik-exporter',
|
2019-02-27 13:28:00 +01:00
|
|
|
selector: {
|
|
|
|
matchLabels: {
|
2019-08-23 00:01:42 +02:00
|
|
|
'app': 'traefik',
|
2019-02-01 14:43:22 +01:00
|
|
|
},
|
2019-02-27 13:28:00 +01:00
|
|
|
},
|
|
|
|
endpoints: [
|
|
|
|
{
|
2019-08-23 00:01:42 +02:00
|
|
|
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
|
|
|
}
|