2
0
mirror of synced 2025-01-11 09:06:56 +00:00

Splits up metrics-scraper from metrics-endpoints configuration in deployer.

This commit is contained in:
benbierens 2023-10-23 10:57:59 +02:00
parent cc2e8d5992
commit 7a6d7d787b
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
5 changed files with 11 additions and 6 deletions

View File

@ -24,7 +24,8 @@ do
--block-ttl=99999999 \
--block-mi=99999999 \
--block-mn=100 \
--metrics=1 \
--metrics-endpoints=1 \
--metrics-scraper=1 \
--check-connect=1 \
-y

View File

@ -39,9 +39,9 @@ namespace CodexNetDeployer
s.WithLogLevel(config.CodexLogLevel, new CodexLogCustomTopics(config.Discv5LogLevel, config.Libp2pLogLevel));
s.WithStorageQuota(config.StorageQuota!.Value.MB());
s.EnableMarketplace(gethNode, contracts, 100.Eth(), config.InitialTestTokens.TestTokens(), validatorsLeft > 0);
s.EnableMetrics();
if (bootstrapNode != null) s.WithBootstrapNode(bootstrapNode);
if (config.MetricsEndpoints) s.EnableMetrics();
if (config.BlockTTL != Configuration.SecondsIn1Day) s.WithBlockTTL(TimeSpan.FromSeconds(config.BlockTTL));
if (config.BlockMI != Configuration.TenMinutes) s.WithBlockMaintenanceInterval(TimeSpan.FromSeconds(config.BlockMI));
if (config.BlockMN != 1000) s.WithBlockMaintenanceNumber(config.BlockMN);

View File

@ -67,8 +67,11 @@ namespace CodexNetDeployer
[Uniform("block-mn", "bmn", "BLOCKMN", false, "Number of blocks maintained per interval. Default is 1000 blocks.")]
public int BlockMN { get; set; } = 1000;
[Uniform("metrics", "m", "METRICS", false, "[true, false]. Determines if metrics will be recorded. Default is false.")]
public bool Metrics { get; set; } = false;
[Uniform("metrics-endpoints", "me", "METRICSENDPOINTS", false, "[true, false]. Determines if metric endpoints will be enabled. Default is false.")]
public bool MetricsEndpoints { get; set; } = false;
[Uniform("metrics-scraper", "ms", "METRICSSCRAPER", false, "[true, false]. Determines if metrics scraper service will be deployed. (Required for certain tests.) Default is false.")]
public bool MetricsScraper { get; set; } = false;
[Uniform("teststype-podlabel", "ttpl", "TESTSTYPE-PODLABEL", false, "Each kubernetes pod will be created with a label 'teststype' with value 'continuous'. " +
"set this option to override the label value.")]

View File

@ -100,7 +100,7 @@ namespace CodexNetDeployer
private RunningContainer? StartMetricsService(CoreInterface ci, List<CodexNodeStartResult> startResults)
{
if (!config.Metrics) return null;
if (!config.MetricsScraper) return null;
Log("Starting metrics service...");

View File

@ -14,5 +14,6 @@ dotnet run \
--block-ttl=180 \
--block-mi=120 \
--block-mn=10000 \
--metrics=1 \
--metrics-endpoints=1 \
--metrics-scraper=1 \
--check-connect=1