monitor

package
v0.0.0-...-ecdc69b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterLogReadFile

func ClusterLogReadFile() error

func DecodeByte

func DecodeByte(bts []byte) (int64, error)

func DecodeCephFsStatus

func DecodeCephFsStatus() (string, error)

func DecodeFree

func DecodeFree() (int64, error)

func DecodeHostCpu

func DecodeHostCpu() error

func GetMdsMasterHostname

func GetMdsMasterHostname(client *host_client.HostClient) (string, error)

Types

type CephHealth

type CephHealth struct {
	Checks map[string]struct {
		Severity string            `json:"severity"`
		Summary  map[string]string `json:"summary"`
	} `json:"checks"`
	Status string `json:"status"`
}

type DumpHistoricOps

type DumpHistoricOps struct {
	Size     int64 `json:"size"`
	Duration int64 `json:"duration"`
	Ops      []Ops `json:"ops"`
}

func ReadFile

func ReadFile() (*DumpHistoricOps, error)

type ExecConfig

type ExecConfig struct {
	Hostnames   []string `json:"hostnames"`
	Ips         []string `json:"ips"`
	HostClients []*host_client.HostClient
}

func NewExecConfig

func NewExecConfig(configPath string) (*ExecConfig, error)

func (*ExecConfig) CheckHostCpu

func (execConfig *ExecConfig) CheckHostCpu() error

func (*ExecConfig) CheckHostFree

func (execConfig *ExecConfig) CheckHostFree() error

func (*ExecConfig) ReadConfig

func (execConfig *ExecConfig) ReadConfig(configFilePath string) error

func (*ExecConfig) Run

func (execConfig *ExecConfig) Run() error

type MonitorResultItem

type MonitorResultItem struct {
	IsOk    bool   `json:"is_ok"`
	Error   string `json:"error"`
	Success string `json:"success"`
}

func DecodeCephHealth

func DecodeCephHealth() (MonitorResultItem, error)

func GetCephHealth

func GetCephHealth(client *host_client.HostClient) (MonitorResultItem, error)

func GetHostFree

func GetHostFree(client *host_client.HostClient) (MonitorResultItem, error)

func MonitorMdsOps

func MonitorMdsOps(client *host_client.HostClient, hostname string) (MonitorResultItem, error)

type Ops

type Ops struct {
	Description string   `json:"description"`
	InitiatedAt string   `json:"initiated_at"`
	Age         float64  `json:"age"`
	Duration    float64  `json:"duration"`
	TypeData    TypeData `json:"type_data"`
}

type TypeData

type TypeData struct {
	FlagPoint  string `json:"flag_point"`
	ReqID      string `json:"reqid"`
	OpType     string `json:"op_type"`
	ClientInfo struct {
		Client string `json:"client"`
		Tid    int64  `json:"tid"`
	} `json:"client_info"`
	Events []struct {
		Time  string `json:"time"`
		Event string `json:"event"`
	} `json:"events"`
}

Jump to

Keyboard shortcuts

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