Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppMetric ¶
type AppMetric struct {
// contains filtered or unexported fields
}
AppMetric application metric
func NewAppMetric ¶
NewAppMetric creates a new `AppMetric`
type Container ¶
type Container struct { Name string `json:"name"` ID string `json:"id"` Type string `json:"type"` Status string `json:"state"` State string `json:"status"` CreatedAt int64 `json:"created_at"` StartedAt string `json:"started_at"` Labels map[string]string `json:"labels"` Image string `json:"image"` SizeContainer int64 `json:"size_container"` SizeAdded int64 `json:"size_added"` Ports []Port `json:"ports"` Volumes []Volume `json:"volumes"` Command string `json:"command"` CPUUsedPercentage float64 `json:"cpu_used_percentage"` MemoryTotal float64 `json:"memory_total"` MemoryCurrent float64 `json:"memory_current"` MemoryUsedPercentage float64 `json:"memory_used_percentage"` IPAddress string `json:"ip_address"` NetworkName string `json:"network_name"` NetworkInbound float64 `json:"network_inbound"` NetworkOutbound float64 `json:"network_outbound"` PIDs uint64 `json:"pid_count"` }
Container defines container data
type Port ¶
type Port struct { IP string `json:"ip_address"` PrivatePort uint16 `json:"private_port"` PublicPort uint16 `json:"public_port"` Type string `json:"type"` }
Port defines a container port
type ServerLoad ¶
type ServerLoad struct { Load1 float64 `json:"load1"` Load5 float64 `json:"load5"` Load15 float64 `json:"load15"` }
ServerLoad represents server load metric
type ServerMetric ¶
type ServerMetric struct { Hostname string `json:"hostname"` CPUUsedPercentage float64 `json:"cpu_used_percentage"` CPUCoreCount int `json:"cpu_core_count"` Load ServerLoad `json:"load"` MemoryTotal uint64 `json:"memory_total"` MemoryUserPercentage float64 `json:"memory_used_percentage"` DiskTotal uint64 `json:"disk_total"` DiskUsedPercentage float64 `json:"disk_used_percentage"` CreatedAt time.Time `json:"-"` CreatedAtFormatted string `json:"created_at"` OS *OS `json:"os"` BootTime uint64 `json:"boot_time"` RebootRequired bool `json:"reboot_required"` Services []Service `json:"services"` Containers []Container `json:"containers"` PHPVersion string `json:"php_version"` }
ServerMetric represents a server metric
func (*ServerMetric) String ¶
func (sm *ServerMetric) String() string
String returns `ServerMetric` in a string format
type Service ¶
type Service struct { Name string `json:"name"` // The primary unit name as string Description string `json:"description"` // The human readable description string LoadState string `json:"load_state"` // The load state (i.e. whether the unit file has been loaded successfully) ActiveState string `json:"active_state"` // The active state (i.e. whether the unit is currently started or not) SubState string `json:"sub_state"` // The sub state (a more fine-grained version of the active state that is specific to the }
Service represents a systemd service
Click to show internal directories.
Click to hide internal directories.