1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

Merge pull request from simonpasquier/custom-sharding-label

feat: support custom sharding label
This commit is contained in:
Simon Pasquier 2024-11-21 10:48:54 +01:00 committed by GitHub
commit 6c0ee036c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
135 changed files with 1140 additions and 106 deletions
Documentation
bundle.yaml
example
jsonnet/prometheus-operator
pkg
apis/monitoring/v1
prometheus
promcfg.go
testdata
AdditionalScrapeConfigs_sharded prometheus.goldenBodySizeLimits_enforce0MB_v2.28.0.goldenBodySizeLimits_enforce1000MB_v2.28.0.goldenBodySizeLimits_enforce2GB_v2.28.0.goldenBodySizeLimits_enforce_v2.27.0.goldenEmptyEndpointPorts.goldenEnforcedNamespaceLabelOnExcludedPodMonitor_Expected.goldenEnforcedNamespaceLabelOnExcludedServiceMonitor_Expected.goldenEnforcedNamespaceLabelPodMonitor_Expected.goldenEnforcedNamespaceLabelServiceMonitor_Expected.goldenGenerateRelabelConfig.goldenHonorLabelsOverriding.goldenHonorTimestampsOverriding.goldenKeepDroppedTargets.goldenKeepDroppedTargetsNotAddedInConfig.goldenKeepDroppedTargetsOverridedWithEnforcedValue.goldenLabelLimits_Limit2000_v2.26.0_enforceLimit1000.goldenLabelLimits_Limit2000_v2.27.0_enforceLimit1000.goldenLabelLimits_Limit500_v2.26.0_enforceLimit1000.goldenLabelLimits_Limit500_v2.27.0_enforceLimit1000.goldenLabelLimits_NoLimit_v2.26.0.goldenLabelLimits_NoLimit_v2.26.0_enforceLimit1000.goldenLabelLimits_NoLimit_v2.27.0.goldenLabelLimits_NoLimit_v2.27.0_enforceLimit1000.goldenLabelNameLengthLimits_Limit-1_Enforc1000_v2.26.0.goldenLabelNameLengthLimits_Limit-1_Enforce-1_v2.26.0.goldenLabelNameLengthLimits_Limit-1_Enforce-1_v2.27.0.goldenLabelNameLengthLimits_Limit-1_Enforce1000_v2.27.0.goldenLabelNameLengthLimits_Limit2000_Enforce1000_v2.26.0.goldenLabelNameLengthLimits_Limit2000_Enforce1000_v2.27.0.goldenLabelNameLengthLimits_Limit500_Enforce1000_v2.26.0.goldenLabelNameLengthLimits_Limit500_Enforce1000_v2.27.0.goldenLabelValueLengthLimits_Enforce-1_LabelValue-1_v2.26.0.goldenLabelValueLengthLimits_Enforce-1_LabelValue-1_v2.27.0.goldenLabelValueLengthLimits_Enforce1000_LabelValue-1_v2.26.0.goldenLabelValueLengthLimits_Enforce1000_LabelValue-1_v2.27.0.goldenLabelValueLengthLimits_Enforce1000_LabelValue2000_v2.26.0.goldenLabelValueLengthLimits_Enforce1000_LabelValue2000_v2.27.0.goldenLabelValueLengthLimits_Enforce1000_LabelValue500_v2.26.0.goldenLabelValueLengthLimits_Enforce1000_LabelValue500_v2.27.0.goldenMatchExpressionsServiceMonitor.goldenNativeHistogramConfig.goldenNativeHistogramConfigAlwaysScrapeClassicHistograms.goldenNativeHistogramConfigWithMissALL.goldenNativeHistogramConfigWithMissNativeHistogramMinBucketFactor.goldenNoEnforcedNamespaceLabelServiceMonitor_Expected.goldenPodMonitorEndpointEnableHttp2_EnableHTTP2False_v2.34.0.goldenPodMonitorEndpointEnableHttp2_EnableHTTP2False_v2.35.0.goldenPodMonitorEndpointEnableHttp2_EnableHTTP2True_v2.34.0.goldenPodMonitorEndpointEnableHttp2_EnableHTTP2True_v2.35.0.goldenPodMonitorEndpointFollowRedirects_FollowRedirectsFalse_v2.25.0.goldenPodMonitorEndpointFollowRedirects_FollowRedirectsFalse_v2.28.0.goldenPodMonitorEndpointFollowRedirects_FollowRedirectsTrue_v2.25.0.goldenPodMonitorEndpointFollowRedirects_FollowRedirectsTrue_v2.28.0.goldenPodMonitorPhaseFilter.goldenPodTargetLabels.goldenPodTargetLabelsFromPodMonitor.goldenPodTargetLabelsFromPodMonitorAndGlobal.goldenProbeIngressSDConfigGeneration.goldenProbeIngressSDConfigGenerationWithLabelEnforce.goldenProbeIngressSDConfigGenerationWithShards.goldenProbeSpecConfig_empty_probe.goldenProbeSpecConfig_module_config.goldenProbeSpecConfig_prober_spec.goldenProbeSpecConfig_targets_static_config.goldenProbeStaticTargetsConfigGenerationWithJobName.goldenProbeStaticTargetsConfigGenerationWithLabelEnforce.goldenProbeStaticTargetsConfigGenerationWithoutModule.goldenSampleLimits_GlobalLimit-1_Enforce-2000-Limit-500-2.21.goldenSampleLimits_GlobalLimit1000_Enforce-1-2.21.goldenSampleLimits_GlobalLimit1000_Enforce2000-2.21.goldenSampleLimits_GlobalLimit1000_Enforce2000.goldenSampleLimits_Limit-1.goldenSampleLimits_Limit2000.goldenSampleLimits_Limit500.goldenSampleLimits_NoLimit.goldenScrapeConfigSpecConfig_Sharded.goldenServiceMonitorEndpointEnableHttp2_EnableHTTP2False_v2.34.0.goldenServiceMonitorEndpointEnableHttp2_EnableHTTP2False_v2.35.0.goldenServiceMonitorEndpointEnableHttp2_EnableHTTP2True_v2.34.0.goldenServiceMonitorEndpointEnableHttp2_EnableHTTP2True_v2.35.0.goldenServiceMonitorEndpointFollowRedirects_FollowRedirectFalse_v2.25.0.goldenServiceMonitorEndpointFollowRedirects_FollowRedirectFalse_v2.28.0.goldenServiceMonitorEndpointFollowRedirects_FollowRedirectTrue_v2.25.0.goldenServiceMonitorEndpointFollowRedirects_FollowRedirectTrue_v2.28.0.goldenSettingHonorLabels.goldenSettingHonorTimestampsInPodMonitor.goldenSettingHonorTimestampsInServiceMonitor.goldenSettingScrapeProtocolsInPodMonitor_NewVersion.goldenSettingScrapeProtocolsInPodMonitor_OldVersion.golden

105
Documentation/api.md generated
View file

@ -1883,16 +1883,23 @@ int32
</td>
<td>
<em>(Optional)</em>
<p>Number of shards to distribute targets onto. <code>spec.replicas</code>
multiplied by <code>spec.shards</code> is the total number of Pods created.</p>
<p>Note that scaling down shards will not reshard data onto remaining
<p>Number of shards to distribute scraped targets onto.</p>
<p><code>spec.replicas</code> multiplied by <code>spec.shards</code> is the total number of Pods
being created.</p>
<p>When not defined, the operator assumes only one shard.</p>
<p>Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.</p>
<p>Sharding is performed on the content of the <code>__address__</code> target meta-label
for PodMonitors and ServiceMonitors and <code>__param_target__</code> for Probes.</p>
<p>Default: 1</p>
remote write data to a central location.
Alerting and recording rules</p>
<p>By default, the sharding is performed on:
* The <code>__address__</code> target&rsquo;s metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The <code>__param_target__</code> label for Probe resources.</p>
<p>Users can define their own sharding implementation by setting the
<code>__tmp_hash</code> label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).</p>
</td>
</tr>
<tr>
@ -6918,16 +6925,23 @@ int32
</td>
<td>
<em>(Optional)</em>
<p>Number of shards to distribute targets onto. <code>spec.replicas</code>
multiplied by <code>spec.shards</code> is the total number of Pods created.</p>
<p>Note that scaling down shards will not reshard data onto remaining
<p>Number of shards to distribute scraped targets onto.</p>
<p><code>spec.replicas</code> multiplied by <code>spec.shards</code> is the total number of Pods
being created.</p>
<p>When not defined, the operator assumes only one shard.</p>
<p>Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.</p>
<p>Sharding is performed on the content of the <code>__address__</code> target meta-label
for PodMonitors and ServiceMonitors and <code>__param_target__</code> for Probes.</p>
<p>Default: 1</p>
remote write data to a central location.
Alerting and recording rules</p>
<p>By default, the sharding is performed on:
* The <code>__address__</code> target&rsquo;s metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The <code>__param_target__</code> label for Probe resources.</p>
<p>Users can define their own sharding implementation by setting the
<code>__tmp_hash</code> label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).</p>
</td>
</tr>
<tr>
@ -11740,16 +11754,23 @@ int32
</td>
<td>
<em>(Optional)</em>
<p>Number of shards to distribute targets onto. <code>spec.replicas</code>
multiplied by <code>spec.shards</code> is the total number of Pods created.</p>
<p>Note that scaling down shards will not reshard data onto remaining
<p>Number of shards to distribute scraped targets onto.</p>
<p><code>spec.replicas</code> multiplied by <code>spec.shards</code> is the total number of Pods
being created.</p>
<p>When not defined, the operator assumes only one shard.</p>
<p>Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.</p>
<p>Sharding is performed on the content of the <code>__address__</code> target meta-label
for PodMonitors and ServiceMonitors and <code>__param_target__</code> for Probes.</p>
<p>Default: 1</p>
remote write data to a central location.
Alerting and recording rules</p>
<p>By default, the sharding is performed on:
* The <code>__address__</code> target&rsquo;s metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The <code>__param_target__</code> label for Probe resources.</p>
<p>Users can define their own sharding implementation by setting the
<code>__tmp_hash</code> label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).</p>
</td>
</tr>
<tr>
@ -18433,16 +18454,23 @@ int32
</td>
<td>
<em>(Optional)</em>
<p>Number of shards to distribute targets onto. <code>spec.replicas</code>
multiplied by <code>spec.shards</code> is the total number of Pods created.</p>
<p>Note that scaling down shards will not reshard data onto remaining
<p>Number of shards to distribute scraped targets onto.</p>
<p><code>spec.replicas</code> multiplied by <code>spec.shards</code> is the total number of Pods
being created.</p>
<p>When not defined, the operator assumes only one shard.</p>
<p>Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.</p>
<p>Sharding is performed on the content of the <code>__address__</code> target meta-label
for PodMonitors and ServiceMonitors and <code>__param_target__</code> for Probes.</p>
<p>Default: 1</p>
remote write data to a central location.
Alerting and recording rules</p>
<p>By default, the sharding is performed on:
* The <code>__address__</code> target&rsquo;s metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The <code>__param_target__</code> label for Probe resources.</p>
<p>Users can define their own sharding implementation by setting the
<code>__tmp_hash</code> label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).</p>
</td>
</tr>
<tr>
@ -26348,16 +26376,23 @@ int32
</td>
<td>
<em>(Optional)</em>
<p>Number of shards to distribute targets onto. <code>spec.replicas</code>
multiplied by <code>spec.shards</code> is the total number of Pods created.</p>
<p>Note that scaling down shards will not reshard data onto remaining
<p>Number of shards to distribute scraped targets onto.</p>
<p><code>spec.replicas</code> multiplied by <code>spec.shards</code> is the total number of Pods
being created.</p>
<p>When not defined, the operator assumes only one shard.</p>
<p>Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.</p>
<p>Sharding is performed on the content of the <code>__address__</code> target meta-label
for PodMonitors and ServiceMonitors and <code>__param_target__</code> for Probes.</p>
<p>Default: 1</p>
remote write data to a central location.
Alerting and recording rules</p>
<p>By default, the sharding is performed on:
* The <code>__address__</code> target&rsquo;s metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The <code>__param_target__</code> label for Probe resources.</p>
<p>Users can define their own sharding implementation by setting the
<code>__tmp_hash</code> label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).</p>
</td>
</tr>
<tr>

42
bundle.yaml generated
View file

@ -28165,19 +28165,28 @@ spec:
x-kubernetes-map-type: atomic
shards:
description: |-
Number of shards to distribute targets onto. `spec.replicas`
multiplied by `spec.shards` is the total number of Pods created.
Number of shards to distribute scraped targets onto.
Note that scaling down shards will not reshard data onto remaining
`spec.replicas` multiplied by `spec.shards` is the total number of Pods
being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.
Alerting and recording rules
Sharding is performed on the content of the `__address__` target meta-label
for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
By default, the sharding is performed on:
* The `__address__` target's metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The `__param_target__` label for Probe resources.
Default: 1
Users can define their own sharding implementation by setting the
`__tmp_hash` label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).
format: int32
type: integer
storage:
@ -40476,19 +40485,28 @@ spec:
type: string
shards:
description: |-
Number of shards to distribute targets onto. `spec.replicas`
multiplied by `spec.shards` is the total number of Pods created.
Number of shards to distribute scraped targets onto.
Note that scaling down shards will not reshard data onto remaining
`spec.replicas` multiplied by `spec.shards` is the total number of Pods
being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.
Alerting and recording rules
Sharding is performed on the content of the `__address__` target meta-label
for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
By default, the sharding is performed on:
* The `__address__` target's metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The `__param_target__` label for Probe resources.
Default: 1
Users can define their own sharding implementation by setting the
`__tmp_hash` label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).
format: int32
type: integer
storage:

View file

@ -7198,19 +7198,28 @@ spec:
x-kubernetes-map-type: atomic
shards:
description: |-
Number of shards to distribute targets onto. `spec.replicas`
multiplied by `spec.shards` is the total number of Pods created.
Number of shards to distribute scraped targets onto.
Note that scaling down shards will not reshard data onto remaining
`spec.replicas` multiplied by `spec.shards` is the total number of Pods
being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.
Alerting and recording rules
Sharding is performed on the content of the `__address__` target meta-label
for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
By default, the sharding is performed on:
* The `__address__` target's metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The `__param_target__` label for Probe resources.
Default: 1
Users can define their own sharding implementation by setting the
`__tmp_hash` label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).
format: int32
type: integer
storage:

View file

@ -8849,19 +8849,28 @@ spec:
type: string
shards:
description: |-
Number of shards to distribute targets onto. `spec.replicas`
multiplied by `spec.shards` is the total number of Pods created.
Number of shards to distribute scraped targets onto.
Note that scaling down shards will not reshard data onto remaining
`spec.replicas` multiplied by `spec.shards` is the total number of Pods
being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.
Alerting and recording rules
Sharding is performed on the content of the `__address__` target meta-label
for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
By default, the sharding is performed on:
* The `__address__` target's metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The `__param_target__` label for Probe resources.
Default: 1
Users can define their own sharding implementation by setting the
`__tmp_hash` label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).
format: int32
type: integer
storage:

View file

@ -7199,19 +7199,28 @@ spec:
x-kubernetes-map-type: atomic
shards:
description: |-
Number of shards to distribute targets onto. `spec.replicas`
multiplied by `spec.shards` is the total number of Pods created.
Number of shards to distribute scraped targets onto.
Note that scaling down shards will not reshard data onto remaining
`spec.replicas` multiplied by `spec.shards` is the total number of Pods
being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.
Alerting and recording rules
Sharding is performed on the content of the `__address__` target meta-label
for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
By default, the sharding is performed on:
* The `__address__` target's metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The `__param_target__` label for Probe resources.
Default: 1
Users can define their own sharding implementation by setting the
`__tmp_hash` label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).
format: int32
type: integer
storage:

View file

@ -8850,19 +8850,28 @@ spec:
type: string
shards:
description: |-
Number of shards to distribute targets onto. `spec.replicas`
multiplied by `spec.shards` is the total number of Pods created.
Number of shards to distribute scraped targets onto.
Note that scaling down shards will not reshard data onto remaining
`spec.replicas` multiplied by `spec.shards` is the total number of Pods
being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining
instances, it must be manually moved. Increasing shards will not reshard
data either but it will continue to be available from the same
instances. To query globally, use Thanos sidecar and Thanos querier or
remote write data to a central location.
Alerting and recording rules
Sharding is performed on the content of the `__address__` target meta-label
for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
By default, the sharding is performed on:
* The `__address__` target's metadata label for PodMonitor,
ServiceMonitor and ScrapeConfig resources.
* The `__param_target__` label for Probe resources.
Default: 1
Users can define their own sharding implementation by setting the
`__tmp_hash` label during the target discovery with relabeling
configuration (either in the monitoring resources or via scrape class).
format: int32
type: integer
storage:

View file

@ -6118,7 +6118,7 @@
"x-kubernetes-map-type": "atomic"
},
"shards": {
"description": "Number of shards to distribute targets onto. `spec.replicas`\nmultiplied by `spec.shards` is the total number of Pods created.\n\nNote that scaling down shards will not reshard data onto remaining\ninstances, it must be manually moved. Increasing shards will not reshard\ndata either but it will continue to be available from the same\ninstances. To query globally, use Thanos sidecar and Thanos querier or\nremote write data to a central location.\n\nSharding is performed on the content of the `__address__` target meta-label\nfor PodMonitors and ServiceMonitors and `__param_target__` for Probes.\n\nDefault: 1",
"description": "Number of shards to distribute scraped targets onto.\n\n`spec.replicas` multiplied by `spec.shards` is the total number of Pods\nbeing created.\n\nWhen not defined, the operator assumes only one shard.\n\nNote that scaling down shards will not reshard data onto the remaining\ninstances, it must be manually moved. Increasing shards will not reshard\ndata either but it will continue to be available from the same\ninstances. To query globally, use Thanos sidecar and Thanos querier or\nremote write data to a central location.\nAlerting and recording rules\n\nBy default, the sharding is performed on:\n* The `__address__` target's metadata label for PodMonitor,\nServiceMonitor and ScrapeConfig resources.\n* The `__param_target__` label for Probe resources.\n\nUsers can define their own sharding implementation by setting the\n`__tmp_hash` label during the target discovery with relabeling\nconfiguration (either in the monitoring resources or via scrape class).",
"format": "int32",
"type": "integer"
},

View file

@ -7580,7 +7580,7 @@
"type": "string"
},
"shards": {
"description": "Number of shards to distribute targets onto. `spec.replicas`\nmultiplied by `spec.shards` is the total number of Pods created.\n\nNote that scaling down shards will not reshard data onto remaining\ninstances, it must be manually moved. Increasing shards will not reshard\ndata either but it will continue to be available from the same\ninstances. To query globally, use Thanos sidecar and Thanos querier or\nremote write data to a central location.\n\nSharding is performed on the content of the `__address__` target meta-label\nfor PodMonitors and ServiceMonitors and `__param_target__` for Probes.\n\nDefault: 1",
"description": "Number of shards to distribute scraped targets onto.\n\n`spec.replicas` multiplied by `spec.shards` is the total number of Pods\nbeing created.\n\nWhen not defined, the operator assumes only one shard.\n\nNote that scaling down shards will not reshard data onto the remaining\ninstances, it must be manually moved. Increasing shards will not reshard\ndata either but it will continue to be available from the same\ninstances. To query globally, use Thanos sidecar and Thanos querier or\nremote write data to a central location.\nAlerting and recording rules\n\nBy default, the sharding is performed on:\n* The `__address__` target's metadata label for PodMonitor,\nServiceMonitor and ScrapeConfig resources.\n* The `__param_target__` label for Probe resources.\n\nUsers can define their own sharding implementation by setting the\n`__tmp_hash` label during the target discovery with relabeling\nconfiguration (either in the monitoring resources or via scrape class).",
"format": "int32",
"type": "integer"
},

View file

@ -241,19 +241,30 @@ type CommonPrometheusFields struct {
// Default: 1
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// Number of shards to distribute targets onto. `spec.replicas`
// multiplied by `spec.shards` is the total number of Pods created.
// Number of shards to distribute scraped targets onto.
//
// Note that scaling down shards will not reshard data onto remaining
// `spec.replicas` multiplied by `spec.shards` is the total number of Pods
// being created.
//
// When not defined, the operator assumes only one shard.
//
// Note that scaling down shards will not reshard data onto the remaining
// instances, it must be manually moved. Increasing shards will not reshard
// data either but it will continue to be available from the same
// instances. To query globally, use Thanos sidecar and Thanos querier or
// remote write data to a central location.
// Alerting and recording rules
//
// Sharding is performed on the content of the `__address__` target meta-label
// for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
// By default, the sharding is performed on:
// * The `__address__` target's metadata label for PodMonitor,
// ServiceMonitor and ScrapeConfig resources.
// * The `__param_target__` label for Probe resources.
//
// Users can define their own sharding implementation by setting the
// `__tmp_hash` label during the target discovery with relabeling
// configuration (either in the monitoring resources or via scrape class).
//
// Default: 1
// +optional
Shards *int32 `json:"shards,omitempty"`

View file

@ -52,6 +52,8 @@ const (
defaultPrometheusExternalLabelName = "prometheus"
defaultReplicaExternalLabelName = "prometheus_replica"
hashLabelNameForSharding = "__tmp_hash"
)
var invalidLabelCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`)
@ -1368,7 +1370,7 @@ func (cg *ConfigGenerator) generatePodMonitorConfig(
// DaemonSet mode doesn't support sharding.
if !cg.daemonSet {
relabelings = generateAddressShardingRelabelingRules(relabelings, shards)
relabelings = appendShardingRelabelingWithAddress(relabelings, shards)
}
cfg = append(cfg, yaml.MapItem{Key: "relabel_configs", Value: relabelings})
@ -1612,7 +1614,7 @@ func (cg *ConfigGenerator) generateProbeConfig(
relabelings = append(relabelings, generateRelabelConfig(labeler.GetRelabelingConfigs(m.TypeMeta, m.ObjectMeta, m.Spec.Targets.Ingress.RelabelConfigs))...)
}
relabelings = generateAddressShardingRelabelingRulesForProbes(relabelings, shards)
relabelings = appendShardingRelabelingForProbes(relabelings, shards)
cfg = append(cfg, yaml.MapItem{Key: "relabel_configs", Value: relabelings})
cfg = cg.addTLStoYaml(cfg, s, mergeSafeTLSConfigWithScrapeClass(m.Spec.TLSConfig, scrapeClass))
@ -1889,7 +1891,7 @@ func (cg *ConfigGenerator) generateServiceMonitorConfig(
labeler := namespacelabeler.New(cpf.EnforcedNamespaceLabel, cpf.ExcludedFromEnforcement, false)
relabelings = append(relabelings, generateRelabelConfig(labeler.GetRelabelingConfigs(m.TypeMeta, m.ObjectMeta, ep.RelabelConfigs))...)
relabelings = generateAddressShardingRelabelingRules(relabelings, shards)
relabelings = appendShardingRelabelingWithAddress(relabelings, shards)
cfg = append(cfg, yaml.MapItem{Key: "relabel_configs", Value: relabelings})
cfg = cg.AddLimitsToYAML(cfg, sampleLimitKey, m.Spec.SampleLimit, cpf.EnforcedSampleLimit)
@ -1945,11 +1947,15 @@ func (cg *ConfigGenerator) getLimit(user *uint64, enforced *uint64) *uint64 {
return enforced
}
func generateAddressShardingRelabelingRules(relabelings []yaml.MapSlice, shards int32) []yaml.MapSlice {
return generateAddressShardingRelabelingRulesWithSourceLabel(relabelings, shards, "__address__")
func appendShardingRelabelingWithAddress(relabelings []yaml.MapSlice, shards int32) []yaml.MapSlice {
return appendShardingRelabelingWithLabel(relabelings, shards, "__address__")
}
func (cg *ConfigGenerator) generateAddressShardingRelabelingRulesIfMissing(relabelings []yaml.MapSlice, shards int32) []yaml.MapSlice {
func appendShardingRelabelingForProbes(relabelings []yaml.MapSlice, shards int32) []yaml.MapSlice {
return appendShardingRelabelingWithLabel(relabelings, shards, "__param_target")
}
func (cg *ConfigGenerator) appendShardingRelabelingWithAddressIfMissing(relabelings []yaml.MapSlice, shards int32) []yaml.MapSlice {
for i, relabeling := range relabelings {
for _, relabelItem := range relabeling {
if relabelItem.Key == "action" && relabelItem.Value == "hashmod" {
@ -1958,24 +1964,29 @@ func (cg *ConfigGenerator) generateAddressShardingRelabelingRulesIfMissing(relab
}
}
}
return generateAddressShardingRelabelingRules(relabelings, shards)
return appendShardingRelabelingWithAddress(relabelings, shards)
}
func generateAddressShardingRelabelingRulesForProbes(relabelings []yaml.MapSlice, shards int32) []yaml.MapSlice {
return generateAddressShardingRelabelingRulesWithSourceLabel(relabelings, shards, "__param_target")
}
func generateAddressShardingRelabelingRulesWithSourceLabel(relabelings []yaml.MapSlice, shards int32, shardLabel string) []yaml.MapSlice {
return append(relabelings, yaml.MapSlice{
{Key: "source_labels", Value: []string{shardLabel}},
{Key: "target_label", Value: "__tmp_hash"},
{Key: "modulus", Value: shards},
{Key: "action", Value: "hashmod"},
}, yaml.MapSlice{
{Key: "source_labels", Value: []string{"__tmp_hash"}},
{Key: "regex", Value: fmt.Sprintf("$(%s)", operator.ShardEnvVar)},
{Key: "action", Value: "keep"},
})
func appendShardingRelabelingWithLabel(relabelings []yaml.MapSlice, shards int32, shardLabel string) []yaml.MapSlice {
return append(relabelings,
// Store the "shardLabel" value into the __tmp_hash label unless the
// latter is already set.
yaml.MapSlice{
{Key: "source_labels", Value: []string{shardLabel, hashLabelNameForSharding}},
{Key: "target_label", Value: hashLabelNameForSharding},
{Key: "regex", Value: "(.+);"},
{Key: "replacement", Value: "$1"},
{Key: "action", Value: "replace"},
}, yaml.MapSlice{
{Key: "source_labels", Value: []string{hashLabelNameForSharding}},
{Key: "target_label", Value: hashLabelNameForSharding},
{Key: "modulus", Value: shards},
{Key: "action", Value: "hashmod"},
}, yaml.MapSlice{
{Key: "source_labels", Value: []string{hashLabelNameForSharding}},
{Key: "regex", Value: fmt.Sprintf("$(%s)", operator.ShardEnvVar)},
{Key: "action", Value: "keep"},
})
}
func generateRelabelConfig(rc []monitoringv1.RelabelConfig) []yaml.MapSlice {
@ -2259,15 +2270,14 @@ func (cg *ConfigGenerator) generateAdditionalScrapeConfigs(
relabelings = append(relabelings, relabeling)
}
}
// DaemonSet mode doesn't support sharding.
if !cg.daemonSet {
relabelings = cg.generateAddressShardingRelabelingRulesIfMissing(relabelings, shards)
}
relabelings = cg.appendShardingRelabelingWithAddressIfMissing(relabelings, shards)
addlScrapeConfig = append(addlScrapeConfig, otherConfigItems...)
addlScrapeConfig = append(addlScrapeConfig, yaml.MapItem{Key: "relabel_configs", Value: relabelings})
addlScrapeConfigs = append(addlScrapeConfigs, addlScrapeConfig)
}
return addlScrapeConfigs, nil
}
@ -4490,7 +4500,7 @@ func (cg *ConfigGenerator) generateScrapeConfig(
}
if shards != 1 {
relabelings = cg.generateAddressShardingRelabelingRulesIfMissing(relabelings, shards)
relabelings = cg.appendShardingRelabelingWithAddressIfMissing(relabelings, shards)
}
// No need to check for the length because relabelings should always have

View file

@ -13,6 +13,13 @@ scrape_configs:
relabel_configs:
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 3
action: hashmod
@ -32,6 +39,13 @@ scrape_configs:
regex: my_app
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 3
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -57,6 +57,13 @@ scrape_configs:
replacement: ${1}
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -55,6 +55,13 @@ scrape_configs:
action: replace
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -69,6 +69,13 @@ scrape_configs:
action: replace
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -57,6 +57,13 @@ scrape_configs:
replacement: pod-monitor-ns
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -76,6 +76,13 @@ scrape_configs:
replacement: default
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -80,6 +80,13 @@ scrape_configs:
action: replace
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -69,6 +69,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -70,6 +70,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -34,6 +34,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -34,6 +34,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -34,6 +34,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -35,6 +35,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -34,6 +34,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -35,6 +35,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -34,6 +34,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -35,6 +35,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -64,6 +64,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -73,6 +73,13 @@ scrape_configs:
action: replace
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -41,6 +41,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -41,6 +41,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -41,6 +41,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -40,6 +40,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -41,6 +41,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -35,6 +35,13 @@ scrape_configs:
replacement: test
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -69,6 +69,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -50,6 +50,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -50,6 +50,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -55,6 +55,13 @@ scrape_configs:
action: replace
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -57,6 +57,13 @@ scrape_configs:
replacement: default
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -55,6 +55,13 @@ scrape_configs:
action: replace
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 2
action: hashmod

View file

@ -14,6 +14,13 @@ scrape_configs:
target_label: __tmp_prometheus_job_name
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -17,6 +17,13 @@ scrape_configs:
target_label: __tmp_prometheus_job_name
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -16,6 +16,13 @@ scrape_configs:
target_label: __tmp_prometheus_job_name
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -35,6 +35,13 @@ scrape_configs:
action: replace
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -34,6 +34,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -35,6 +35,13 @@ scrape_configs:
replacement: default
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -31,6 +31,13 @@ scrape_configs:
replacement: blackbox.exporter.io
- source_labels:
- __param_target
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -17,6 +17,13 @@ scrape_configs:
target_label: __tmp_prometheus_job_name
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 2
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -59,6 +59,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -60,6 +60,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -69,6 +69,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -51,6 +51,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -70,6 +70,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -51,6 +51,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

View file

@ -51,6 +51,13 @@ scrape_configs:
replacement: web
- source_labels:
- __address__
- __tmp_hash
target_label: __tmp_hash
regex: (.+);
replacement: $1
action: replace
- source_labels:
- __tmp_hash
target_label: __tmp_hash
modulus: 1
action: hashmod

Some files were not shown because too many files have changed in this diff Show more