Prometheus Monitoring Configuration
Prometheus Monitoring Configuration Properties describes properties for configuring Prometheus.
Property | Description |
---|---|
monitoring.enabled | When set to true , it is assumed that:
false . |
monitoring.labels | A dictionary of extra labels added to the ServiceMonitor objects to ensure that they
are correctly identified by Prometheus. Note: Create any new labels that
your environment requires, but do not change any of the default
MATRIXX labels. |
global.monitoring.relabelings | An array of relabelings, in addition to the default node_ip and node_name labellings, that are applied to metrics as they are processed for all
ServiceMonitors. The labelling parameters include:
|
Monitoring Label Replacement
This Helm values file excerpt shows replacement of the__meta_kubernetes_pod_node_name
label with my_node_ip
,
and __meta_kubernetes_pod_node_name
with my_node_name
:global:
# Configuration relating to Prometheus Monitoring
monitoring:
# True if Prometheus monitoring should be enabled. Requires the ServiceMonitor (monitoring.coreos.com/v1) to be installed
enabled: true
# relabelings additional relabelings to add to service monitor
# default relabelings already include: node_ip, node_name
relabelings:
- action: replace
regex: ^(.*)$
replacement: $1
separator: ;
sourceLabels: [__meta_kubernetes_pod_host_ip]
targetLabel: my_node_ip
- targetLabel: my_node_name
sourceLabels: [__meta_kubernetes_pod_node_name]