Allows for deployment without codex nodes
This commit is contained in:
parent
8b224f6922
commit
54471d41d5
|
@ -18,6 +18,8 @@ namespace MetricsPlugin
|
||||||
|
|
||||||
public RunningContainers CollectMetricsFor(IMetricsScrapeTarget[] targets)
|
public RunningContainers CollectMetricsFor(IMetricsScrapeTarget[] targets)
|
||||||
{
|
{
|
||||||
|
if (!targets.Any()) throw new ArgumentException(nameof(targets) + " must not be empty.");
|
||||||
|
|
||||||
Log($"Starting metrics server for {targets.Length} targets...");
|
Log($"Starting metrics server for {targets.Length} targets...");
|
||||||
var startupConfig = new StartupConfig();
|
var startupConfig = new StartupConfig();
|
||||||
startupConfig.Add(new PrometheusStartupConfig(GeneratePrometheusConfig(targets)));
|
startupConfig.Add(new PrometheusStartupConfig(GeneratePrometheusConfig(targets)));
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace CodexNetDeployer
|
||||||
|
|
||||||
private RunningContainers? StartMetricsService(CoreInterface ci, List<CodexNodeStartResult> startResults)
|
private RunningContainers? StartMetricsService(CoreInterface ci, List<CodexNodeStartResult> startResults)
|
||||||
{
|
{
|
||||||
if (!config.MetricsScraper) return null;
|
if (!config.MetricsScraper || !startResults.Any()) return null;
|
||||||
|
|
||||||
Log("Starting metrics service...");
|
Log("Starting metrics service...");
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ namespace CodexNetDeployer
|
||||||
|
|
||||||
private void CheckPeerConnectivity(List<CodexNodeStartResult> codexContainers)
|
private void CheckPeerConnectivity(List<CodexNodeStartResult> codexContainers)
|
||||||
{
|
{
|
||||||
if (!config.CheckPeerConnection) return;
|
if (!config.CheckPeerConnection || !codexContainers.Any()) return;
|
||||||
|
|
||||||
Log("Starting peer connectivity check for deployed nodes...");
|
Log("Starting peer connectivity check for deployed nodes...");
|
||||||
peerConnectivityChecker.CheckConnectivity(codexContainers);
|
peerConnectivityChecker.CheckConnectivity(codexContainers);
|
||||||
|
|
Loading…
Reference in New Issue