const MachinesCollectionName = "machines"
type Machine struct { ID int64 `json:"_id" bson:"_id"` IP string `json:"ip" bson:"ip"` Name string `json:"name" bson:"name"` GroupName string `json:"group_name" bson:"group_name"` // Ping tells the ping, in seconds, of the last poll Ping float64 `json:"ping" bson:"ping"` // ms // LastUpdate tells the time of the last update LastUpdate int64 `json:"last_update" bson:"last_update"` // Alive tells if the machine can currently be returned in the list of machine that we known. This parameter is set // to false is the machine has been just added or it timed out Alive bool `json:"alive" bson:"alive"` // set to not alive when the machine has to be polled // DeadPolls tells the number of consecutive times the machine timed out. This is set to 0 when the machine replies // correctly DeadPolls uint `json:"dead_polls" bson:"dead_polls"` }