Documentation ¶
Index ¶
- Constants
- func UpdateCurrentHost(db *badger.DB, conf *config.Config, init bool) error
- type Check
- type CheckNetworkUptime
- type CheckType
- type CheckTypes
- type CheckUptime
- type CheckUptimeByType
- type Host
- func GetCurrentHost(db *badger.DB) (*Host, error)
- func GetHostByHostname(db *badger.DB, hostname string) (*Host, error)
- func GetHostByID(db *badger.DB, id string) (*Host, error)
- func GetHostByIP(db *badger.DB, ip string) (*Host, error)
- func GetHosts(db *badger.DB) ([]Host, error)
- func GetHostsWithStatuses(db *badger.DB) ([]Host, error)
- type Network
- type ServiceChecks
- type Status
- type Uptime
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Check ¶
type Check struct { ID string `json:"id"` HostID string `json:"hostId"` Status Status `json:"status"` ResponseTime time.Duration `json:"responseTime"` StatusCode int `json:"statusCode"` ResponseBody string `json:"responseBody"` CheckErrorMessage string `json:"checkErrorMessage"` Network Network `json:"network"` CheckType CheckType `json:"checkType"` CheckedAt time.Time `json:"checkedAt"` }
type CheckNetworkUptime ¶
type CheckNetworkUptime struct { Percent float64 `json:"percent"` TotalSuccess uint64 `json:"totalSuccess"` TotalChecks uint64 `json:"totalChecks"` HTTP CheckUptimeByType `json:"http"` TCP CheckUptimeByType `json:"tcp"` UDP CheckUptimeByType `json:"udp"` ICMP CheckUptimeByType `json:"icmp"` }
type CheckTypes ¶
type CheckUptime ¶
type CheckUptime struct { Percent float64 `json:"percent"` TotalSuccess uint64 `json:"totalSuccess"` TotalChecks uint64 `json:"totalChecks"` Internal CheckNetworkUptime `json:"internal"` Public CheckNetworkUptime `json:"public"` }
type CheckUptimeByType ¶
type Host ¶
type Host struct { ID string `json:"id" badgerhold:"key"` CurrentHost bool `json:"-"` Hostname string `json:"hostname" badgerhold:"unique"` ServiceRestarts int `json:"serviceRestarts,omitempty"` ServiceFirstStart time.Time `json:"serviceFirstStart"` ServiceLastStart time.Time `json:"serviceLastStart"` InternalIP string `json:"internalIp" badgerhold:"unique"` PublicIP string `json:"publicIp" badgerhold:"unique"` DiscoveredIP string `json:"-"` ServiceUptime time.Duration `json:"serviceUptime,omitempty"` HostUptime time.Duration `json:"hostUptime,omitempty"` FirstSeenAt time.Time `json:"firstSeenAt"` LastSeenAt time.Time `json:"lastSeenAt" badgerhold:"index"` LatestChecks *ServiceChecks `json:"latestChecks,omitempty"` Checks *ServiceChecks `json:"checks,omitempty"` CheckUptime *CheckUptime `json:"checkUptime"` CityCode string `json:"cityCode,omitempty"` Longitude string `json:"longitude,omitempty"` Latitude string `json:"latitude,omitempty"` }
type ServiceChecks ¶
type ServiceChecks struct { Internal CheckTypes `json:"internal"` Public CheckTypes `json:"public"` }
Click to show internal directories.
Click to hide internal directories.