mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-25 00:11:44 +02:00
* Addon: Use Hostprocess for Windows Exporter #1627 This allows for Windows Exporter to be deployed and configured dynamically without requiring to specify targets manually for each Windows node Documentation and example added * Addon: Windows Exporter using Hostprocess Fix some performance issues. - Specify resource limits for windows exporter. - Allow for scrape timeout and interval to be configured. Depending on how many pods are running on a node it can take from 500ms to 15s to scrape metrics from node. Default timeout is 10s. - Allow for enabled collectors to be configured. - Only enable collectors that are being used in rules and dashboards. * Addon: Windows Exporter using Hostprocess Fix formatting issues * Fix formatting issues in windows-hostprocess addon * Windows Addon: update doc to reflect both configs - Hostprocess and static * Windows Addon: update doc --------- Co-authored-by: Dinesh Sharma <dinesh.sharma@health.telstra.com>
34 lines
1.9 KiB
Jsonnet
34 lines
1.9 KiB
Jsonnet
local kp =
|
|
(import 'kube-prometheus/main.libsonnet') +
|
|
(import 'kube-prometheus/addons/windows-hostprocess.libsonnet') +
|
|
{
|
|
values+:: {
|
|
common+: {
|
|
namespace: 'monitoring',
|
|
},
|
|
windowsExporter+:: {
|
|
image: 'ghcr.io/prometheus-community/windows-exporter',
|
|
version: '0.21.0',
|
|
},
|
|
},
|
|
};
|
|
|
|
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
|
|
{
|
|
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
|
|
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
|
|
} +
|
|
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
|
|
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
|
|
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
|
|
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
|
|
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
|
|
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
|
|
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
|
|
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
|
|
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
|
|
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
|
|
{ ['windows-exporter-' + name]: kp.windowsExporter[name] for name in std.objectFields(kp.windowsExporter) } +
|
|
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
|
|
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
|