sallite/satellitedb: add metric stray_nodes_dq_count
Add metric so we can see how many nodes are DQd due to this. Change-Id: Ie4bdd1375fb9bd948af14fed9a2962b783b6a526
This commit is contained in:
parent
856db68fd9
commit
aeac6264cd
@ -1561,7 +1561,15 @@ func (cache *overlaycache) DQNodesLastSeenBefore(ctx context.Context, cutoff tim
|
|||||||
WHERE last_contact_success < $1
|
WHERE last_contact_success < $1
|
||||||
AND disqualified is NULL
|
AND disqualified is NULL
|
||||||
AND exit_finished_at is NULL;`
|
AND exit_finished_at is NULL;`
|
||||||
_, err = cache.db.ExecContext(ctx, q, cutoff)
|
results, err := cache.db.ExecContext(ctx, q, cutoff)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
n, err := results.RowsAffected()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
mon.IntVal("stray_nodes_dq_count").Observe(n)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user