- expr:sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m])) WITHOUT (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu_seconds_total) BY (instance, cpu)) BY (instance)
- expr:cluster:node_cpu_seconds_total:rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu))
record:cluster:node_cpu:ratio
- name:kube-prometheus-general.rules
rules:
@ -737,9 +732,7 @@ spec:
rules:
- alert:KubeStateMetricsListErrors
annotations:
message:kube-state-metrics is experiencing errors at an elevated rate in
list operations. This is likely causing it to not be able to expose metrics
about Kubernetes objects correctly or at all.
message:kube-state-metrics is experiencing errors at an elevated rate in list operations. This is likely causing it to not be able to expose metrics about Kubernetes objects correctly or at all.
message:kube-state-metrics is experiencing errors at an elevated rate in
watch operations. This is likely causing it to not be able to expose metrics
about Kubernetes objects correctly or at all.
message:kube-state-metrics is experiencing errors at an elevated rate in watch operations. This is likely causing it to not be able to expose metrics about Kubernetes objects correctly or at all.
summary:Filesystem is predicted to run out of space within the next 24 hours.
expr:|
@ -785,9 +774,7 @@ spec:
severity:warning
- alert:NodeFilesystemSpaceFillingUp
annotations:
description:Filesystem on {{ $labels.device }} at {{ $labels.instance }}
has only {{ printf "%.2f" $value }}% available space left and is filling
up fast.
description:Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available space left and is filling up fast.
summary:Filesystem is predicted to run out of inodes within the next 24 hours.
expr:|
@ -851,9 +834,7 @@ spec:
severity:warning
- alert:NodeFilesystemFilesFillingUp
annotations:
description:Filesystem on {{ $labels.device }} at {{ $labels.instance }}
has only {{ printf "%.2f" $value }}% available inodes left and is filling
up fast.
description:Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available inodes left and is filling up fast.
summary:Network interface is reporting many receive errors.
expr:|
@ -910,8 +888,7 @@ spec:
severity:warning
- alert:NodeNetworkTransmitErrs
annotations:
description:'{{ $labels.instance }} interface {{ $labels.device }} has encountered
{{printf "%.0f" $value }} transmit errors in the last two minutes.'
description:'{{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf "%.0f" $value }} transmit errors in the last two minutes.'
message:Deployment generation for {{ $labels.namespace }}/{{ $labels.deployment
}}does not match, this indicates that the Deployment has failed but has
not been rolled back.
message:Deployment generation for {{ $labels.namespace }}/{{ $labels.deployment }} does not match, this indicates that the Deployment has failed but has not been rolled back.
message:StatefulSet generation for {{ $labels.namespace }}/{{ $labels.statefulset
}}does not match, this indicates that the StatefulSet has failed but has
not been rolled back.
message:StatefulSet generation for {{ $labels.namespace }}/{{ $labels.statefulset }} does not match, this indicates that the StatefulSet has failed but has not been rolled back.
message:Only {{ $value | humanizePercentage }} of the desired Pods of DaemonSet
{{$labels.namespace }}/{{ $labels.daemonset }} are scheduled and ready.
message:Only {{ $value | humanizePercentage }} of the desired Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are scheduled and ready.
message:'{{ $value | humanizePercentage }} throttling of CPU in namespace
{{$labels.namespace }} for container {{ $labels.container }} in pod {{
$labels.pod }}.'
message:'{{ $value | humanizePercentage }} throttling of CPU in namespace {{ $labels.namespace }} for container {{ $labels.container }} in pod {{ $labels.pod }}.'
sum(increase(container_cpu_cfs_throttled_periods_total{container!="", }[5m])) by (container, pod, namespace)
@ -1271,9 +1224,7 @@ spec:
rules:
- alert:KubePersistentVolumeFillingUp
annotations:
message:The PersistentVolume claimed by {{ $labels.persistentvolumeclaim
}}in Namespace {{ $labels.namespace }} is only {{ $value | humanizePercentage
}}free.
message:The PersistentVolume claimed by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace }} is only {{ $value | humanizePercentage }} free.
message:Based on recent sampling, the PersistentVolume claimed by {{ $labels.persistentvolumeclaim
}}in Namespace {{ $labels.namespace }} is expected to fill up within four
days. Currently {{ $value | humanizePercentage }} is available.
message:Based on recent sampling, the PersistentVolume claimed by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace }} is expected to fill up within four days. Currently {{ $value | humanizePercentage }} is available.
message:API server is returning errors for {{ $value | humanizePercentage }} of requests for {{ $labels.verb }} {{ $labels.resource }} {{ $labels.subresource }}.
apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 604800
@ -1439,8 +1381,7 @@ spec:
severity:warning
- alert:KubeClientCertificateExpiration
annotations:
message:A client certificate used to authenticate to the apiserver is expiring
in less than 24.0 hours.
message:A client certificate used to authenticate to the apiserver is expiring in less than 24.0 hours.
apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 86400
@ -1448,10 +1389,7 @@ spec:
severity:critical
- alert:AggregatedAPIErrors
annotations:
message:An aggregated API {{ $labels.name }}/{{ $labels.namespace }} has
reported errors. The number of errors have increased for it in the past
five minutes. High values indicate that the availability of the service
changes too often.
message:An aggregated API {{ $labels.name }}/{{ $labels.namespace }} has reported errors. The number of errors have increased for it in the past five minutes. High values indicate that the availability of the service changes too often.
description:'{{ printf "%.1f" $value }}% errors while sending alerts from
Prometheus {{$labels.namespace}}/{{$labels.pod}} to Alertmanager {{$labels.alertmanager}}.'
summary:Prometheus has encountered more than 1% errors sending alerts to
a specific Alertmanager.
description:'{{ printf "%.1f" $value }}% errors while sending alerts from Prometheus {{$labels.namespace}}/{{$labels.pod}} to Alertmanager {{$labels.alertmanager}}.'
summary:Prometheus has encountered more than 1% errors sending alerts to a specific Alertmanager.
description:'{{ printf "%.1f" $value }}% minimum errors while sending alerts
from Prometheus {{$labels.namespace}}/{{$labels.pod}} to any Alertmanager.'
description:'{{ printf "%.1f" $value }}% minimum errors while sending alerts from Prometheus {{$labels.namespace}}/{{$labels.pod}} to any Alertmanager.'
summary:Prometheus encounters more than 3% errors sending alerts to any Alertmanager.
expr:|
min without(alertmanager) (
@ -1632,8 +1559,7 @@ spec:
severity:critical
- alert:PrometheusNotConnectedToAlertmanagers
annotations:
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} is not connected
to any Alertmanagers.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} is not connected to any Alertmanagers.
summary:Prometheus is not connected to any Alertmanagers.
expr:|
# Without max_over_time, failed scrapes could create false negatives, see
@ -1644,8 +1570,7 @@ spec:
severity:warning
- alert:PrometheusTSDBReloadsFailing
annotations:
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} has detected
{{$value | humanize}} reload failures over the last 3h.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} has detected {{$value | humanize}} reload failures over the last 3h.
summary:Prometheus has issues reloading blocks from disk.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} is dropping
{{printf "%.4g" $value }} samples/s with different values but duplicated
timestamp.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} is dropping {{ printf "%.4g" $value }} samples/s with different values but duplicated timestamp.
summary:Prometheus is dropping samples with duplicate timestamps.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} failed to send
{{printf "%.1f" $value }}% of the samples to {{ $labels.remote_name}}:{{
$labels.url }}
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} failed to send {{ printf "%.1f" $value }}% of the samples to {{ $labels.remote_name}}:{{ $labels.url }}
summary:Prometheus fails to send samples to remote storage.
summary:Prometheus remote write desired shards calculation wants to run more
than configured max shards.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} remote write desired shards calculation wants to run {{ $value }} shards for queue {{ $labels.remote_name}}:{{ $labels.url }}, which is more than the max of {{ printf `prometheus_remote_storage_shards_max{instance="%s",job="prometheus-k8s",namespace="monitoring"}` $labels.instance | query | first | value }}.
summary:Prometheus remote write desired shards calculation wants to run more than configured max shards.
expr:|
# Without max_over_time, failed scrapes could create false negatives, see
# https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details.
@ -1754,8 +1665,7 @@ spec:
severity:warning
- alert:PrometheusRuleFailures
annotations:
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} has failed to
evaluate {{ printf "%.0f" $value }} rules in the last 5m.
description:Prometheus {{$labels.namespace}}/{{$labels.pod}} has failed to evaluate {{ printf "%.0f" $value }} rules in the last 5m.
description:PodMonitor defines monitoring for a set of pods.
properties:
apiVersion:
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
metadata:
type:object
spec:
description:Specification of desired Pod selection for target discovery
by Prometheus.
description:Specification of desired Pod selection for target discovery by Prometheus.
properties:
jobLabel:
description:The label to use to retrieve the job name from.
type:string
namespaceSelector:
description:Selector to select which namespaces the Endpoints objects
are discovered from.
description:Selector to select which namespaces the Endpoints objects are discovered from.
properties:
any:
description:Boolean describing whether all namespaces are selected
in contrast to a list restricting them.
description:Boolean describing whether all namespaces are selected in contrast to a list restricting them.
type:boolean
matchNames:
description:List of namespace names.
@ -55,63 +48,45 @@ spec:
podMetricsEndpoints:
description:A list of endpoints allowed as part of this PodMonitor.
items:
description:PodMetricsEndpoint defines a scrapeable endpoint of
a Kubernetes Pod serving Prometheus metrics.
description:PodMetricsEndpoint defines a scrapeable endpoint of a Kubernetes Pod serving Prometheus metrics.
properties:
honorLabels:
description:HonorLabels chooses the metric's labels on collisions
with target labels.
description:HonorLabels chooses the metric's labels on collisions with target labels.
description:HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
type:boolean
interval:
description:Interval at which metrics should be scraped
type:string
metricRelabelings:
description:MetricRelabelConfigs to apply to samples before
ingestion.
description:MetricRelabelConfigs to apply to samples before ingestion.
items:
description:'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It
defines `<metric_relabel_configs>`-section of Prometheus
configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description:Action to perform based on regex matching.
Default is 'replace'
description:Action to perform based on regex matching. Default is 'replace'
type:string
modulus:
description:Modulus to take of the hash of the source
label values.
description:Modulus to take of the hash of the source label values.
format:int64
type:integer
regex:
description:Regular expression against which the extracted
value is matched. Default is '(.*)'
description:Regular expression against which the extracted value is matched. Default is '(.*)'
type:string
replacement:
description:Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
description:Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'
type:string
separator:
description:Separator placed between concatenated source
label values. default is ';'.
description:Separator placed between concatenated source label values. default is ';'.
type:string
sourceLabels:
description:The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular
expression for the replace, keep, and drop actions.
description:The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.
items:
type:string
type:array
targetLabel:
description:Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
description:Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.
type:string
type:object
type:array
@ -126,56 +101,39 @@ spec:
description:HTTP path to scrape for metrics.
type:string
port:
description:Name of the pod port this endpoint refers to. Mutually
exclusive with targetPort.
description:Name of the pod port this endpoint refers to. Mutually exclusive with targetPort.
description:ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
type:string
relabelings:
description:'RelabelConfigs to apply to samples before ingestion.
More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
description: 'RelabelConfigs to apply to samples before ingestion. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
items:
description:'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It
defines `<metric_relabel_configs>`-section of Prometheus
configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description:Action to perform based on regex matching.
Default is 'replace'
description:Action to perform based on regex matching. Default is 'replace'
type:string
modulus:
description:Modulus to take of the hash of the source
label values.
description:Modulus to take of the hash of the source label values.
format:int64
type:integer
regex:
description:Regular expression against which the extracted
value is matched. Default is '(.*)'
description:Regular expression against which the extracted value is matched. Default is '(.*)'
type:string
replacement:
description:Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
description:Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'
type:string
separator:
description:Separator placed between concatenated source
label values. default is ';'.
description:Separator placed between concatenated source label values. default is ';'.
type:string
sourceLabels:
description:The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular
expression for the replace, keep, and drop actions.
description:The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.
items:
type:string
type:array
targetLabel:
description:Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
description:Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.
type:string
type:object
type:array
@ -194,42 +152,30 @@ spec:
type:object
type:array
podTargetLabels:
description:PodTargetLabels transfers labels on the Kubernetes Pod
onto the target.
description:PodTargetLabels transfers labels on the Kubernetes Pod onto the target.
items:
type:string
type:array
sampleLimit:
description:SampleLimit defines per-scrape limit on number of scraped
samples that will be accepted.
description:SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
format:int64
type:integer
selector:
description:Selector to select Pod objects.
properties:
matchExpressions:
description:matchExpressions is a list of label selector requirements.
The requirements are ANDed.
description:matchExpressions is a list of label selector requirements. The requirements are ANDed.
items:
description:A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description:A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
properties:
key:
description:key is the label key that the selector applies
to.
description:key is the label key that the selector applies to.
type:string
operator:
description:operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description:operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
type:string
values:
description:values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
merge patch.
description:values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
items:
type:string
type:array
@ -241,11 +187,7 @@ spec:
matchLabels:
additionalProperties:
type:string
description:matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description:matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
description:PrometheusRule defines alerting rules for a Prometheus instance
properties:
apiVersion:
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
metadata:
type:object
@ -37,10 +33,7 @@ spec:
groups:
description:Content of Prometheus rule file
items:
description:'RuleGroup is a list of sequentially evaluated recording
and alerting rules. Note:PartialResponseStrategy is only used
by ThanosRuler and will be ignored by Prometheus instances. Valid
values for this field are ''warn'' or ''abort''. More info:https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response'
description: 'RuleGroup is a list of sequentially evaluated recording and alerting rules. Note: PartialResponseStrategy is only used by ThanosRuler and will be ignored by Prometheus instances. Valid values for this field are ''warn'' or ''abort''. More info:https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response'
description:ServiceMonitor defines monitoring for a set of services.
properties:
apiVersion:
description:'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type:string
kind:
description:'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type:string
metadata:
type:object
spec:
description:Specification of desired Service selection for target discovery
by Prometheus.
description:Specification of desired Service selection for target discovery by Prometheus.
properties:
endpoints:
description:A list of endpoints allowed as part of this ServiceMonitor.
items:
description:Endpoint defines a scrapeable endpoint serving Prometheus
metrics.
description:Endpoint defines a scrapeable endpoint serving Prometheus metrics.
properties:
basicAuth:
description:'BasicAuth allow an endpoint to authenticate over
basic authentication More info:https://prometheus.io/docs/operating/configuration/#endpoints'
description: 'BasicAuth allow an endpoint to authenticate over basic authentication More info:https://prometheus.io/docs/operating/configuration/#endpoints'
properties:
password:
description:The secret in the service monitor namespace
that contains the password for authentication.
description:The secret in the service monitor namespace that contains the password for authentication.
properties:
key:
description:The key of the secret to select from. Must
be a valid secret key.
description:The key of the secret to select from. Must be a valid secret key.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind, uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the Secret or its key must
be defined
description:Specify whether the Secret or its key must be defined
type:boolean
required:
- key
type:object
username:
description:The secret in the service monitor namespace
that contains the username for authentication.
description:The secret in the service monitor namespace that contains the username for authentication.
properties:
key:
description:The key of the secret to select from. Must
be a valid secret key.
description:The key of the secret to select from. Must be a valid secret key.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind, uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the Secret or its key must
be defined
description:Specify whether the Secret or its key must be defined
type:boolean
required:
- key
@ -88,79 +73,57 @@ spec:
description:File to read bearer token for scraping targets.
type:string
bearerTokenSecret:
description:Secret to mount to read bearer token for scraping
targets. The secret needs to be in the same namespace as the
service monitor and accessible by the Prometheus Operator.
description:Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator.
properties:
key:
description:The key of the secret to select from. Must
be a valid secret key.
description:The key of the secret to select from. Must be a valid secret key.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind, uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the Secret or its key must
be defined
description:Specify whether the Secret or its key must be defined
type:boolean
required:
- key
type:object
honorLabels:
description:HonorLabels chooses the metric's labels on collisions
with target labels.
description:HonorLabels chooses the metric's labels on collisions with target labels.
description:HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
type:boolean
interval:
description:Interval at which metrics should be scraped
type:string
metricRelabelings:
description:MetricRelabelConfigs to apply to samples before
ingestion.
description:MetricRelabelConfigs to apply to samples before ingestion.
items:
description:'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It
defines `<metric_relabel_configs>`-section of Prometheus
configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description:Action to perform based on regex matching.
Default is 'replace'
description:Action to perform based on regex matching. Default is 'replace'
type:string
modulus:
description:Modulus to take of the hash of the source
label values.
description:Modulus to take of the hash of the source label values.
format:int64
type:integer
regex:
description:Regular expression against which the extracted
value is matched. Default is '(.*)'
description:Regular expression against which the extracted value is matched. Default is '(.*)'
type:string
replacement:
description:Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
description:Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'
type:string
separator:
description:Separator placed between concatenated source
label values. default is ';'.
description:Separator placed between concatenated source label values. default is ';'.
type:string
sourceLabels:
description:The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular
expression for the replace, keep, and drop actions.
description:The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.
items:
type:string
type:array
targetLabel:
description:Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
description:Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.
type:string
type:object
type:array
@ -175,56 +138,39 @@ spec:
description:HTTP path to scrape for metrics.
type:string
port:
description:Name of the service port this endpoint refers to.
Mutually exclusive with targetPort.
description:Name of the service port this endpoint refers to. Mutually exclusive with targetPort.
description:ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
type:string
relabelings:
description:'RelabelConfigs to apply to samples before scraping.
More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
description: 'RelabelConfigs to apply to samples before scraping. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
items:
description:'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It
defines `<metric_relabel_configs>`-section of Prometheus
configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description:Action to perform based on regex matching.
Default is 'replace'
description:Action to perform based on regex matching. Default is 'replace'
type:string
modulus:
description:Modulus to take of the hash of the source
label values.
description:Modulus to take of the hash of the source label values.
format:int64
type:integer
regex:
description:Regular expression against which the extracted
value is matched. Default is '(.*)'
description:Regular expression against which the extracted value is matched. Default is '(.*)'
type:string
replacement:
description:Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
description:Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'
type:string
separator:
description:Separator placed between concatenated source
label values. default is ';'.
description:Separator placed between concatenated source label values. default is ';'.
type:string
sourceLabels:
description:The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular
expression for the replace, keep, and drop actions.
description:The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.
items:
type:string
type:array
targetLabel:
description:Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
description:Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.
type:string
type:object
type:array
@ -238,31 +184,25 @@ spec:
anyOf:
- type:integer
- type:string
description:Name or number of the pod port this endpoint refers
to. Mutually exclusive with port.
description:Name or number of the pod port this endpoint refers to. Mutually exclusive with port.
x-kubernetes-int-or-string:true
tlsConfig:
description:TLS configuration to use when scraping the endpoint
properties:
ca:
description:Stuct containing the CA cert to use for the
targets.
description:Stuct containing the CA cert to use for the targets.
properties:
configMap:
description:ConfigMap containing data to use for the
targets.
description:ConfigMap containing data to use for the targets.
properties:
key:
description:The key to select.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind,
uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the ConfigMap or its
key must be defined
description:Specify whether the ConfigMap or its key must be defined
type:boolean
required:
- key
@ -271,45 +211,35 @@ spec:
description:Secret containing data to use for the targets.
properties:
key:
description:The key of the secret to select from. Must
be a valid secret key.
description:The key of the secret to select from. Must be a valid secret key.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind,
uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the Secret or its key
must be defined
description:Specify whether the Secret or its key must be defined
type:boolean
required:
- key
type:object
type:object
caFile:
description:Path to the CA cert in the Prometheus container
to use for the targets.
description:Path to the CA cert in the Prometheus container to use for the targets.
type:string
cert:
description:Struct containing the client cert file for
the targets.
description:Struct containing the client cert file for the targets.
properties:
configMap:
description:ConfigMap containing data to use for the
targets.
description:ConfigMap containing data to use for the targets.
properties:
key:
description:The key to select.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind,
uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the ConfigMap or its
key must be defined
description:Specify whether the ConfigMap or its key must be defined
type:boolean
required:
- key
@ -318,48 +248,38 @@ spec:
description:Secret containing data to use for the targets.
properties:
key:
description:The key of the secret to select from. Must
be a valid secret key.
description:The key of the secret to select from. Must be a valid secret key.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind,
uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the Secret or its key
must be defined
description:Specify whether the Secret or its key must be defined
type:boolean
required:
- key
type:object
type:object
certFile:
description:Path to the client cert file in the Prometheus
container for the targets.
description:Path to the client cert file in the Prometheus container for the targets.
description:Path to the client key file in the Prometheus
container for the targets.
description:Path to the client key file in the Prometheus container for the targets.
type:string
keySecret:
description:Secret containing the client key file for the
targets.
description:Secret containing the client key file for the targets.
properties:
key:
description:The key of the secret to select from. Must
be a valid secret key.
description:The key of the secret to select from. Must be a valid secret key.
type:string
name:
description: 'Name of the referent. More info:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO:Add other useful fields. apiVersion, kind, uid?'
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO:Add other useful fields. apiVersion, kind, uid?'
type:string
optional:
description:Specify whether the Secret or its key must
be defined
description:Specify whether the Secret or its key must be defined
type:boolean
required:
- key
@ -374,12 +294,10 @@ spec:
description:The label to use to retrieve the job name from.
type:string
namespaceSelector:
description:Selector to select which namespaces the Endpoints objects
are discovered from.
description:Selector to select which namespaces the Endpoints objects are discovered from.
properties:
any:
description:Boolean describing whether all namespaces are selected
in contrast to a list restricting them.
description:Boolean describing whether all namespaces are selected in contrast to a list restricting them.
type:boolean
matchNames:
description:List of namespace names.
@ -388,42 +306,30 @@ spec:
type:array
type:object
podTargetLabels:
description:PodTargetLabels transfers labels on the Kubernetes Pod
onto the target.
description:PodTargetLabels transfers labels on the Kubernetes Pod onto the target.
items:
type:string
type:array
sampleLimit:
description:SampleLimit defines per-scrape limit on number of scraped
samples that will be accepted.
description:SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
format:int64
type:integer
selector:
description:Selector to select Endpoints objects.
properties:
matchExpressions:
description:matchExpressions is a list of label selector requirements.
The requirements are ANDed.
description:matchExpressions is a list of label selector requirements. The requirements are ANDed.
items:
description:A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description:A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
properties:
key:
description:key is the label key that the selector applies
to.
description:key is the label key that the selector applies to.
type:string
operator:
description:operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description:operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
type:string
values:
description:values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
merge patch.
description:values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
items:
type:string
type:array
@ -435,16 +341,11 @@ spec:
matchLabels:
additionalProperties:
type:string
description:matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description:matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
type:object
type:object
targetLabels:
description:TargetLabels transfers labels on the Kubernetes Service
onto the target.
description:TargetLabels transfers labels on the Kubernetes Service onto the target.