39 lines
2.0 KiB
Go
39 lines
2.0 KiB
Go
package a_agent
|
|
|
|
import "github.com/spf13/viper"
|
|
|
|
var AgentServerInfoCache = &AgentServerInfo{}
|
|
|
|
var AgentConfig *viper.Viper
|
|
|
|
type AgentServerInfo struct {
|
|
ServerName string `json:"serverName" yaml:"serverName"`
|
|
ServerIPPbV4 string `json:"serverIpPbV4" yaml:"serverIpPbV4"`
|
|
ServerIPInV4 string `json:"serverIpInV4" yaml:"serverIpInV4"`
|
|
ServerIPPbV6 string `json:"serverIpPbV6" yaml:"serverIpPbV6"`
|
|
ServerIPInV6 string `json:"serverIpInV6" yaml:"serverIpInV6"`
|
|
Location string `json:"location" yaml:"location"`
|
|
Provider string `json:"provider" yaml:"provider"`
|
|
ManagePort string `json:"managePort" yaml:"managePort"`
|
|
CPUCore string `json:"cpuCore" yaml:"cpuCore"`
|
|
CPUBrand string `json:"cpuBrand" yaml:"cpuBrand"`
|
|
OSInfo string `json:"osInfo" yaml:"osInfo"`
|
|
OSKernelInfo string `json:"osKernelInfo" yaml:"osKernelInfo"`
|
|
TCPControl string `json:"tcpControl" yaml:"tcpControl"`
|
|
Virtualization string `json:"virtualization" yaml:"virtualization"`
|
|
Platform string `json:"platform"` // ex: ubuntu, linuxmint
|
|
PlatformFamily string `json:"platformFamily"` // ex: debian, rhel
|
|
PlatformVersion string `json:"platformVersion"` // version of the complete OS
|
|
KernelVersion string `json:"kernelVersion"` // version of the OS kernel (if available)
|
|
KernelArch string `json:"kernelArch"` // native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
|
|
IoSpeed string `json:"ioSpeed" yaml:"ioSpeed"`
|
|
MemoryTotal string `json:"memoryTotal" yaml:"memoryTotal"`
|
|
SwapTotal string `json:"swapTotal" yaml:"swapTotal"`
|
|
DiskTotal string `json:"diskTotal" yaml:"diskTotal"`
|
|
DiskUsage string `json:"diskUsage" yaml:"diskUsage"`
|
|
Comment string `json:"comment" yaml:"comment"`
|
|
MachineID string `json:"machineId" yaml:"machineId"`
|
|
AgentVersion string `json:"agentVersion" yaml:"agentVersion"`
|
|
TopicName string `json:"topicName" yaml:"topicName"`
|
|
}
|