Class PodMonitorSpec
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.PodMonitorSpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<PodMonitorSpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class PodMonitorSpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<PodMonitorSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
PodMonitorSpec contains specification parameters for a PodMonitor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PodMonitorSpec()No args constructor for use in serializationPodMonitorSpec(AttachMetadata attachMetadata, String bodySizeLimit, Boolean convertClassicHistogramsToNHCB, String fallbackScrapeProtocol, String jobLabel, Long keepDroppedTargets, Long labelLimit, Long labelNameLengthLimit, Long labelValueLengthLimit, NamespaceSelector namespaceSelector, Long nativeHistogramBucketLimit, io.fabric8.kubernetes.api.model.Quantity nativeHistogramMinBucketFactor, List<PodMetricsEndpoint> podMetricsEndpoints, List<String> podTargetLabels, Long sampleLimit, String scrapeClass, Boolean scrapeClassicHistograms, List<String> scrapeProtocols, io.fabric8.kubernetes.api.model.LabelSelector selector, String selectorMechanism, Long targetLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodMonitorSpecBuilderedit()Map<String,Object>getAdditionalProperties()AttachMetadatagetAttachMetadata()PodMonitorSpec contains specification parameters for a PodMonitor.StringgetBodySizeLimit()When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus.BooleangetConvertClassicHistogramsToNHCB()Whether to convert all scraped classic histograms into a native histogram with custom buckets.StringgetFallbackScrapeProtocol()The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.StringgetJobLabel()The label to use to retrieve the job name from.LonggetKeepDroppedTargets()Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.LonggetLabelLimit()Per-scrape limit on number of labels that will be accepted for a sample.LonggetLabelNameLengthLimit()Per-scrape limit on length of labels name that will be accepted for a sample.LonggetLabelValueLengthLimit()Per-scrape limit on length of labels value that will be accepted for a sample.NamespaceSelectorgetNamespaceSelector()PodMonitorSpec contains specification parameters for a PodMonitor.LonggetNativeHistogramBucketLimit()If there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit.io.fabric8.kubernetes.api.model.QuantitygetNativeHistogramMinBucketFactor()PodMonitorSpec contains specification parameters for a PodMonitor.List<PodMetricsEndpoint>getPodMetricsEndpoints()Defines how to scrape metrics from the selected pods.List<String>getPodTargetLabels()`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics.LonggetSampleLimit()`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted.StringgetScrapeClass()The scrape class to apply.BooleangetScrapeClassicHistograms()Whether to scrape a classic histogram that is also exposed as a native histogram.List<String>getScrapeProtocols()`scrapeProtocols` defines the protocols to negotiate during a scrape.io.fabric8.kubernetes.api.model.LabelSelectorgetSelector()PodMonitorSpec contains specification parameters for a PodMonitor.StringgetSelectorMechanism()Mechanism used to select the endpoints to scrape.LonggetTargetLimit()`targetLimit` defines a limit on the number of scraped targets that will be accepted.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAttachMetadata(AttachMetadata attachMetadata)PodMonitorSpec contains specification parameters for a PodMonitor.voidsetBodySizeLimit(String bodySizeLimit)When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus.voidsetConvertClassicHistogramsToNHCB(Boolean convertClassicHistogramsToNHCB)Whether to convert all scraped classic histograms into a native histogram with custom buckets.voidsetFallbackScrapeProtocol(String fallbackScrapeProtocol)The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.voidsetJobLabel(String jobLabel)The label to use to retrieve the job name from.voidsetKeepDroppedTargets(Long keepDroppedTargets)Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.voidsetLabelLimit(Long labelLimit)Per-scrape limit on number of labels that will be accepted for a sample.voidsetLabelNameLengthLimit(Long labelNameLengthLimit)Per-scrape limit on length of labels name that will be accepted for a sample.voidsetLabelValueLengthLimit(Long labelValueLengthLimit)Per-scrape limit on length of labels value that will be accepted for a sample.voidsetNamespaceSelector(NamespaceSelector namespaceSelector)PodMonitorSpec contains specification parameters for a PodMonitor.voidsetNativeHistogramBucketLimit(Long nativeHistogramBucketLimit)If there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit.voidsetNativeHistogramMinBucketFactor(io.fabric8.kubernetes.api.model.Quantity nativeHistogramMinBucketFactor)PodMonitorSpec contains specification parameters for a PodMonitor.voidsetPodMetricsEndpoints(List<PodMetricsEndpoint> podMetricsEndpoints)Defines how to scrape metrics from the selected pods.voidsetPodTargetLabels(List<String> podTargetLabels)`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics.voidsetSampleLimit(Long sampleLimit)`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted.voidsetScrapeClass(String scrapeClass)The scrape class to apply.voidsetScrapeClassicHistograms(Boolean scrapeClassicHistograms)Whether to scrape a classic histogram that is also exposed as a native histogram.voidsetScrapeProtocols(List<String> scrapeProtocols)`scrapeProtocols` defines the protocols to negotiate during a scrape.voidsetSelector(io.fabric8.kubernetes.api.model.LabelSelector selector)PodMonitorSpec contains specification parameters for a PodMonitor.voidsetSelectorMechanism(String selectorMechanism)Mechanism used to select the endpoints to scrape.voidsetTargetLimit(Long targetLimit)`targetLimit` defines a limit on the number of scraped targets that will be accepted.PodMonitorSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
PodMonitorSpec
public PodMonitorSpec()
No args constructor for use in serialization
-
PodMonitorSpec
public PodMonitorSpec(AttachMetadata attachMetadata, String bodySizeLimit, Boolean convertClassicHistogramsToNHCB, String fallbackScrapeProtocol, String jobLabel, Long keepDroppedTargets, Long labelLimit, Long labelNameLengthLimit, Long labelValueLengthLimit, NamespaceSelector namespaceSelector, Long nativeHistogramBucketLimit, io.fabric8.kubernetes.api.model.Quantity nativeHistogramMinBucketFactor, List<PodMetricsEndpoint> podMetricsEndpoints, List<String> podTargetLabels, Long sampleLimit, String scrapeClass, Boolean scrapeClassicHistograms, List<String> scrapeProtocols, io.fabric8.kubernetes.api.model.LabelSelector selector, String selectorMechanism, Long targetLimit)
-
-
Method Detail
-
getAttachMetadata
public AttachMetadata getAttachMetadata()
PodMonitorSpec contains specification parameters for a PodMonitor.
-
setAttachMetadata
public void setAttachMetadata(AttachMetadata attachMetadata)
PodMonitorSpec contains specification parameters for a PodMonitor.
-
getBodySizeLimit
public String getBodySizeLimit()
When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus.It requires Prometheus >= v2.28.0.
-
setBodySizeLimit
public void setBodySizeLimit(String bodySizeLimit)
When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus.It requires Prometheus >= v2.28.0.
-
getConvertClassicHistogramsToNHCB
public Boolean getConvertClassicHistogramsToNHCB()
Whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.
-
setConvertClassicHistogramsToNHCB
public void setConvertClassicHistogramsToNHCB(Boolean convertClassicHistogramsToNHCB)
Whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.
-
getFallbackScrapeProtocol
public String getFallbackScrapeProtocol()
The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.It requires Prometheus >= v3.0.0.
-
setFallbackScrapeProtocol
public void setFallbackScrapeProtocol(String fallbackScrapeProtocol)
The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.It requires Prometheus >= v3.0.0.
-
getJobLabel
public String getJobLabel()
The label to use to retrieve the job name from. `jobLabel` selects the label from the associated Kubernetes `Pod` object which will be used as the `job` label for all metrics.For example if `jobLabel` is set to `foo` and the Kubernetes `Pod` object is labeled with `foo: bar`, then Prometheus adds the `job="bar"` label to all ingested metrics.
If the value of this field is empty, the `job` label of the metrics defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`).
-
setJobLabel
public void setJobLabel(String jobLabel)
The label to use to retrieve the job name from. `jobLabel` selects the label from the associated Kubernetes `Pod` object which will be used as the `job` label for all metrics.For example if `jobLabel` is set to `foo` and the Kubernetes `Pod` object is labeled with `foo: bar`, then Prometheus adds the `job="bar"` label to all ingested metrics.
If the value of this field is empty, the `job` label of the metrics defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`).
-
getKeepDroppedTargets
public Long getKeepDroppedTargets()
Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.It requires Prometheus >= v2.47.0.
-
setKeepDroppedTargets
public void setKeepDroppedTargets(Long keepDroppedTargets)
Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.It requires Prometheus >= v2.47.0.
-
getLabelLimit
public Long getLabelLimit()
Per-scrape limit on number of labels that will be accepted for a sample.It requires Prometheus >= v2.27.0.
-
setLabelLimit
public void setLabelLimit(Long labelLimit)
Per-scrape limit on number of labels that will be accepted for a sample.It requires Prometheus >= v2.27.0.
-
getLabelNameLengthLimit
public Long getLabelNameLengthLimit()
Per-scrape limit on length of labels name that will be accepted for a sample.It requires Prometheus >= v2.27.0.
-
setLabelNameLengthLimit
public void setLabelNameLengthLimit(Long labelNameLengthLimit)
Per-scrape limit on length of labels name that will be accepted for a sample.It requires Prometheus >= v2.27.0.
-
getLabelValueLengthLimit
public Long getLabelValueLengthLimit()
Per-scrape limit on length of labels value that will be accepted for a sample.It requires Prometheus >= v2.27.0.
-
setLabelValueLengthLimit
public void setLabelValueLengthLimit(Long labelValueLengthLimit)
Per-scrape limit on length of labels value that will be accepted for a sample.It requires Prometheus >= v2.27.0.
-
getNamespaceSelector
public NamespaceSelector getNamespaceSelector()
PodMonitorSpec contains specification parameters for a PodMonitor.
-
setNamespaceSelector
public void setNamespaceSelector(NamespaceSelector namespaceSelector)
PodMonitorSpec contains specification parameters for a PodMonitor.
-
getNativeHistogramBucketLimit
public Long getNativeHistogramBucketLimit()
If there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.
-
setNativeHistogramBucketLimit
public void setNativeHistogramBucketLimit(Long nativeHistogramBucketLimit)
If there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.
-
getNativeHistogramMinBucketFactor
public io.fabric8.kubernetes.api.model.Quantity getNativeHistogramMinBucketFactor()
PodMonitorSpec contains specification parameters for a PodMonitor.
-
setNativeHistogramMinBucketFactor
public void setNativeHistogramMinBucketFactor(io.fabric8.kubernetes.api.model.Quantity nativeHistogramMinBucketFactor)
PodMonitorSpec contains specification parameters for a PodMonitor.
-
getPodMetricsEndpoints
public List<PodMetricsEndpoint> getPodMetricsEndpoints()
Defines how to scrape metrics from the selected pods.
-
setPodMetricsEndpoints
public void setPodMetricsEndpoints(List<PodMetricsEndpoint> podMetricsEndpoints)
Defines how to scrape metrics from the selected pods.
-
getPodTargetLabels
public List<String> getPodTargetLabels()
`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics.
-
setPodTargetLabels
public void setPodTargetLabels(List<String> podTargetLabels)
`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics.
-
getSampleLimit
public Long getSampleLimit()
`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted.
-
setSampleLimit
public void setSampleLimit(Long sampleLimit)
`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted.
-
getScrapeClass
public String getScrapeClass()
The scrape class to apply.
-
setScrapeClass
public void setScrapeClass(String scrapeClass)
The scrape class to apply.
-
getScrapeClassicHistograms
public Boolean getScrapeClassicHistograms()
Whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.
-
setScrapeClassicHistograms
public void setScrapeClassicHistograms(Boolean scrapeClassicHistograms)
Whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.
-
getScrapeProtocols
public List<String> getScrapeProtocols()
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred).If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
-
setScrapeProtocols
public void setScrapeProtocols(List<String> scrapeProtocols)
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred).If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
-
getSelector
public io.fabric8.kubernetes.api.model.LabelSelector getSelector()
PodMonitorSpec contains specification parameters for a PodMonitor.
-
setSelector
public void setSelector(io.fabric8.kubernetes.api.model.LabelSelector selector)
PodMonitorSpec contains specification parameters for a PodMonitor.
-
getSelectorMechanism
public String getSelectorMechanism()
Mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated.It requires Prometheus >= v2.17.0.
-
setSelectorMechanism
public void setSelectorMechanism(String selectorMechanism)
Mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated.It requires Prometheus >= v2.17.0.
-
getTargetLimit
public Long getTargetLimit()
`targetLimit` defines a limit on the number of scraped targets that will be accepted.
-
setTargetLimit
public void setTargetLimit(Long targetLimit)
`targetLimit` defines a limit on the number of scraped targets that will be accepted.
-
edit
public PodMonitorSpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<PodMonitorSpecBuilder>
-
toBuilder
public PodMonitorSpecBuilder toBuilder()
-
-