From 2fa91450df792689c42bd52f98ffdacee99ace91 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 30 Nov 2017 17:14:18 +0100 Subject: dashboard/app: add manager monitoring Make it possible to monitor health and operation of all managers from dashboard. 1. Notify dashboard about internal syz-ci errors (currently we don't know when/if they happen). 2. Send statistics from managers to dashboard. --- dashboard/dashapi/dashapi.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'dashboard/dashapi') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 8ebea29ac..4ba797f32 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -16,6 +16,7 @@ import ( "net/url" "reflect" "strings" + "time" ) type Dashboard struct { @@ -249,6 +250,23 @@ type PollResponse struct { Reports []*BugReport } +type ManagerStatsReq struct { + Name string + // Current level: + UpTime time.Duration + Corpus uint64 + Cover uint64 + + // Delta since last sync: + FuzzingTime time.Duration + Crashes uint64 + Execs uint64 +} + +func (dash *Dashboard) UploadManagerStats(req *ManagerStatsReq) error { + return dash.query("manager_stats", req, nil) +} + type ( BugStatus int ReproLevel int -- cgit mrf-deployment