metrics

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// HandlerPath is the default path for serving metrics.
	HandlerPath = "/metrics-spod"
)

Variables

This section is empty.

Functions

func Dial

Dial can be used to connect to the default GRPC server by creating a new client.

Types

type Metrics

type Metrics struct {
	api.UnimplementedMetricsServer
	// contains filtered or unexported fields
}

Metrics is the main structure of this package.

func New

func New() *Metrics

New returns a new Metrics instance.

func (*Metrics) AuditInc

func (m *Metrics) AuditInc(
	stream api.Metrics_AuditIncServer,
) error

AuditInc updates the metrics for the audit counter.

func (*Metrics) BpfInc

func (m *Metrics) BpfInc(stream api.Metrics_BpfIncServer) error

BpfInc updates the metrics for the bpf counter.

func (*Metrics) Handler

func (m *Metrics) Handler() http.Handler

Handler creates an HTTP handler for the metrics.

func (*Metrics) IncAppArmorProfileAudit

func (m *Metrics) IncAppArmorProfileAudit(
	node, namespace, pod, container, executable, syscall string,
)

IncAppArmorProfileAudit increments the apparmor profile audit counter for the provided labels.

func (*Metrics) IncAppArmorProfileDelete

func (m *Metrics) IncAppArmorProfileDelete()

IncAppArmorProfileDelete increments the apparmor profile deletion counter.

func (*Metrics) IncAppArmorProfileError

func (m *Metrics) IncAppArmorProfileError(reason string)

IncAppArmorProfileError increments the apparmor profile error counter for the provided reason.

func (*Metrics) IncAppArmorProfileUpdate

func (m *Metrics) IncAppArmorProfileUpdate()

IncAppArmorProfileUpdate increments the apparmor profile update counter.

func (*Metrics) IncSeccompProfileAudit

func (m *Metrics) IncSeccompProfileAudit(
	node, namespace, pod, container, executable, syscall string,
)

IncSeccompProfileAudit increments the seccomp profile audit counter for the provided labels.

func (*Metrics) IncSeccompProfileBpf

func (m *Metrics) IncSeccompProfileBpf(
	node, profile string, mountNamespace uint32,
)

IncSeccompProfileBpf increments the seccomp profile bpf counter for the provided labels.

func (*Metrics) IncSeccompProfileDelete

func (m *Metrics) IncSeccompProfileDelete()

IncSeccompProfileDelete increments the seccomp profile deletion counter.

func (*Metrics) IncSeccompProfileError

func (m *Metrics) IncSeccompProfileError(reason string)

IncSeccompProfileError increments the seccomp profile error counter for the provided reason.

func (*Metrics) IncSeccompProfileUpdate

func (m *Metrics) IncSeccompProfileUpdate()

IncSeccompProfileUpdate increments the seccomp profile update counter.

func (*Metrics) IncSelinuxProfileAudit

func (m *Metrics) IncSelinuxProfileAudit(
	node, namespace, pod, container, executable, scontext, tcontext string,
)

IncSelinuxProfileAudit increments the selinux profile audit counter for the provided labels.

func (*Metrics) IncSelinuxProfileDelete

func (m *Metrics) IncSelinuxProfileDelete()

IncSelinuxProfileDelete increments the selinux profile deletion counter.

func (*Metrics) IncSelinuxProfileError

func (m *Metrics) IncSelinuxProfileError(reason string)

IncSelinuxProfileError increments the selinux profile error counter for the provided reason.

func (*Metrics) IncSelinuxProfileUpdate

func (m *Metrics) IncSelinuxProfileUpdate()

IncSelinuxProfileUpdate increments the selinux profile update counter.

func (*Metrics) Register

func (m *Metrics) Register() error

Register iterates over all available metrics and registers them.

func (*Metrics) ServeGRPC

func (m *Metrics) ServeGRPC() error

ServeGRPC runs the GRPC API server in the background.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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