This commit is contained in:
@@ -86,7 +86,7 @@ func Index(info BuildInfo) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</p></div></section><section class=\"grid gap-6 lg:grid-cols-3\"><div class=\"web2-card\"><h2 class=\"text-lg font-semibold mb-2\">Overview</h2><p class=\"mt-2 text-sm text-slate-600\">vCTP is a vSphere Chargeback Tracking Platform.</p></div><div class=\"web2-card\"><h2 class=\"text-lg font-semibold mb-2\">Snapshots and Reports</h2><div class=\"mt-3 text-sm text-slate-600 web2-paragraphs\"><p>Hourly snapshots capture inventory per vCenter (concurrency via <code class=\"web2-code\">hourly_snapshot_concurrency</code>).</p><p>Daily summaries aggregate the hourly snapshots for the day; monthly summaries aggregate daily summaries for the month (or hourly snapshots if configured).</p><p>Snapshots are registered in <code class=\"web2-code\">snapshot_registry</code> so regeneration via <code class=\"web2-code\">/api/snapshots/aggregate</code> can locate the correct tables (fallback scanning is also supported).</p><p>Reports (XLSX with totals/charts) are generated automatically after hourly, daily, and monthly jobs and written to a reports directory.</p><p>Hourly totals are interval-based: each row represents <code class=\"web2-code\">[HH:00, HH+1:00)</code> and uses the first snapshot at or after the hour end (including cross-day snapshots) to prorate VM presence.</p><p>Monthly aggregation reports include a Daily Totals sheet with full-day interval labels (YYYY-MM-DD to YYYY-MM-DD) and prorated totals.</p></div></div><div class=\"web2-card\"><h2 class=\"text-lg font-semibold mb-2\">Prorating and Aggregation</h2><div class=\"mt-3 space-y-2 text-sm text-slate-600 web2-paragraphs\"><p>SamplesPresent is the count of snapshots in which the VM appears; TotalSamples is the count of unique snapshot times for the vCenter.</p><p>AvgIsPresent = SamplesPresent / TotalSamples (0 when TotalSamples is 0).</p><p>Daily AvgVcpuCount/AvgRamGB/AvgProvisionedDisk = sum of per-sample values divided by TotalSamples (time-weighted).</p><p>Daily pool percentages use pool hits divided by SamplesPresent, so they reflect only the time the VM existed.</p><p>Monthly aggregation weights daily averages by daily total samples, then divides by monthly total samples.</p><p>CreationTime is only set when vCenter provides it; otherwise it remains 0.</p></div></div></section></main></body>")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</p></div></section><section class=\"grid gap-6 lg:grid-cols-3\"><div class=\"web2-card\"><h2 class=\"text-lg font-semibold mb-2\">Overview</h2><p class=\"mt-2 text-sm text-slate-600\">vCTP is a vSphere Chargeback Tracking Platform.</p></div><div class=\"web2-card\"><h2 class=\"text-lg font-semibold mb-2\">Snapshots and Reports</h2><div class=\"mt-3 text-sm text-slate-600 web2-paragraphs\"><p>Hourly snapshots capture inventory per vCenter (concurrency via <code class=\"web2-code\">hourly_snapshot_concurrency</code>), then daily and monthly summaries are derived from those snapshots.</p><p><strong>Hourly tracks:</strong> VM identity (<code class=\"web2-code\">InventoryId</code>, <code class=\"web2-code\">Name</code>, <code class=\"web2-code\">VmId</code>, <code class=\"web2-code\">VmUuid</code>, <code class=\"web2-code\">Vcenter</code>, <code class=\"web2-code\">EventKey</code>, <code class=\"web2-code\">CloudId</code>), lifecycle (<code class=\"web2-code\">CreationTime</code>, <code class=\"web2-code\">DeletionTime</code>, <code class=\"web2-code\">SnapshotTime</code>), placement (<code class=\"web2-code\">Datacenter</code>, <code class=\"web2-code\">Cluster</code>, <code class=\"web2-code\">Folder</code>, <code class=\"web2-code\">ResourcePool</code>), and sizing/state (<code class=\"web2-code\">VcpuCount</code>, <code class=\"web2-code\">RamGB</code>, <code class=\"web2-code\">ProvisionedDisk</code>, <code class=\"web2-code\">PoweredOn</code>, <code class=\"web2-code\">IsTemplate</code>, <code class=\"web2-code\">SrmPlaceholder</code>).</p><p><strong>Daily tracks:</strong> <code class=\"web2-code\">SamplesPresent</code>, <code class=\"web2-code\">TotalSamples</code>, <code class=\"web2-code\">AvgIsPresent</code>, <code class=\"web2-code\">AvgVcpuCount</code>, <code class=\"web2-code\">AvgRamGB</code>, <code class=\"web2-code\">AvgProvisionedDisk</code>, <code class=\"web2-code\">PoolTinPct</code>, <code class=\"web2-code\">PoolBronzePct</code>, <code class=\"web2-code\">PoolSilverPct</code>, <code class=\"web2-code\">PoolGoldPct</code>, plus chargeback totals columns <code class=\"web2-code\">Tin</code>, <code class=\"web2-code\">Bronze</code>, <code class=\"web2-code\">Silver</code>, <code class=\"web2-code\">Gold</code>.</p><p><strong>Monthly tracks:</strong> the same daily aggregate fields, with monthly values weighted by per-day sample volume so partial-day VMs and config changes stay proportional.</p><p>Snapshots are registered in <code class=\"web2-code\">snapshot_registry</code> so regeneration via <code class=\"web2-code\">/api/snapshots/aggregate</code> can locate the correct tables (fallback scanning is also supported).</p><p>Reports (XLSX with totals/charts) are generated automatically after hourly, daily, and monthly jobs and written to a reports directory.</p><p>Hourly totals are interval-based: each row represents <code class=\"web2-code\">[HH:00, HH+1:00)</code> and uses the first snapshot at or after the hour end (including cross-day snapshots) to prorate VM presence.</p><p>Monthly aggregation reports include a Daily Totals sheet with full-day interval labels (YYYY-MM-DD to YYYY-MM-DD) and prorated totals.</p></div></div><div class=\"web2-card\"><h2 class=\"text-lg font-semibold mb-2\">Prorating and Aggregation</h2><div class=\"mt-3 space-y-2 text-sm text-slate-600 web2-paragraphs\"><p><code class=\"web2-code\">SamplesPresent</code> is the count of snapshots in which the VM appears; <code class=\"web2-code\">TotalSamples</code> is the count of unique snapshot times for that vCenter/day.</p><p><code class=\"web2-code\">AvgIsPresent = SamplesPresent / TotalSamples</code> (0 when <code class=\"web2-code\">TotalSamples</code> is 0).</p><p>Daily <code class=\"web2-code\">AvgVcpuCount</code>, <code class=\"web2-code\">AvgRamGB</code>, and <code class=\"web2-code\">AvgProvisionedDisk</code> are per-sample sums divided by <code class=\"web2-code\">TotalSamples</code> (time-weighted).</p><p>Daily pool percentages (<code class=\"web2-code\">PoolTinPct</code>/<code class=\"web2-code\">PoolBronzePct</code>/<code class=\"web2-code\">PoolSilverPct</code>/<code class=\"web2-code\">PoolGoldPct</code>) use pool-hit counts divided by <code class=\"web2-code\">SamplesPresent</code>.</p><p>Monthly aggregation converts each day into weighted sums using sample volume, then recomputes monthly averages and pool percentages from those weighted totals.</p><p>CreationTime is only set when vCenter provides it; otherwise it remains 0.</p></div></div></section></main></body>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user