Compare commits
25 Commits
fix-versio
...
release-0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
408f386390 | ||
|
|
fcd73c717f | ||
|
|
452aaed72e | ||
|
|
3d416c6872 | ||
|
|
c8db3c85db | ||
|
|
c9b93702cb | ||
|
|
ff1bdd2238 | ||
|
|
0589fb981f | ||
|
|
b46e52ae62 | ||
|
|
eda2e812bf | ||
|
|
864ca1e773 | ||
|
|
822f885d67 | ||
|
|
184a6a452b | ||
|
|
b6ab321ac8 | ||
|
|
6e67e7fdbb | ||
|
|
ad19693121 | ||
|
|
8ccd82e40a | ||
|
|
c1fc78c979 | ||
|
|
4e96f7bed6 | ||
|
|
49eb7c66f6 | ||
|
|
b4b365cead | ||
|
|
fdcff9a224 | ||
|
|
2640b11d77 | ||
|
|
9ead6ebc53 | ||
|
|
62a5b28b55 |
36
examples/grafana-ldap.jsonnet
Normal file
36
examples/grafana-ldap.jsonnet
Normal file
@@ -0,0 +1,36 @@
|
||||
local kp =
|
||||
(import 'kube-prometheus/main.libsonnet') +
|
||||
{
|
||||
values+:: {
|
||||
common+: {
|
||||
namespace: 'monitoring',
|
||||
},
|
||||
grafana+: {
|
||||
config+: {
|
||||
sections: {
|
||||
'auth.ldap': {
|
||||
enabled: true,
|
||||
config_file: '/etc/grafana/ldap.toml',
|
||||
allow_sign_up: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
ldap: |||
|
||||
[[servers]]
|
||||
host = "127.0.0.1"
|
||||
port = 389
|
||||
use_ssl = false
|
||||
start_tls = false
|
||||
ssl_skip_verify = false
|
||||
|
||||
bind_dn = "cn=admins,dc=example,dc=com"
|
||||
bind_password = 'grafana'
|
||||
|
||||
search_filter = "(cn=%s)"
|
||||
search_base_dns = ["dc=example,dc=com"]
|
||||
|||,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
|
||||
@@ -27,6 +27,7 @@ local defaults = {
|
||||
containers: [],
|
||||
datasources: [],
|
||||
config: {},
|
||||
ldap: null,
|
||||
plugins: [],
|
||||
env: [],
|
||||
};
|
||||
@@ -57,6 +58,7 @@ function(params) {
|
||||
folderDashboards: g._config.folderDashboards,
|
||||
containers: g._config.containers,
|
||||
config+: g._config.config,
|
||||
ldap: g._config.ldap,
|
||||
plugins+: g._config.plugins,
|
||||
env: g._config.env,
|
||||
} + (
|
||||
|
||||
@@ -127,9 +127,7 @@ function(params) {
|
||||
action: 'drop',
|
||||
regex: '(' + std.join('|',
|
||||
[
|
||||
'container_fs_.*', // add filesystem read/write data (nodes*disks*services*4)
|
||||
'container_spec_.*', // everything related to cgroup specification and thus static data (nodes*services*5)
|
||||
'container_blkio_device_usage_total', // useful for containers, but not for system services (nodes*disks*services*operations*2)
|
||||
'container_file_descriptors', // file descriptors limits and global numbers are exposed via (nodes*services)
|
||||
'container_sockets', // used sockets in cgroup. Usually not important for system services (nodes*services)
|
||||
'container_threads_max', // max number of threads in cgroup. Usually for system services it is not limited (nodes*services)
|
||||
@@ -138,6 +136,14 @@ function(params) {
|
||||
'container_last_seen', // not needed as system services are always running (nodes*services)
|
||||
]) + ');;',
|
||||
},
|
||||
{
|
||||
sourceLabels: ['__name__', 'container'],
|
||||
action: 'drop',
|
||||
regex: '(' + std.join('|',
|
||||
[
|
||||
'container_blkio_device_usage_total',
|
||||
]) + ');.+',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -276,7 +282,6 @@ function(params) {
|
||||
},
|
||||
podMetricsEndpoints: [{
|
||||
honorLabels: true,
|
||||
targetPort: 10249,
|
||||
relabelings: [
|
||||
{
|
||||
action: 'replace',
|
||||
@@ -285,6 +290,13 @@ function(params) {
|
||||
sourceLabels: ['__meta_kubernetes_pod_node_name'],
|
||||
targetLabel: 'instance',
|
||||
},
|
||||
{
|
||||
action: 'replace',
|
||||
regex: '(.*)',
|
||||
replacement: '$1:10249',
|
||||
targetLabel: '__address__',
|
||||
sourceLabels: ['__meta_kubernetes_pod_ip'],
|
||||
},
|
||||
],
|
||||
}],
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"subdir": "grafana"
|
||||
}
|
||||
},
|
||||
"version": "master"
|
||||
"version": "90f38916f1f8a310a715d18e36f787f84df4ddf5"
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
|
||||
@@ -98,7 +98,7 @@ local utils = import './lib/utils.libsonnet';
|
||||
namespace: $.values.common.namespace,
|
||||
version: $.values.common.versions.prometheusAdapter,
|
||||
image: $.values.common.images.prometheusAdapter,
|
||||
prometheusURL: 'http://prometheus-' + $.values.prometheus.name + '.' + $.values.common.namespace + '.svc.cluster.local:9090/',
|
||||
prometheusURL: 'http://prometheus-' + $.values.prometheus.name + '.' + $.values.prometheus.namespace + '.svc:9090/',
|
||||
rangeIntervals+: {
|
||||
kubelet: utils.rangeInterval($.kubernetesControlPlane.serviceMonitorKubelet.spec.endpoints[0].interval),
|
||||
nodeExporter: utils.rangeInterval($.nodeExporter.serviceMonitor.spec.endpoints[0].interval),
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"subdir": "grafana"
|
||||
}
|
||||
},
|
||||
"version": "8ea4e7bc04b1bf5e9bd99918ca28c6271b42be0e",
|
||||
"sum": "muenICtKXABk6MZZHCZD2wCbmtiE96GwWRMGa1Rg+wA="
|
||||
"version": "90f38916f1f8a310a715d18e36f787f84df4ddf5",
|
||||
"sum": "0kZ1pnuIirDtbg6F9at5+NQOwKNONIGEPq0eECzvRkI="
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
@@ -18,7 +18,7 @@
|
||||
"subdir": "contrib/mixin"
|
||||
}
|
||||
},
|
||||
"version": "2fe94b19d38237e9eff025e5eeaddde371973b01",
|
||||
"version": "e5bd8f4b7c237a80d988e8fee6c96866930d3c6d",
|
||||
"sum": "W/Azptf1PoqjyMwJON96UY69MFugDA4IAYiKURscryc="
|
||||
},
|
||||
{
|
||||
@@ -28,8 +28,8 @@
|
||||
"subdir": "grafonnet"
|
||||
}
|
||||
},
|
||||
"version": "3082bfca110166cd69533fa3c0875fdb1b68c329",
|
||||
"sum": "4/sUV0Kk+o8I+wlYxL9R6EPhL/NiLfYHk+NXlU64RUk="
|
||||
"version": "a1d61cce1da59c71409b99b5c7568511fec661ea",
|
||||
"sum": "342u++/7rViR/zj2jeJOjshzglkZ1SY+hFNuyCBFMdc="
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
@@ -38,8 +38,8 @@
|
||||
"subdir": "grafana-builder"
|
||||
}
|
||||
},
|
||||
"version": "0d13e5ba1b3a4c29015738c203d92ea39f71ebe2",
|
||||
"sum": "GRf2GvwEU4jhXV+JOonXSZ4wdDv8mnHBPCQ6TUVd+g8="
|
||||
"version": "f33dff93db677a32303630c3e0910cf6d46a92cc",
|
||||
"sum": "RJjFQa1n8CDbB6m1fBQQzPye7jhOhGTUbma27Gil81I="
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
@@ -48,8 +48,8 @@
|
||||
"subdir": ""
|
||||
}
|
||||
},
|
||||
"version": "1163ea85e45e1f7edf6d4f83758d44c6fef1f2fa",
|
||||
"sum": "4H2pzHd6A47rQIZcQ3B0o+nFMeNgLE9dGYJv7ZP7m2s="
|
||||
"version": "ba16d78ef81ca3d183472c2e3d1d7d3549e18ecb",
|
||||
"sum": "ntQv86Jd9HR4YQlb2yzjYVCAQHMUnAaQVIdhR2QaNNg="
|
||||
},
|
||||
{
|
||||
"source": {
|
||||
@@ -58,7 +58,7 @@
|
||||
"subdir": "lib/promgrafonnet"
|
||||
}
|
||||
},
|
||||
"version": "1163ea85e45e1f7edf6d4f83758d44c6fef1f2fa",
|
||||
"version": "003ba5eadfbd69817d1215952133d3ecf99fbd92",
|
||||
"sum": "zv7hXGui6BfHzE9wPatHI/AGZa4A2WKo6pq7ZdqBsps="
|
||||
},
|
||||
{
|
||||
@@ -68,7 +68,7 @@
|
||||
"subdir": "jsonnet/kube-state-metrics"
|
||||
}
|
||||
},
|
||||
"version": "d60e6f7ba1719045edc0f60857faadeb87280421",
|
||||
"version": "f170cc73f11c1580d7f38af746be0f2fa79c6a1e",
|
||||
"sum": "S5qI+PJUdNeYOv76jH5nxwYS9N6U7CRxvyuB1wI4cTE="
|
||||
},
|
||||
{
|
||||
@@ -78,7 +78,7 @@
|
||||
"subdir": "jsonnet/kube-state-metrics-mixin"
|
||||
}
|
||||
},
|
||||
"version": "d60e6f7ba1719045edc0f60857faadeb87280421",
|
||||
"version": "f170cc73f11c1580d7f38af746be0f2fa79c6a1e",
|
||||
"sum": "u8gaydJoxEjzizQ8jY8xSjYgWooPmxw+wIWdDxifMAk="
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -123,7 +123,7 @@ spec:
|
||||
name: grafana-dashboard-workload-total
|
||||
readOnly: false
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: linux
|
||||
kubernetes.io/os: linux
|
||||
securityContext:
|
||||
fsGroup: 65534
|
||||
runAsNonRoot: true
|
||||
|
||||
@@ -14,13 +14,11 @@ spec:
|
||||
rules:
|
||||
- alert: KubePodCrashLooping
|
||||
annotations:
|
||||
description: Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container }}) is restarting {{ printf "%.2f" $value }} times / 10 minutes.
|
||||
description: 'Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container }}) is in waiting state (reason: "CrashLoopBackOff").'
|
||||
runbook_url: https://runbooks.prometheus-operator.dev/runbooks/kubernetes/kubepodcrashlooping
|
||||
summary: Pod is crash looping.
|
||||
expr: |
|
||||
increase(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[10m]) > 0
|
||||
and
|
||||
kube_pod_container_status_waiting{job="kube-state-metrics"} == 1
|
||||
max_over_time(kube_pod_container_status_waiting_reason{reason="CrashLoopBackOff", job="kube-state-metrics"}[5m]) >= 1
|
||||
for: 15m
|
||||
labels:
|
||||
severity: warning
|
||||
@@ -142,7 +140,7 @@ spec:
|
||||
!=
|
||||
0
|
||||
) or (
|
||||
kube_daemonset_updated_number_scheduled{job="kube-state-metrics"}
|
||||
kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics"}
|
||||
!=
|
||||
kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"}
|
||||
) or (
|
||||
@@ -151,7 +149,7 @@ spec:
|
||||
kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"}
|
||||
)
|
||||
) and (
|
||||
changes(kube_daemonset_updated_number_scheduled{job="kube-state-metrics"}[5m])
|
||||
changes(kube_daemonset_status_updated_number_scheduled{job="kube-state-metrics"}[5m])
|
||||
==
|
||||
0
|
||||
)
|
||||
|
||||
@@ -61,11 +61,16 @@ spec:
|
||||
sourceLabels:
|
||||
- __name__
|
||||
- action: drop
|
||||
regex: (container_fs_.*|container_spec_.*|container_blkio_device_usage_total|container_file_descriptors|container_sockets|container_threads_max|container_threads|container_start_time_seconds|container_last_seen);;
|
||||
regex: (container_spec_.*|container_file_descriptors|container_sockets|container_threads_max|container_threads|container_start_time_seconds|container_last_seen);;
|
||||
sourceLabels:
|
||||
- __name__
|
||||
- pod
|
||||
- namespace
|
||||
- action: drop
|
||||
regex: (container_blkio_device_usage_total);.+
|
||||
sourceLabels:
|
||||
- __name__
|
||||
- container
|
||||
path: /metrics/cadvisor
|
||||
port: https-metrics
|
||||
relabelings:
|
||||
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
- --config=/etc/adapter/config.yaml
|
||||
- --logtostderr=true
|
||||
- --metrics-relist-interval=1m
|
||||
- --prometheus-url=http://prometheus-k8s.monitoring.svc.cluster.local:9090/
|
||||
- --prometheus-url=http://prometheus-k8s.monitoring.svc:9090/
|
||||
- --secure-port=6443
|
||||
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
image: k8s.gcr.io/prometheus-adapter/prometheus-adapter:v0.9.0
|
||||
|
||||
Reference in New Issue
Block a user