Skip to content

serviceMonitor

serviceMonitor objects to be generated by the chart. Additional ServiceMonitors can be added by adding a dictionary key similar to the ‘main’ ServiceMonitor.

object

Keys are identifiers for serviceMonitor instances.

serviceMonitor:
main:
enabled: true
# ... configuration
secondary:
enabled: true
# ... configuration

Available properties:

PropertyTypeRequiredDefaultDescription
annotationsobject / nullNo-Annotations to set on the item. Keys and values support H…
enabledbooleanNotrueSet to false to disable the ServiceMonitor.
endpointsarrayNo-Endpoints allowed as part of this ServiceMonitor.
forceRenamestringNo-Override the default resource name. Mutually exclusive wi…
jobLabelstringNoapp.kubernetes.io/nameThe label to use to retrieve the job name from the target…
labelsobject / nullNo-Labels to set on the item. Keys and values support Helm t…
prefixstringNo“Prefix to prepend to the resource name. Mutually exclusiv…
selectorobjectNo-Selector to select Endpoints objects.
serviceobjectNo-Service to monitor. Either ‘serviceName’ or ’…
serviceNamestringNo-Reference to a Service name to monitor. Deprecated in fav…
suffixstringNo-Suffix to append to the resource name. Defaults to the re…
targetLabelsarrayNo-Transfers labels from the Kubernetes Service onto the cre…

Annotations to set on the item. Keys and values support Helm templating.

Override the default resource name. Mutually exclusive with prefix and suffix.

The label to use to retrieve the job name from the target service’s metadata. Defaults to ‘app.kubernetes.io/name’.

Labels to set on the item. Keys and values support Helm templating.

Prefix to prepend to the resource name. Mutually exclusive with forceRename.

Reference to a Service name to monitor. Deprecated in favor of ‘service’.

Suffix to append to the resource name. Defaults to the resource identifier if there are multiple items, otherwise empty. Mutually exclusive with forceRename.

Transfers labels from the Kubernetes Service onto the created metrics. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitorspec for details.