katamonitor

package
v0.0.0-...-e5e0983 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuntimeContainerd = "containerd"
	RuntimeCRIO       = "cri-o"
)

Variables

This section is empty.

Functions

func GetSandboxMetrics

func GetSandboxMetrics(sandboxID string) (string, error)

GetSandboxMetrics will get sandbox's metrics from shim

func IfReturnHTMLResponse

func IfReturnHTMLResponse(w http.ResponseWriter, r *http.Request) bool

IfReturnHTMLResponse returns true if request accepts html response NOTE: IfReturnHTMLResponse will also set response header to `text/html`

func SetLogger

func SetLogger(logger *logrus.Entry)

SetLogger sets the logger for katamonitor package.

Types

type KataMonitor

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

KataMonitor is monitor agent

func NewKataMonitor

func NewKataMonitor(runtimeEndpoint string) (*KataMonitor, error)

NewKataMonitor create and return a new KataMonitor instance

func (*KataMonitor) ExpvarHandler

func (km *KataMonitor) ExpvarHandler(w http.ResponseWriter, r *http.Request)

ExpvarHandler handles other `/debug/vars` requests

func (*KataMonitor) GetAgentURL

func (km *KataMonitor) GetAgentURL(w http.ResponseWriter, r *http.Request)

GetAgentURL returns agent URL

func (*KataMonitor) ListSandboxes

func (km *KataMonitor) ListSandboxes(w http.ResponseWriter, r *http.Request)

ListSandboxes list all sandboxes running in Kata

func (*KataMonitor) PprofCmdline

func (km *KataMonitor) PprofCmdline(w http.ResponseWriter, r *http.Request)

PprofCmdline handles other `/debug/cmdline` requests

func (*KataMonitor) PprofIndex

func (km *KataMonitor) PprofIndex(w http.ResponseWriter, r *http.Request)

PprofIndex handles other `/debug/pprof/` requests

func (*KataMonitor) PprofProfile

func (km *KataMonitor) PprofProfile(w http.ResponseWriter, r *http.Request)

PprofProfile handles other `/debug/profile` requests

func (*KataMonitor) PprofSymbol

func (km *KataMonitor) PprofSymbol(w http.ResponseWriter, r *http.Request)

PprofSymbol handles other `/debug/symbol` requests

func (*KataMonitor) PprofTrace

func (km *KataMonitor) PprofTrace(w http.ResponseWriter, r *http.Request)

PprofTrace handles other `/debug/trace` requests

func (*KataMonitor) ProcessMetricsRequest

func (km *KataMonitor) ProcessMetricsRequest(w http.ResponseWriter, r *http.Request)

ProcessMetricsRequest get metrics from shim/hypervisor/vm/agent and return metrics to client.

Jump to

Keyboard shortcuts

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