carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1{{define "fleet"}}{{template "top" .}}
2<h1>Fleet status</h1>
3{{if .StorePending}}<p><a href="/fleet/store">Object storage applications: {{.StorePending}} pending</a></p>{{else if .StoreQueueUnknown}}<p><a href="/fleet/store">Object storage applications: count unavailable</a></p>{{end}}
4<p class="small"><a href="/fleet/architecture">See the architecture &rarr;</a></p>
5{{if .Fleet}}
6<p class="small">Generated {{fmtTime .Fleet.GeneratedAt}}</p>
7
8<section class="tiles" aria-label="Fleet summary">
9 <div class="tile">
10 <h2>Instances</h2>
11 <p class="tile-value">{{intOrDash (mapGet .Fleet.Instances "total")}}</p>
12 <p class="tile-detail">
13 static {{intOrDash (mapGet .Fleet.Instances "static")}} ·
14 resident {{intOrDash (mapGet .Fleet.Instances "resident")}} ·
15 hibernating {{intOrDash (mapGet .Fleet.Instances "hibernating")}} ·
16 awake {{intOrDash (mapGet .Fleet.Instances "awake")}} ·
17 asleep {{intOrDash (mapGet .Fleet.Instances "asleep")}}
18 </p>
19 </div>
20 <div class="tile">
21 <h2>Capacity</h2>
22 <p class="tile-value">{{strOrDash .Fleet.Capacity.Level}}</p>
23 </div>
24 <div class="tile">
25 <h2>Replication</h2>
26 <p class="tile-value">{{boolWord .Fleet.Replication.Healthy "healthy" "unhealthy"}}</p>
27 </div>
28 <div class="tile">
29 <h2>Adoption</h2>
30 <p class="tile-value">{{boolWord .Fleet.AdoptionRunning "running" "not running"}}</p>
31 </div>
32</section>
33
34<h2>Boxes</h2>
35{{if .Fleet.Boxes}}
36<div class="tablewrap">
37<table>
38 <tr>
39 <th>Label</th><th>Region</th><th>Load</th>
40 <th>Static</th><th>Resident</th><th>Hibernating</th><th>Awake</th><th>Asleep</th>
41 <th>Adoption</th>
42 <th>Config sync</th>
43 <th></th>
44 </tr>
45 {{range .Fleet.Boxes}}
46 <tr>
47 <td>{{.Label}}</td>
48 <td>{{emptyOrDash .Region}}</td>
49 <td>{{strOrDash .Load}}</td>
50 <td>{{.Routes.Static}}</td>
51 <td>{{.Routes.Resident}}</td>
52 <td>{{.Routes.Hibernating}}</td>
53 <td>{{intOrDash .Routes.Awake}}</td>
54 <td>{{intOrDash .Routes.Asleep}}</td>
55 <td>{{boolWord .AdoptionRunning "running" "not running"}}</td>
56 <td>{{boolWord .ConfigPathRunning "armed" "not armed"}}</td>
57 <td>{{if .Stale}}<span class="chip chip-stale">stale</span>{{end}}</td>
58 </tr>
59 {{end}}
60</table>
61</div>
62{{else}}<p class="small">No box snapshots yet.</p>{{end}}
63
64<h2>Apps</h2>
65{{if .Fleet.Apps}}
66<div class="tablewrap">
67<table>
68 <tr><th>Name</th><th>Instances</th><th>Healthy</th><th>Channel</th><th>Version</th></tr>
69 {{range .Fleet.Apps}}
70 <tr>
71 <td>{{.Name}}</td>
72 <td>{{.Instances}}</td>
73 <td>{{if .Healthy}}healthy{{else}}unhealthy{{end}}</td>
74 <td>{{.Channel}}</td>
75 <td>{{.Version}}</td>
76 </tr>
77 {{end}}
78</table>
79</div>
80{{else}}<p class="small">No opted-in apps yet.</p>{{end}}
81{{if .Fleet.AppsUnlisted}}
82<p class="small">{{.Fleet.AppsUnlisted}} more app{{if ne .Fleet.AppsUnlisted 1}}s{{end}} running, not publicly named.</p>
83{{end}}
84
85<h2>Services</h2>
86{{if .Fleet.Services}}
87<div class="chips">
88 {{range .Fleet.Services}}
89 <span class="chip {{if .Up}}chip-up{{else}}chip-down{{end}}">{{.Name}} {{if .Up}}up{{else}}down{{end}}</span>
90 {{end}}
91</div>
92{{else}}<p class="small">No services reporting.</p>{{end}}
93
94<p class="small">Aggregate counts and status words only — never hostnames, machine identifiers, or raw utilization figures; anything this page doesn't know shows as an em-dash, never guessed.</p>
95{{else}}
96<p>No snapshots yet — the fleet status writer hasn't published <code>status/fleet.json</code> on this deployment.</p>
97{{end}}
98
99{{if .Hosts}}
100<h2>Hosts</h2>
101<div class="tablewrap">
102<table>
103 <tr>
104 <th>Host</th><th>Region</th><th>Release</th><th>Tunnel</th>
105 <th>Memory free</th><th>Load</th><th>Disk free</th><th>Last report</th>
106 </tr>
107 {{range .Hosts}}
108 <tr>
109 <td>{{.Label}}</td>
110 <td>{{emptyOrDash .Region}}</td>
111 {{if .Metrics}}
112 <td>{{emptyOrDash .Metrics.Release}}</td>
113 <td>{{emptyOrDash .Metrics.Tunnel}}</td>
114 <td>{{bytesOrDash .Metrics.MemAvailBytes}} / {{bytesOrDash .Metrics.MemTotalBytes}}</td>
115 <td>{{loadOrDash .Metrics.Load1}}</td>
116 <td>{{bytesOrDash .Metrics.DiskFreeBytes}}</td>
117 <td>{{fmtTime .LastSeen}}</td>
118 {{else if .Stale}}
119 {{/* An unreachable host says how long it has been dark and nothing else:
120 its last readings are history, and a history rendered in a "now"
121 column is how an outage gets missed. */}}
122 <td colspan="5"><span class="chip chip-down">unreachable</span> last heartbeat {{.Dark}} ago</td>
123 <td>{{fmtTime .LastSeen}}</td>
124 {{else}}
125 <td colspan="5" class="small">no metrics block — this host predates raw metric reporting</td>
126 <td>{{fmtTime .LastSeen}}</td>
127 {{end}}
128 </tr>
129 {{end}}
130</table>
131</div>
132<p class="small">Read from <code>status/boxes/</code> in the deployment bucket, which is not public — these are raw figures, unlike the aggregate feed above, and this page is why they stay behind a session.</p>
133{{end}}
134{{template "bottom" .}}{{end}}
135