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 # ... configurationInstance Properties
Section titled “Instance Properties”Available properties:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
annotations | object / null | No | - | Annotations to set on the item. |
enabled | boolean | No | true | Set to false to disable the ServiceMonitor. |
endpoints | array | No | - | Endpoints allowed as part of this ServiceMonitor. |
forceRename | string | No | - | Override the default resource name. Mutually exclusive wi… |
jobLabel | string | No | app.kubernetes.io/name | The label to use to retrieve the job name from the target… |
labels | object / null | No | - | Labels to set on the item. |
prefix | string | No | “ | Prefix to prepend to the resource name. Mutually exclusiv… |
selector | object | No | - | Selector to select Endpoints objects. |
service | object | No | - | Service to monitor. Either ‘serviceName’ or ’… |
serviceName | string | No | - | Reference to a Service name to monitor. Helm templates ar… |
suffix | string | No | - | Suffix to append to the resource name. Defaults to the re… |
targetLabels | array | No | - | Transfers labels from the Kubernetes Service onto the cre… |
Property Details
Section titled “Property Details”forceRename
Section titled “forceRename”Override the default resource name. Mutually exclusive with prefix and suffix.
jobLabel
Section titled “jobLabel”The label to use to retrieve the job name from the target service’s metadata. Defaults to ‘app.kubernetes.io/name’. Helm templates can be used.
prefix
Section titled “prefix”Prefix to prepend to the resource name. Mutually exclusive with forceRename.
service
Section titled “service”Service to monitor. Either ‘serviceName’ or ‘service’ must be specified.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | - |
serviceName
Section titled “serviceName”Reference to a Service name to monitor. Helm templates are supported. Deprecated in favor of ‘service’.
suffix
Section titled “suffix”Suffix to append to the resource name. Defaults to the resource identifier if there are multiple items, otherwise empty. Mutually exclusive with forceRename.
targetLabels
Section titled “targetLabels”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.