feat: add agentmon services section to infrastructure page
Label all agentmon docker-compose services with agentmon.monitor=true and agentmon.group=agentmon so the swarm-monitor picks them up. Adds Group field to ServiceSnapshot, probes /healthz for api/web roles, and renders a separate "Agentmon" section below Swarm Services on the Infrastructure page with new api and worker card renderers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -218,6 +218,19 @@ func main() {
|
||||
httpx.WriteJSON(w, http.StatusOK, summary)
|
||||
})
|
||||
|
||||
r.Get("/v1/stats/top-tools", func(w http.ResponseWriter, r *http.Request) {
|
||||
limit, _ := strconv.Atoi(r.URL.Query().Get("limit"))
|
||||
tools, err := db.GetTopTools(r.Context(), limit)
|
||||
if err != nil {
|
||||
httpx.WriteJSON(w, http.StatusInternalServerError, map[string]any{"error": "db_error"})
|
||||
return
|
||||
}
|
||||
if tools == nil {
|
||||
tools = []postgres.TopTool{}
|
||||
}
|
||||
httpx.WriteJSON(w, http.StatusOK, map[string]any{"tools": tools})
|
||||
})
|
||||
|
||||
r.Get("/v1/stats/timeseries", func(w http.ResponseWriter, r *http.Request) {
|
||||
window := r.URL.Query().Get("window")
|
||||
switch window {
|
||||
|
||||
Reference in New Issue
Block a user