pub struct PodMonitorPodMetricsEndpointsRelabelings {
pub action: Option<PodMonitorPodMetricsEndpointsRelabelingsAction>,
pub modulus: Option<i64>,
pub regex: Option<String>,
pub replacement: Option<String>,
pub separator: Option<String>,
pub source_labels: Option<Vec<String>>,
pub target_label: Option<String>,
}Expand description
RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
Fields§
§action: Option<PodMonitorPodMetricsEndpointsRelabelingsAction>Action to perform based on the regex matching.
Uppercase and Lowercase actions require Prometheus >= v2.36.0.
DropEqual and KeepEqual actions require Prometheus >= v2.41.0.
Default: “Replace”
modulus: Option<i64>Modulus to take of the hash of the source label values.
Only applicable when the action is HashMod.
regex: Option<String>Regular expression against which the extracted value is matched.
replacement: Option<String>Replacement value against which a Replace action is performed if the regular expression matches.
Regex capture groups are available.
separator: Option<String>Separator is the string between concatenated SourceLabels.
source_labels: Option<Vec<String>>The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.
target_label: Option<String>Label to which the resulting string is written in a replacement.
It is mandatory for Replace, HashMod, Lowercase, Uppercase,
KeepEqual and DropEqual actions.
Regex capture groups are available.
Trait Implementations§
Source§impl Clone for PodMonitorPodMetricsEndpointsRelabelings
impl Clone for PodMonitorPodMetricsEndpointsRelabelings
Source§fn clone(&self) -> PodMonitorPodMetricsEndpointsRelabelings
fn clone(&self) -> PodMonitorPodMetricsEndpointsRelabelings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for PodMonitorPodMetricsEndpointsRelabelings
impl<'de> Deserialize<'de> for PodMonitorPodMetricsEndpointsRelabelings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PodMonitorPodMetricsEndpointsRelabelings
impl JsonSchema for PodMonitorPodMetricsEndpointsRelabelings
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for PodMonitorPodMetricsEndpointsRelabelings
impl RefUnwindSafe for PodMonitorPodMetricsEndpointsRelabelings
impl Send for PodMonitorPodMetricsEndpointsRelabelings
impl Sync for PodMonitorPodMetricsEndpointsRelabelings
impl Unpin for PodMonitorPodMetricsEndpointsRelabelings
impl UnwindSafe for PodMonitorPodMetricsEndpointsRelabelings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more