Documentation
¶
Index ¶
- Constants
- func AutoMigration(client *ent.Client, ctx context.Context)
- func DebugMode(err error, client *ent.Client, ctx context.Context)
- func Hello(client *ent.Client) echo.HandlerFunc
- func NewClient() (*ent.Client, error)
- type Agent
- type BasicRuleConfig
- type Cluster
- type Config
- type Container
- type Controller
- type DatabaseCfg
- type DatabaseConfig
- type Event
- type Incident
- type IncidentBasicRule
- type IncidentItem
- type K8sCluster
- type K8sConnector
- type K8sContainer
- type K8sDaemonSet
- type K8sDeployment
- type K8sEvent
- type K8sLabel
- type K8sMetric
- type K8sNamespace
- type K8sNode
- type K8sObject
- type K8sObjectTag
- type K8sPod
- type K8sReplicaSet
- type K8sStatefulSet
- type Metric
- type MetricEndpoint
- type MetricLabel
- type MetricName
- type MetricType
- type NextServer
- func (s *NextServer) CheckNodeBasicIncident(nodeMetricChan chan ent.Metric)
- func (s *NextServer) FindCluster() echo.HandlerFunc
- func (s *NextServer) FindContainer() echo.HandlerFunc
- func (s *NextServer) FindMetricEndpoint() echo.HandlerFunc
- func (s *NextServer) FindMetricLabel() echo.HandlerFunc
- func (s *NextServer) FindMetricName() echo.HandlerFunc
- func (s *NextServer) FindMetricType() echo.HandlerFunc
- func (s *NextServer) FindNode() echo.HandlerFunc
- func (s *NextServer) FindNodeByAgent() echo.HandlerFunc
- func (s *NextServer) FindNodeById() echo.HandlerFunc
- func (s *NextServer) FindProcess() echo.HandlerFunc
- func (s *NextServer) FindRemoteAgent() echo.HandlerFunc
- type Node
- type Process
- type ServerConfig
- type Setting
- type TLSConfig
Constants ¶
View Source
const ( AppName = "NextServer" AppDescription = "NextServer for KubeMonitor Monitoring System" NextServerVersion = "1.0" ConfigFilename = "nextserver.yaml" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
Online bool
Version string `gorm:"size:32"`
Ipv4 string `gorm:"size:16"`
Ipv6 string `gorm:"size:40"`
PublicIpv4 string `gorm:"size:16"`
PublicIpv6 string `gorm:"size:40"`
LastContact time.Time
Disabled bool
Uuid string `gorm:"size:36;unique_index"`
MachineID string `gorm:"size:70;unique_index"`
Description string
ClusterID uint `gorm:"index"`
Node Node
}
type BasicRuleConfig ¶
BasicRuleConfig basic rule config
type Config ¶
type Config struct {
Server ServerConfig
Database DatabaseConfig
TLS TLSConfig
BasicRule BasicRuleConfig
}
Config config
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
type DatabaseCfg ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Host string `json:"host"`
Port int `json:"prot"`
User string `json:"user"`
Password string `json:"password"`
DbName string `json:"db_name"`
Type string `json:"type"`
SslMode string `json:"ssl_mode"`
}
DatabaseConfig database config
type IncidentBasicRule ¶
type IncidentItem ¶
type K8sCluster ¶
type K8sConnector ¶
type K8sContainer ¶
type K8sDaemonSet ¶
type K8sDeployment ¶
type K8sNamespace ¶
type K8sObjectTag ¶
type K8sReplicaSet ¶
type K8sStatefulSet ¶
type MetricEndpoint ¶
type MetricLabel ¶
type MetricName ¶
type MetricType ¶
type MetricType struct {
Name string `gorm:"size:32;unique_index"`
MetricNames []MetricName
}
type NextServer ¶
type NextServer struct {
// contains filtered or unexported fields
}
func (*NextServer) CheckNodeBasicIncident ¶
func (s *NextServer) CheckNodeBasicIncident(nodeMetricChan chan ent.Metric)
func (*NextServer) FindCluster ¶
func (s *NextServer) FindCluster() echo.HandlerFunc
FindCluster Find Cluster
func (*NextServer) FindContainer ¶
func (s *NextServer) FindContainer() echo.HandlerFunc
FindContainer find Container
func (*NextServer) FindMetricEndpoint ¶
func (s *NextServer) FindMetricEndpoint() echo.HandlerFunc
FindMetricEndpoint findMetricEndpoint
func (*NextServer) FindMetricLabel ¶
func (s *NextServer) FindMetricLabel() echo.HandlerFunc
FindMetricLabel findMetricLabel
func (*NextServer) FindMetricName ¶
func (s *NextServer) FindMetricName() echo.HandlerFunc
FindMetricName findMetricName
func (*NextServer) FindMetricType ¶
func (s *NextServer) FindMetricType() echo.HandlerFunc
FindMetricType Find Metric Type
func (*NextServer) FindNodeByAgent ¶
func (s *NextServer) FindNodeByAgent() echo.HandlerFunc
FindNodeByAgent find node agent
func (*NextServer) FindNodeById ¶
func (s *NextServer) FindNodeById() echo.HandlerFunc
FindNodeById FindNodeById
func (*NextServer) FindProcess ¶
func (s *NextServer) FindProcess() echo.HandlerFunc
FindProcess find Process
func (*NextServer) FindRemoteAgent ¶
func (s *NextServer) FindRemoteAgent() echo.HandlerFunc
FindRemoteAgent find remote agent
type Node ¶
type Node struct {
Host string `gorm:"size:128"`
Ipv4 string `gorm:"size:16"`
Ipv6 string `gorm:"size:40"`
PublicIpv4 string `gorm:"size:16"`
PublicIpv6 string `gorm:"size:40"`
Os string `gorm:"size:64"`
Platform string `gorm:"size:64"`
PlatformFamily string `gorm:"size:64"`
PlatformVersion string `gorm:"size:64"`
Info postgres.Jsonb
Uuid string `gorm:"size:36;unique_index"`
Description string
Disabled bool
AgentID uint `gorm:"index"`
ClusterID uint `gorm:"index"`
Containers []Container
Processes []Process
}
type ServerConfig ¶
type ServerConfig struct {
BindAddress string `json:"bind_address"`
AgentListenPort int `json:"agent_listen_port"`
ApiPort int `json:"api_port"`
}
ServerConfig server config
Source Files
¶
Click to show internal directories.
Click to hide internal directories.