Skip to content

Commit

Permalink
fix active srv metric
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Apr 11, 2024
1 parent c189280 commit 5f60a1e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CloudController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,18 @@ private void StoreActiveRunners()
})
.ToList();

foreach (var group in grouped)
foreach (var oc in Program.Config.OrgConfigs)
{
ActiveMachinesCount.Labels(group.OrgName, group.Size).Set(group.Count);
foreach (var ms in Program.Config.Sizes)
{
int ct = 0;
var am = grouped.FirstOrDefault(x => x.OrgName == oc.OrgName && x.Size == ms.Name);
if (am != null)
{
ct = am.Count;
}
ActiveMachinesCount.Labels(oc.OrgName, ms.Name).Set(ct);
}
}

}
Expand Down

0 comments on commit 5f60a1e

Please sign in to comment.