trireme-lib: go.aporeto.io/trireme-lib/monitor Index | Files | Directories

package monitor

import "go.aporeto.io/trireme-lib/monitor"

Index

Package Files

interfaces.go monitor.go options.go

func NewMonitor Uses

func NewMonitor(opts ...Options) *config.MonitorConfig

NewMonitor provides a configuration for monitors.

type CNIMonitorOption Uses

type CNIMonitorOption func(*cnimonitor.Config)

CNIMonitorOption is provided using functional arguments.

func SubOptionMonitorCNIExtractor Uses

func SubOptionMonitorCNIExtractor(extractor extractors.EventMetadataExtractor) CNIMonitorOption

SubOptionMonitorCNIExtractor provides a way to specify metadata extractor for CNI monitors.

type DockerMonitorOption Uses

type DockerMonitorOption func(*dockermonitor.Config)

DockerMonitorOption is provided using functional arguments.

func SubOptionMonitorDockerDestroyStoppedContainers Uses

func SubOptionMonitorDockerDestroyStoppedContainers(f bool) DockerMonitorOption

SubOptionMonitorDockerDestroyStoppedContainers sets the option to destroy stopped containers.

func SubOptionMonitorDockerExtractor Uses

func SubOptionMonitorDockerExtractor(extractor extractors.DockerMetadataExtractor) DockerMonitorOption

SubOptionMonitorDockerExtractor provides a way to specify metadata extractor for docker.

func SubOptionMonitorDockerFlags Uses

func SubOptionMonitorDockerFlags(syncAtStart, killContainerOnPolicyError bool) DockerMonitorOption

SubOptionMonitorDockerFlags provides a way to specify configuration flags info for docker.

func SubOptionMonitorDockerSocket Uses

func SubOptionMonitorDockerSocket(socketType, socketAddress string) DockerMonitorOption

SubOptionMonitorDockerSocket provides a way to specify socket info for docker.

type Implementation Uses

type Implementation interface {

    // Run starts the monitor implementation.
    Run(ctx context.Context) error

    // SetupConfig provides a configuration to implmentations. Every implmentation
    // can have its own config type.
    SetupConfig(registerer registerer.Registerer, cfg interface{}) error

    // SetupHandlers sets up handlers for monitors to invoke for various events such as
    // processing unit events and synchronization events. This will be called before Start()
    // by the consumer of the monitor
    SetupHandlers(c *config.ProcessorConfig)

    // Resync should resynchronize PUs. This should be done while starting up.
    Resync(ctx context.Context) error
}

Implementation for a monitor.

type KubernetesMonitorOption Uses

type KubernetesMonitorOption func(*kubernetesmonitor.Config)

KubernetesMonitorOption is provided using functional arguments.

func SubOptionMonitorKubernetesDockerExtractor Uses

func SubOptionMonitorKubernetesDockerExtractor(extractor extractors.DockerMetadataExtractor) KubernetesMonitorOption

SubOptionMonitorKubernetesDockerExtractor provides a way to specify metadata extractor for docker.

func SubOptionMonitorKubernetesExtractor Uses

func SubOptionMonitorKubernetesExtractor(extractor extractors.KubernetesMetadataExtractorType) KubernetesMonitorOption

SubOptionMonitorKubernetesExtractor provides a way to specify metadata extractor for Kubernetes

func SubOptionMonitorKubernetesHostPod Uses

func SubOptionMonitorKubernetesHostPod(enableHostPods bool) KubernetesMonitorOption

SubOptionMonitorKubernetesHostPod provides a way to specify if we want to activate Pods launched in host mode.

func SubOptionMonitorKubernetesKubeconfig Uses

func SubOptionMonitorKubernetesKubeconfig(kubeconfig string) KubernetesMonitorOption

SubOptionMonitorKubernetesKubeconfig provides a way to specify a kubeconfig to use to connect to Kubernetes. In case of an in-cluter config, leave the kubeconfig field blank

func SubOptionMonitorKubernetesNodename Uses

func SubOptionMonitorKubernetesNodename(nodename string) KubernetesMonitorOption

SubOptionMonitorKubernetesNodename provides a way to specify the kubernetes node name. This is useful for filtering

type LinuxMonitorOption Uses

type LinuxMonitorOption func(*linuxmonitor.Config)

LinuxMonitorOption is provided using functional arguments.

func SubOptionMonitorLinuxExtractor Uses

func SubOptionMonitorLinuxExtractor(extractor extractors.EventMetadataExtractor) LinuxMonitorOption

SubOptionMonitorLinuxExtractor provides a way to specify metadata extractor for linux monitors.

func SubOptionMonitorLinuxRealeaseAgentPath Uses

func SubOptionMonitorLinuxRealeaseAgentPath(releasePath string) LinuxMonitorOption

SubOptionMonitorLinuxRealeaseAgentPath specifies the path to release agent programmed in cgroup

func SubOptionMonitorSSHExtractor Uses

func SubOptionMonitorSSHExtractor(extractor extractors.EventMetadataExtractor) LinuxMonitorOption

SubOptionMonitorSSHExtractor provides a way to specify metadata extractor for SSH monitors.

func SubOptionMonitorSSHRealeaseAgentPath Uses

func SubOptionMonitorSSHRealeaseAgentPath(releasePath string) LinuxMonitorOption

SubOptionMonitorSSHRealeaseAgentPath specifies the path to release agent programmed in cgroup

type Monitor Uses

type Monitor interface {

    // Start starts the monitor.
    Run(ctx context.Context) error

    // UpdateConfiguration updates the configuration of the monitor
    UpdateConfiguration(ctx context.Context, config *config.MonitorConfig) error

    // Resync requests to the monitor to do a resync.
    Resync(ctx context.Context) error
}

A Monitor is an interface implmented to start/stop monitors.

func NewMonitors Uses

func NewMonitors(opts ...Options) (Monitor, error)

NewMonitors instantiates all/any combination of monitors supported.

type Options Uses

type Options func(*config.MonitorConfig)

Options is provided using functional arguments.

func OptionCollector Uses

func OptionCollector(c collector.EventCollector) Options

OptionCollector provide a way to add to the docker monitor the collector instance

func OptionMergeTags Uses

func OptionMergeTags(tags []string) Options

OptionMergeTags provides a way to add merge tags to be used with New().

func OptionMonitorCNI Uses

func OptionMonitorCNI(
    opts ...CNIMonitorOption,
) Options

OptionMonitorCNI provides a way to add a cni monitor and related configuration to be used with New().

func OptionMonitorDocker Uses

func OptionMonitorDocker(opts ...DockerMonitorOption) Options

OptionMonitorDocker provides a way to add a docker monitor and related configuration to be used with New().

func OptionMonitorKubernetes Uses

func OptionMonitorKubernetes(opts ...KubernetesMonitorOption) Options

OptionMonitorKubernetes provides a way to add a docker monitor and related configuration to be used with New().

func OptionMonitorLinuxHost Uses

func OptionMonitorLinuxHost(
    opts ...LinuxMonitorOption,
) Options

OptionMonitorLinuxHost provides a way to add a linux host monitor and related configuration to be used with New().

func OptionMonitorLinuxProcess Uses

func OptionMonitorLinuxProcess(
    opts ...LinuxMonitorOption,
) Options

OptionMonitorLinuxProcess provides a way to add a linux process monitor and related configuration to be used with New().

func OptionMonitorPod Uses

func OptionMonitorPod(opts ...PodMonitorOption) Options

OptionMonitorPod provides a way to add a Pod monitor and related configuration to be used with New().

func OptionMonitorSSH Uses

func OptionMonitorSSH(
    opts ...LinuxMonitorOption,
) Options

OptionMonitorSSH provides a way to add a SSH monitor and related configuration to be used with New().

func OptionMonitorUID Uses

func OptionMonitorUID(
    opts ...UIDMonitorOption,
) Options

OptionMonitorUID provides a way to add a UID monitor and related configuration to be used with New().

func OptionPolicyResolver Uses

func OptionPolicyResolver(p policy.Resolver) Options

OptionPolicyResolver provides a way to add to the docker monitor the policy resolver instance

type PodMonitorOption Uses

type PodMonitorOption func(*podmonitor.Config)

PodMonitorOption is provided using functional arguments.

func SubOptionMonitorPodActivateHostPods Uses

func SubOptionMonitorPodActivateHostPods(enableHostPods bool) PodMonitorOption

SubOptionMonitorPodActivateHostPods provides a way to specify if we want to activate Pods launched in host mode.

func SubOptionMonitorPodKubeconfig Uses

func SubOptionMonitorPodKubeconfig(kubeconfig string) PodMonitorOption

SubOptionMonitorPodKubeconfig provides a way to specify a kubeconfig to use to connect to Kubernetes. In case of an in-cluter config, leave the kubeconfig field blank

func SubOptionMonitorPodMetadataExtractor Uses

func SubOptionMonitorPodMetadataExtractor(extractor extractors.PodMetadataExtractor) PodMonitorOption

SubOptionMonitorPodMetadataExtractor provides a way to specify metadata extractor for Kubernetes

func SubOptionMonitorPodNetclsProgrammer Uses

func SubOptionMonitorPodNetclsProgrammer(netclsprogrammer extractors.PodNetclsProgrammer) PodMonitorOption

SubOptionMonitorPodNetclsProgrammer provides a way to program the net_cls cgroup for host network pods in Kubernetes

func SubOptionMonitorPodNodename Uses

func SubOptionMonitorPodNodename(nodename string) PodMonitorOption

SubOptionMonitorPodNodename provides a way to specify the kubernetes node name. This is useful for filtering

func SubOptionMonitorPodPidsSetMaxProcsProgrammer Uses

func SubOptionMonitorPodPidsSetMaxProcsProgrammer(pidsprogrammer extractors.PodPidsSetMaxProcsProgrammer) PodMonitorOption

SubOptionMonitorPodPidsSetMaxProcsProgrammer provides a way to program the pids cgroup for pods in Kubernetes

func SubOptionMonitorPodResetNetcls Uses

func SubOptionMonitorPodResetNetcls(resetnetcls extractors.ResetNetclsKubepods) PodMonitorOption

SubOptionMonitorPodResetNetcls provides a way to reset all net_cls cgroups on resync

func SubOptionMonitorPodWorkers Uses

func SubOptionMonitorPodWorkers(workers int) PodMonitorOption

SubOptionMonitorPodWorkers provides a way to specify the maximum number of workers that are used in the controller.

func SubOptionMonitorSandboxExtractor Uses

func SubOptionMonitorSandboxExtractor(extractor extractors.PodSandboxExtractor) PodMonitorOption

SubOptionMonitorSandboxExtractor provides a way to specify metadata extractor for Kubernetes

type UIDMonitorOption Uses

type UIDMonitorOption func(*uidmonitor.Config)

UIDMonitorOption is provided using functional arguments.

func SubOptionMonitorUIDExtractor Uses

func SubOptionMonitorUIDExtractor(extractor extractors.EventMetadataExtractor) UIDMonitorOption

SubOptionMonitorUIDExtractor provides a way to specify metadata extractor for UID monitors.

func SubOptionMonitorUIDRealeaseAgentPath Uses

func SubOptionMonitorUIDRealeaseAgentPath(releasePath string) UIDMonitorOption

SubOptionMonitorUIDRealeaseAgentPath specifies the path to release agent programmed in cgroup

Directories

PathSynopsis
config
constants
extractors
internal/cni
internal/docker
internal/docker/mockdockerPackage mockdocker is a generated GoMock package.
internal/kubernetes
internal/linux
internal/pod
internal/uid
mockmonitorPackage mockmonitor is a generated GoMock package.
processor
processor/mockprocessorPackage mockprocessor is a generated GoMock package.
registerer
remoteapi/client
remoteapi/client/mockclientPackage mockclient is a generated GoMock package.
remoteapi/server

Package monitor imports 16 packages (graph) and is imported by 1 packages. Updated 2019-11-18. Refresh now. Tools for package owners.