fix creationtime in aggregations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -15,8 +15,9 @@ Daily aggregation runs per VM using sample counts for the day:
|
||||
- `SamplesPresent`: count of snapshot samples in which the VM appears.
|
||||
- `TotalSamples`: count of unique snapshot timestamps for the vCenter in the day.
|
||||
- `AvgIsPresent`: `SamplesPresent / TotalSamples` (0 when `TotalSamples` is 0).
|
||||
- `AvgVcpuCount`, `AvgRamGB`, `AvgProvisionedDisk` (daily): `AvgIsPresent * last_observed_value` for the VM that day. This prorates partial-day VMs by presence ratio.
|
||||
- `AvgVcpuCount`, `AvgRamGB`, `AvgProvisionedDisk` (daily): `sum(values_per_sample) / TotalSamples` to time‑weight config changes and prorate partial‑day VMs.
|
||||
- `PoolTinPct`, `PoolBronzePct`, `PoolSilverPct`, `PoolGoldPct` (daily): `(pool_hits / SamplesPresent) * 100`, so pool percentages reflect only the time the VM existed.
|
||||
- `CreationTime`: only set when vCenter provides it or when a lifecycle cache `FirstSeen` is available; otherwise it remains `0`.
|
||||
|
||||
Monthly aggregation builds on daily summaries (or the daily rollup cache):
|
||||
- For each VM, daily averages are converted to weighted sums: `daily_avg * daily_total_samples`.
|
||||
|
||||
Reference in New Issue
Block a user