Skip to content
Snippets Groups Projects
Commit cfa8ab79 authored by Joshua Olson's avatar Joshua Olson
Browse files

kube-prometheus: add more section headings under Customization

parent 532f546d
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,10 @@ This stack is meant for cluster monitoring, so it is pre-configured to collect m ...@@ -28,6 +28,10 @@ This stack is meant for cluster monitoring, so it is pre-configured to collect m
* [Containerized Installing and Compiling](#containerized-installing-and-compiling) * [Containerized Installing and Compiling](#containerized-installing-and-compiling)
* [Configuration](#configuration) * [Configuration](#configuration)
* [Customization](#customization) * [Customization](#customization)
* [Cluster Creation Tools](cluster-creation-tools)
* [NodePorts](nodeports)
* [Prometheus Object Name](prometheus-object-name)
* [node-exporter DaemonSet namespace](node-exporter-daemonset-namespace)
* [Alertmanager configuration](#alertmanager-configuration) * [Alertmanager configuration](#alertmanager-configuration)
* [Static etcd configuration](#static-etcd-configuration) * [Static etcd configuration](#static-etcd-configuration)
* [Customizing Prometheus alerting/recording rules and Grafana dashboards](#customizing-prometheus-alertingrecording-rules-and-grafana-dashboards) * [Customizing Prometheus alerting/recording rules and Grafana dashboards](#customizing-prometheus-alertingrecording-rules-and-grafana-dashboards)
...@@ -223,6 +227,8 @@ The grafana definition is located in a different project (https://github.com/bra ...@@ -223,6 +227,8 @@ The grafana definition is located in a different project (https://github.com/bra
Jsonnet is a turing complete language, any logic can be reflected in it. It also has powerful merge functionalities, allowing sophisticated customizations of any kind simply by merging it into the object the library provides. Jsonnet is a turing complete language, any logic can be reflected in it. It also has powerful merge functionalities, allowing sophisticated customizations of any kind simply by merging it into the object the library provides.
### Cluster Creation Tools
A common example is that not all Kubernetes clusters are created exactly the same way, meaning the configuration to monitor them may be slightly different. For [kubeadm](examples/jsonnet-snippets/kubeadm.jsonnet) and [bootkube](examples/jsonnet-snippets/bootkube.jsonnet) and [kops](examples/jsonnet-snippets/kops.jsonnet) clusters there are mixins available to easily configure these: A common example is that not all Kubernetes clusters are created exactly the same way, meaning the configuration to monitor them may be slightly different. For [kubeadm](examples/jsonnet-snippets/kubeadm.jsonnet) and [bootkube](examples/jsonnet-snippets/bootkube.jsonnet) and [kops](examples/jsonnet-snippets/kops.jsonnet) clusters there are mixins available to easily configure these:
kubeadm: kubeadm:
...@@ -249,6 +255,8 @@ kops: ...@@ -249,6 +255,8 @@ kops:
(import 'kube-prometheus/kube-prometheus-kops.libsonnet') (import 'kube-prometheus/kube-prometheus-kops.libsonnet')
``` ```
### NodePorts
Another mixin that may be useful for exploring the stack is to expose the UIs of Prometheus, Alertmanager and Grafana on NodePorts: Another mixin that may be useful for exploring the stack is to expose the UIs of Prometheus, Alertmanager and Grafana on NodePorts:
[embedmd]:# (examples/jsonnet-snippets/node-ports.jsonnet) [embedmd]:# (examples/jsonnet-snippets/node-ports.jsonnet)
...@@ -257,6 +265,8 @@ Another mixin that may be useful for exploring the stack is to expose the UIs of ...@@ -257,6 +265,8 @@ Another mixin that may be useful for exploring the stack is to expose the UIs of
(import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet')
``` ```
### Prometheus Object Name
To give another customization example, the name of the `Prometheus` object provided by this library can be overridden: To give another customization example, the name of the `Prometheus` object provided by this library can be overridden:
[embedmd]:# (examples/prometheus-name-override.jsonnet) [embedmd]:# (examples/prometheus-name-override.jsonnet)
...@@ -272,6 +282,8 @@ To give another customization example, the name of the `Prometheus` object provi ...@@ -272,6 +282,8 @@ To give another customization example, the name of the `Prometheus` object provi
}).prometheus.prometheus }).prometheus.prometheus
``` ```
### node-exporter DaemonSet namespace
Standard Kubernetes manifests are all written using [ksonnet-lib](https://github.com/ksonnet/ksonnet-lib/), so they can be modified with the mixins supplied by ksonnet-lib. For example to override the namespace of the node-exporter DaemonSet: Standard Kubernetes manifests are all written using [ksonnet-lib](https://github.com/ksonnet/ksonnet-lib/), so they can be modified with the mixins supplied by ksonnet-lib. For example to override the namespace of the node-exporter DaemonSet:
[embedmd]:# (examples/ksonnet-example.jsonnet) [embedmd]:# (examples/ksonnet-example.jsonnet)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment