-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.jsonnet
59 lines (52 loc) · 2.36 KB
/
config.jsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
_config+:: {
// Namespace used in manifests
namespace: "monitoring",
// Etcd selector from etcd-io/etcd/Documentation/etcd-mixin
etcd_selector: 'job=~".*etcd.*"',
// Selectors are inserted between {} in Prometheus queries.
cadvisorSelector: 'job="kubelet"',
kubeletSelector: 'job="kubelet"',
kubeStateMetricsSelector: 'job="kube-state-metrics"',
nodeExporterSelector: 'job="node-exporter"',
notKubeDnsCoreDnsSelector: 'job="coredns"',
kubeSchedulerSelector: 'job="kube-scheduler"',
kubeControllerManagerSelector: 'job="kube-controller-manager"',
kubeApiserverSelector: 'job="apiserver"',
kubeProxySelector: 'job="kube-proxy"',
podLabel: 'pod',
namespaceSelector: null,
prefixedNamespaceSelector: if self.namespaceSelector != null then self.namespaceSelector + ',' else '',
hostNetworkInterfaceSelector: 'device!~"veth.+"',
hostMountpointSelector: 'mountpoint="/"',
wmiExporterSelector: 'job="wmi-exporter"',
// We build alerts for the presence of all these jobs.
jobs: {
Kubelet: $._config.kubeletSelector,
KubeScheduler: $._config.kubeSchedulerSelector,
KubeControllerManager: $._config.kubeControllerManagerSelector,
KubeAPI: $._config.kubeApiserverSelector,
},
// We alert when the aggregate (CPU, Memory) quota for all namespaces is
// greater than the amount of the resources in the cluster. We do however
// allow you to overcommit if you wish.
namespaceOvercommitFactor: 1.5,
kubeletPodLimit: 110,
certExpirationWarningSeconds: 7 * 24 * 3600,
certExpirationCriticalSeconds: 1 * 24 * 3600,
cpuThrottlingPercent: 75,
cpuThrottlingSelector: '',
kubeAPILatencyWarningSeconds: 1,
kubeAPILatencyCriticalSeconds: 3,
// We alert when a disk is expected to fill up in four days. Depending on
// the data-set it might be useful to change the sampling-time for the
// prediction
volumeFullPredictionSampleTime: '6h',
// This list of filesystem is referenced in various expressions.
fstypes: ['ext[234]', 'btrfs', 'xfs', 'zfs'],
fstypeSelector: 'fstype=~"%s"' % std.join('|', self.fstypes),
// This list of disk device names is referenced in various expressions.
diskDevices: ['nvme.+', 'rbd.+', 'sd.+', 'vd.+', 'xvd.+', 'dm-.+'],
diskDeviceSelector: 'device=~"%s"' % std.join('|', self.diskDevices),
},
}