nexagent

package
v0.2.1-0...-6d22bef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName          = "NexAgent"
	AppDescription   = "NexAgent for NexClipper Monitoring System"
	NexAgentVersion  = "0.3.0"
	K8sLeaseLockName = "nexagent-lease-lock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Cluster        string
	ServerAddress  string
	ReportInterval int
	ApiPort        int
}

type BasicMetric

type BasicMetric struct {
	Name  string
	Label string
	Type  string
	Value float64
}

type BasicMetrics

type BasicMetrics []*BasicMetric

type Config

type Config struct {
	Agent      AgentConfig
	TLS        TLSConfig
	Kubernetes KubernetesConfig
}

type ContainerInfo

type ContainerInfo struct {
	// contains filtered or unexported fields
}

type KubernetesConfig

type KubernetesConfig struct {
	ClusterName string
	Namespace   string
}

type NexAgent

type NexAgent struct {
	// contains filtered or unexported fields
}

func NewNexAgent

func NewNexAgent() *NexAgent

func (*NexAgent) ApiHealth

func (s *NexAgent) ApiHealth(c *gin.Context)

func (*NexAgent) InitWithDefault

func (s *NexAgent) InitWithDefault()

func (*NexAgent) IsDiskDevice

func (s *NexAgent) IsDiskDevice(deviceName string) bool

func (*NexAgent) IsNetDevice

func (s *NexAgent) IsNetDevice(deviceName string) bool

func (*NexAgent) LoadConfig

func (s *NexAgent) LoadConfig(configPath string) error

func (*NexAgent) SetAgentCluster

func (s *NexAgent) SetAgentCluster(agentCluster string)

func (*NexAgent) SetApiPort

func (s *NexAgent) SetApiPort(restApiPort int)

func (*NexAgent) SetK8sCluster

func (s *NexAgent) SetK8sCluster(k8sCluster string)

func (*NexAgent) SetK8sNamespace

func (s *NexAgent) SetK8sNamespace(k8sNamespace string)

func (*NexAgent) SetReportInterval

func (s *NexAgent) SetReportInterval(reportInterval int)

func (*NexAgent) SetServerAddress

func (s *NexAgent) SetServerAddress(serverAddress string)

func (*NexAgent) SetupApiHandler

func (s *NexAgent) SetupApiHandler()

func (*NexAgent) Start

func (s *NexAgent) Start() error

type NodeMetricsList

type NodeMetricsList struct {
	Kind       string `json:"kind"`
	APIVersion string `json:"apiVersion"`
	Metadata   struct {
		SelfLink string `json:"selfLink"`
	} `json:"metadata"`
	Items []struct {
		Metadata struct {
			Name              string    `json:"name"`
			SelfLink          string    `json:"selfLink"`
			CreationTimestamp time.Time `json:"creationTimestamp"`
		} `json:"metadata"`
		Timestamp time.Time `json:"timestamp"`
		Window    string    `json:"window"`
		Usage     struct {
			CPU    string `json:"cpu"`
			Memory string `json:"memory"`
		} `json:"usage"`
	} `json:"items"`
}

type PodMetricsList

type PodMetricsList struct {
	Kind       string `json:"kind"`
	APIVersion string `json:"apiVersion"`
	Metadata   struct {
		SelfLink string `json:"selfLink"`
	} `json:"metadata"`
	Items []struct {
		Metadata struct {
			Name              string    `json:"name"`
			Namespace         string    `json:"namespace"`
			SelfLink          string    `json:"selfLink"`
			CreationTimestamp time.Time `json:"creationTimestamp"`
		} `json:"metadata"`
		Timestamp  time.Time `json:"timestamp"`
		Window     string    `json:"window"`
		Containers []struct {
			Name  string `json:"name"`
			Usage struct {
				CPU    string `json:"cpu"`
				Memory string `json:"memory"`
			} `json:"usage"`
		} `json:"containers"`
	} `json:"items"`
}

type ProcessInfo

type ProcessInfo struct {
	// contains filtered or unexported fields
}

type TLSConfig

type TLSConfig struct {
	Use      bool
	CertFile string
	KeyFile  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL