Documentation ¶
Index ¶
- Constants
- func WrapDiffInt32(last, curr int32) int32
- func WrapDiffInt64(last, curr int64) int64
- func WrapDiffUint32(last, curr uint32) uint32
- func WrapDiffUint64(last, curr uint64) uint64
- func Wrapdiff(last, curr float64) (float64, error)
- type Check
- type CheckAgent
- type CheckCpu
- type CheckDisk
- type CheckDiskIo
- type CheckDocker
- type CheckLoad
- type CheckMem
- type CheckNet
- type CheckNetIo
- type CheckNtp
- type CheckProcess
- type CheckSensor
- type CheckSwap
- type CheckSystemd
- type CheckUser
Constants ¶
const ( // Clock is not synchronized to a time server (TIME_ERROR) NTP_TIME_ERROR = 5 // timex.Status time resolution bit (STA_NANO), // If the STA_NANO is set, all values are in nanoseconds, otherwise in microseconds // resolution (0 = us, 1 = ns) // Source: https://github.com/torvalds/linux/blob/7e90b5c295ec1e47c8ad865429f046970c549a66/include/uapi/linux/timex.h#L187 STA_NANO = 0x2000 // Convertions NANOSECONDS_TO_SECONDS = 1000000000 MICROSECONDS_TO_SECONDS = 1000000 )
const DUPLEX_FULL = 2
const DUPLEX_HALF = 1
const DUPLEX_UNKNOWN = 0
Variables ¶
This section is empty.
Functions ¶
func WrapDiffInt32 ¶
func WrapDiffInt64 ¶
func WrapDiffUint32 ¶
func WrapDiffUint64 ¶
Types ¶
type Check ¶
type Check interface { // Name will be used in the response as check name Name() string // Run the actual check // if error != nil the check result will be nil // ctx can be canceled and runs the timeout // CheckResult will be serialized after the return and should not change until the next call to Run Run(ctx context.Context) (interface{}, error) // Configure the command or return false if the command was disabled Configure(config *config.Configuration) (bool, error) }
Check should gather the required information
func ChecksForConfiguration ¶
func ChecksForConfiguration(config *config.Configuration) ([]Check, error)
type CheckAgent ¶
type CheckAgent struct { System string // Windows e.g.: Windows Server 2016 Standard / Linux / macOS ReleaseId string // Windows e.g.: 1607 CurrentBuild string // Windows e.g.: 14393 Family string // Windows e.g.: Server LastBootTime time.Time MacVersion string // macOS KernelVersion string // Linux CheckInterval int64 // Checkinterval of the Agent in Seconds }
CheckAgent gathers information about the agent itself
func (*CheckAgent) Configure ¶
func (c *CheckAgent) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckAgent) Init ¶
func (c *CheckAgent) Init()
func (*CheckAgent) Name ¶
func (c *CheckAgent) Name() string
Name will be used in the response as check name
type CheckCpu ¶
type CheckCpu struct {
// contains filtered or unexported fields
}
CheckCpu gathers information about system CPU load
func (*CheckCpu) Configure ¶
func (c *CheckCpu) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckDisk ¶
type CheckDisk struct { }
CheckDisk gathers information about system disks
func (*CheckDisk) Configure ¶
func (c *CheckDisk) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckDiskIo ¶
type CheckDiskIo struct {
// contains filtered or unexported fields
}
CheckDiskIo gathers information about system disks IO
func (*CheckDiskIo) Configure ¶
func (c *CheckDiskIo) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckDiskIo) Name ¶
func (c *CheckDiskIo) Name() string
Name will be used in the response as check name
type CheckDocker ¶
type CheckDocker struct { }
CheckDocker gathers information about Docker containers
func (*CheckDocker) Configure ¶
func (c *CheckDocker) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckDocker) Name ¶
func (c *CheckDocker) Name() string
Name will be used in the response as check name
type CheckLoad ¶
type CheckLoad struct { }
CheckLoad gathers information about system CPU load
func (*CheckLoad) Configure ¶
func (c *CheckLoad) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckMem ¶
type CheckMem struct { }
CheckMem gathers information about system memory
func (*CheckMem) Configure ¶
func (c *CheckMem) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckNet ¶
type CheckNet struct { }
CheckNet gathers information about system network interfaces (netstats or net_states in the Python version)
func (*CheckNet) Configure ¶
func (c *CheckNet) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckNetIo ¶
type CheckNetIo struct {
// contains filtered or unexported fields
}
CheckNetIo gathers information about system network interface IO (net_io in the Python version)
func (*CheckNetIo) Configure ¶
func (c *CheckNetIo) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckNetIo) Name ¶
func (c *CheckNetIo) Name() string
Name will be used in the response as check name
type CheckNtp ¶
type CheckNtp struct { }
CheckNtp gathers information about time offset between the system clock and the chosen time source (NTP)
func (*CheckNtp) Configure ¶
func (c *CheckNtp) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckProcess ¶
type CheckProcess struct {
// contains filtered or unexported fields
}
CheckProcess gathers information about each process
func (*CheckProcess) Configure ¶
func (c *CheckProcess) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckProcess) Name ¶
func (c *CheckProcess) Name() string
Name will be used in the response as check name
type CheckSensor ¶
type CheckSensor struct { }
CheckSensor gathers information about system sensors
func (*CheckSensor) Configure ¶
func (c *CheckSensor) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckSensor) Name ¶
func (c *CheckSensor) Name() string
Name will be used in the response as check name
type CheckSwap ¶
type CheckSwap struct { }
CheckSwap gathers information about system swap
func (*CheckSwap) Configure ¶
func (c *CheckSwap) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
type CheckSystemd ¶
type CheckSystemd struct { }
CheckSystemd gathers information about Systemd services
func (*CheckSystemd) Configure ¶
func (c *CheckSystemd) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
func (*CheckSystemd) Name ¶
func (c *CheckSystemd) Name() string
Name will be used in the response as check name
type CheckUser ¶
type CheckUser struct { }
CheckUser gathers information about system users
func (*CheckUser) Configure ¶
func (c *CheckUser) Configure(config *config.Configuration) (bool, error)
Configure the command or return false if the command was disabled
Source Files ¶
- agent.go
- agent_posix.go
- checks.go
- checks_linux.go
- cpu.go
- cpu_posix.go
- disk.go
- disk_posix.go
- diskio.go
- diskio_linux.go
- docker.go
- load.go
- memory.go
- memory_posix.go
- net.go
- net_linux.go
- netio.go
- netio_posix.go
- ntp.go
- ntp_linux.go
- process.go
- process_posix.go
- sensor.go
- swap.go
- swap_posix.go
- systemd_linux.go
- user.go
- user_posix.go