Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProvisioningCutoff is the threshold to consider as too long for a host to take provisioning ProvisioningCutoff = 35 * time.Minute // UnreachableCutoff is the threshold to wait for an unreachable host to become marked // as reachable again before giving up and terminating it. UnreachableCutoff = 10 * time.Minute // IdleTimeCutoff is the amount of time we wait for an idle host to be marked as idle. IdleTimeCutoff = 15 * time.Minute // MaxTimeNextPayment is the amount of time we wait to have left before marking a host as idle MaxTimeTilNextPayment = 5 * time.Minute // CommunicationTimeCutoff is the limit to how much time has passed before the host is marked as idle // due to the agent not being able to communicate with the API server. CommunicationTimeCutoff = 10 * time.Minute )
View Source
const ( // how long to wait in between reachability checks ReachabilityCheckInterval = 10 * time.Minute NumReachabilityWorkers = 100 )
View Source
const ( RunnerName = "monitor" Description = "track and clean up expired hosts and tasks" )
View Source
const (
// reasons for cleaning up a task
HeartbeatTimeout = "task heartbeat timed out"
)
Variables ¶
View Source
var ( // threshold for a task's heartbeat to time out HeartbeatTimeoutThreshold = 7 * time.Minute )
Functions ¶
func RunAllMonitoring ¶
run all monitoring functions
Types ¶
type HostMonitor ¶
type HostMonitor struct {
// contains filtered or unexported fields
}
responsible for running regular monitoring of hosts
func (*HostMonitor) CleanupHosts ¶
run through the list of host flagging functions, finding all hosts that need to be terminated and terminating them
func (*HostMonitor) RunMonitoringChecks ¶
func (hm *HostMonitor) RunMonitoringChecks(settings *evergreen.Settings) []error
run through the list of host monitoring functions. returns any errors that occur while running the monitoring functions
type TaskMonitor ¶
type TaskMonitor struct {
// contains filtered or unexported fields
}
responsible for cleaning up any tasks that need to be stopped
func (*TaskMonitor) CleanupTasks ¶
func (tm *TaskMonitor) CleanupTasks(projects map[string]model.Project) []error
run through the list of task flagging functions, finding all tasks that need to be cleaned up and taking appropriate action. takes in a map of project name -> project info
Click to show internal directories.
Click to hide internal directories.