include the blackbox exporter mixin by default

This commit is contained in:
PÁLFALVI Tamás
2020-11-26 22:26:23 +01:00
parent b39b1bfcfc
commit c2fb1f4208
3 changed files with 4 additions and 9 deletions

View File

@@ -734,8 +734,7 @@ See [exposing Prometheus/Alertmanager/Grafana](docs/exposing-prometheus-alertman
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
// ... other necessary mixins ...
(import 'kube-prometheus/blackbox-exporter/blackbox-exporter.libsonnet') +
// ... all necessary mixins ...
{
_config+:: {
// ... configuration for other features ...

View File

@@ -4,12 +4,8 @@ The `prometheus-operator` defines a `Probe` resource type that can be used to de
## Adding blackbox exporter manifests to an existing `kube-prometheus` configuration
1. Add the blackbox exporter mixin to the list of imports:
```
(import 'kube-prometheus/blackbox-exporter/blackbox-exporter.libsonnet')
```
2. Override blackbox-related configuration parameters as needed.
3. Add the following to the list of renderers to render the blackbox exporter manifests:
1. Override blackbox-related configuration parameters as needed.
2. Add the following to the list of renderers to render the blackbox exporter manifests:
```
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) }
```
@@ -35,7 +31,6 @@ The `prometheus-operator` defines a `Probe` resource type that can be used to de
```jsonnet
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/blackbox-exporter/blackbox-exporter.libsonnet')
{
_config+:: {
namespace: 'monitoring',

View File

@@ -5,6 +5,7 @@ local kubeRbacProxyContainer = import './kube-rbac-proxy/container.libsonnet';
(import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics-mixin/mixin.libsonnet') +
(import './node-exporter/node-exporter.libsonnet') +
(import 'github.com/prometheus/node_exporter/docs/node-mixin/mixin.libsonnet') +
(import './blackbox-exporter/blackbox-exporter.libsonnet') +
(import './alertmanager/alertmanager.libsonnet') +
(import 'github.com/prometheus/alertmanager/doc/alertmanager-mixin/mixin.libsonnet') +
(import 'github.com/prometheus-operator/prometheus-operator/jsonnet/prometheus-operator/prometheus-operator.libsonnet') +