aggregator

package
v0.78.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 32 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreTagsSubsetOfOtherTags

func AreTagsSubsetOfOtherTags(tags, otherTags []string) bool

AreTagsSubsetOfOtherTags return true is all tags are in otherTags

func FilterByTags

func FilterByTags[P PayloadItem](payloads []P, tags []string) []P

FilterByTags return the payloads that match all the tags

Types

type APMStatsAggregator added in v0.52.0

type APMStatsAggregator struct {
	Aggregator[*APMStatsPayload]
}

APMStatsAggregator is an Aggregator for APMStatsPayload

func NewAPMStatsAggregator added in v0.52.0

func NewAPMStatsAggregator() APMStatsAggregator

NewAPMStatsAggregator returns a new APMStatsAggregator

type APMStatsPayload added in v0.52.0

type APMStatsPayload struct {
	*pb.StatsPayload
	// contains filtered or unexported fields
}

APMStatsPayload is a payload type for APM stats It implements PayloadItem

func ParseAPMStatsPayload added in v0.52.0

func ParseAPMStatsPayload(payload api.Payload) ([]*APMStatsPayload, error)

ParseAPMStatsPayload parses an api.Payload into a list of APMStatsPayload

func (*APMStatsPayload) GetCollectedTime added in v0.52.0

func (p *APMStatsPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake APMStatsPayload implements PayloadItem

func (*APMStatsPayload) GetTags added in v0.52.0

func (p *APMStatsPayload) GetTags() []string

GetTags is not implemented

type AgentHealthAggregator added in v0.77.0

type AgentHealthAggregator struct {
	Aggregator[*AgentHealthPayload]
}

AgentHealthAggregator is a type that represents an agent health aggregator

func NewAgentHealthAggregator added in v0.77.0

func NewAgentHealthAggregator() AgentHealthAggregator

NewAgentHealthAggregator returns a new agent health aggregator

type AgentHealthPayload added in v0.77.0

type AgentHealthPayload struct {
	*healthplatform.HealthReport
	// contains filtered or unexported fields
}

AgentHealthPayload represents a health report payload from the agent

func ParseAgentHealthPayload added in v0.77.0

func ParseAgentHealthPayload(payload api.Payload) (agentHealthPayloads []*AgentHealthPayload, err error)

ParseAgentHealthPayload parses the agent health payload from the API

func (*AgentHealthPayload) GetCollectedTime added in v0.77.0

func (ahp *AgentHealthPayload) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*AgentHealthPayload) GetTags added in v0.77.0

func (ahp *AgentHealthPayload) GetTags() []string

GetTags return the tags from a payload

type Aggregator

type Aggregator[P PayloadItem] struct {
	// contains filtered or unexported fields
}

Aggregator is a generic payload aggregator

func (*Aggregator[P]) ContainsPayloadName

func (agg *Aggregator[P]) ContainsPayloadName(name string) bool

ContainsPayloadName return true if name match one of the payloads

func (*Aggregator[P]) ContainsPayloadNameAndTags

func (agg *Aggregator[P]) ContainsPayloadNameAndTags(name string, tags []string) bool

ContainsPayloadNameAndTags return true if the payload name exist and on of the payloads contains all the tags

func (*Aggregator[P]) GetNames

func (agg *Aggregator[P]) GetNames() []string

GetNames return the names of the payloads

func (*Aggregator[P]) GetPayloadsByName

func (agg *Aggregator[P]) GetPayloadsByName(name string) []P

GetPayloadsByName return the payloads for the resource name

func (*Aggregator[P]) MarshalJSON added in v0.78.0

func (agg *Aggregator[P]) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler so that the unexported payloadsByName map is included in JSON output (e.g. from the fakeintake CLI client).

func (*Aggregator[P]) Reset

func (agg *Aggregator[P]) Reset()

Reset the aggregation

func (*Aggregator[P]) UnmarshallPayloads

func (agg *Aggregator[P]) UnmarshallPayloads(payloads []api.Payload) error

UnmarshallPayloads parses a list of payloads and stores them in the aggregator It replaces the current payloads with the new ones

type CheckRun

type CheckRun struct {
	Check     string   `json:"check"`
	HostName  string   `json:"host_name"`
	Timestamp int      `json:"timestamp"`
	Status    int      `json:"status"`
	Message   string   `json:"message"`
	Tags      []string `json:"tags"`
	// contains filtered or unexported fields
}

CheckRun represents a check run payload

func ParseCheckRunPayload

func ParseCheckRunPayload(payload api.Payload) (checks []*CheckRun, err error)

ParseCheckRunPayload return the parsed checkRun from payload

func (*CheckRun) GetCollectedTime added in v0.49.0

func (cr *CheckRun) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*CheckRun) GetTags

func (cr *CheckRun) GetTags() []string

GetTags return the tags from a payload

type CheckRunAggregator

type CheckRunAggregator struct {
	Aggregator[*CheckRun]
}

CheckRunAggregator is an Aggregator for check run payloads

func NewCheckRunAggregator

func NewCheckRunAggregator() CheckRunAggregator

NewCheckRunAggregator returns a new CheckRunAggregator

type Connections added in v0.49.0

type Connections struct {
	agentmodel.CollectorConnections
	// contains filtered or unexported fields
}

Connections type contain all payload from /api/v1/connections

func ParseConnections added in v0.49.0

func ParseConnections(payload api.Payload) (conns []*Connections, err error)

ParseConnections return the Connections from payload

func (*Connections) GetCollectedTime added in v0.49.0

func (c *Connections) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*Connections) GetTags added in v0.49.0

func (c *Connections) GetTags() []string

GetTags return tags connection

type ConnectionsAggregator added in v0.49.0

type ConnectionsAggregator struct {
	Aggregator[*Connections]
}

ConnectionsAggregator aggregate connections

func NewConnectionsAggregator added in v0.49.0

func NewConnectionsAggregator() ConnectionsAggregator

NewConnectionsAggregator create a new aggregator

func (*ConnectionsAggregator) ForeachConnection added in v0.50.0

func (ca *ConnectionsAggregator) ForeachConnection(callback func(c *agentmodel.Connection, cc *agentmodel.CollectorConnections, hostname string))

ForeachConnection will call the callback for each connection per hostname/netID and CollectorConnections payloads

func (*ConnectionsAggregator) ForeachHostnameConnections added in v0.52.0

func (ca *ConnectionsAggregator) ForeachHostnameConnections(callback func(cnx *Connections, hostname string))

ForeachHostnameConnections will call the callback for each Connections per hostname/netID payloads

type ContainerAggregator added in v0.50.0

type ContainerAggregator struct {
	Aggregator[*ContainerPayload]
}

ContainerAggregator is an Aggregator for ContainerPayload

func NewContainerAggregator added in v0.50.0

func NewContainerAggregator() ContainerAggregator

NewContainerAggregator returns a new ContainerAggregator

type ContainerImageAggregator added in v0.51.0

type ContainerImageAggregator struct {
	Aggregator[*ContainerImagePayload]
}

ContainerImageAggregator is an Aggregator for ContainerImagePayload

func NewContainerImageAggregator added in v0.51.0

func NewContainerImageAggregator() ContainerImageAggregator

NewContainerImageAggregator returns a new ContainerImageAggregator

type ContainerImagePayload added in v0.51.0

type ContainerImagePayload struct {
	*agentmodel.ContainerImage
	// contains filtered or unexported fields
}

ContainerImagePayload is a payload type for the container image check

func ParseContainerImagePayload added in v0.51.0

func ParseContainerImagePayload(payload api.Payload) ([]*ContainerImagePayload, error)

ParseContainerImagePayload parses an api.Payload into a list of ContainerImagePayload

func (*ContainerImagePayload) GetCollectedTime added in v0.51.0

func (p *ContainerImagePayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (*ContainerImagePayload) GetTags added in v0.51.0

func (p *ContainerImagePayload) GetTags() []string

GetTags return the tags from a payload

type ContainerLifecycleAggregator added in v0.51.0

type ContainerLifecycleAggregator struct {
	Aggregator[*ContainerLifecyclePayload]
}

ContainerLifecycleAggregator is an Aggregator for ContainerLifecyclePayload

func NewContainerLifecycleAggregator added in v0.51.0

func NewContainerLifecycleAggregator() ContainerLifecycleAggregator

NewContainerLifecycleAggregator returns a new ContainerLifecycleAggregator

type ContainerLifecyclePayload added in v0.51.0

type ContainerLifecyclePayload struct {
	*agentmodel.Event
	// contains filtered or unexported fields
}

ContainerLifecyclePayload is a payload type for the container lifecycle check

func ParseContainerLifecyclePayload added in v0.51.0

func ParseContainerLifecyclePayload(payload api.Payload) ([]*ContainerLifecyclePayload, error)

ParseContainerLifecyclePayload parses an api.Payload into a list of ContainerLifecyclePayload

func (*ContainerLifecyclePayload) GetCollectedTime added in v0.51.0

func (p *ContainerLifecyclePayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (*ContainerLifecyclePayload) GetTags added in v0.51.0

func (p *ContainerLifecyclePayload) GetTags() []string

GetTags is not implemented for container lifecycle payloads

type ContainerPayload added in v0.50.0

type ContainerPayload struct {
	agentmodel.CollectorContainer
	// contains filtered or unexported fields
}

ContainerPayload is a payload type for the container check

func ParseContainerPayload added in v0.50.0

func ParseContainerPayload(payload api.Payload) ([]*ContainerPayload, error)

ParseContainerPayload parses an api.Payload into a list of ContainerPayload

func (ContainerPayload) GetCollectedTime added in v0.50.0

func (p ContainerPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (ContainerPayload) GetTags added in v0.50.0

func (p ContainerPayload) GetTags() []string

GetTags is not implemented for container payloads

type DatadogMetricOriginMetadata added in v0.50.0

type DatadogMetricOriginMetadata struct {
	// OriginProduct
	Product uint32 `json:"product,omitempty"`
	// OriginCategory
	Category uint32 `json:"category,omitempty"`
	// OriginService
	Service uint32 `json:"service,omitempty"`
}

DatadogMetricOriginMetadata informations

type DatadogMetricType added in v0.50.0

type DatadogMetricType string

DatadogMetricType represent different metrics types

const (
	// Gauge DatadogMetricType
	Gauge DatadogMetricType = "gauge"
	// Count DatadogMetricType
	Count DatadogMetricType = "count"
	// Rate DatadogMetricType
	Rate DatadogMetricType = "rate"
)

type DatadogSeriesMetricMetadata added in v0.50.0

type DatadogSeriesMetricMetadata struct {
	Origin DatadogMetricOriginMetadata `json:"origin,omitempty"`
}

DatadogSeriesMetricMetadata contains DatadogMetricMetadata

type DeviceMetadata added in v0.66.0

type DeviceMetadata struct {
	ID             string   `json:"id"`
	IDTags         []string `json:"id_tags"`
	Tags           []string `json:"tags"`
	IPAddress      string   `json:"ip_address"`
	Status         int32    `json:"status"`
	PingStatus     int32    `json:"ping_status,omitempty"`
	Name           string   `json:"name,omitempty"`
	Description    string   `json:"description,omitempty"`
	SysObjectID    string   `json:"sys_object_id,omitempty"`
	Location       string   `json:"location,omitempty"`
	Profile        string   `json:"profile,omitempty"`
	ProfileVersion uint64   `json:"profile_version,omitempty"`
	Vendor         string   `json:"vendor,omitempty"`
	Subnet         string   `json:"subnet,omitempty"`
	SerialNumber   string   `json:"serial_number,omitempty"`
	Version        string   `json:"version,omitempty"`
	ProductName    string   `json:"product_name,omitempty"`
	Model          string   `json:"model,omitempty"`
	OsName         string   `json:"os_name,omitempty"`
	OsVersion      string   `json:"os_version,omitempty"`
	OsHostname     string   `json:"os_hostname,omitempty"`
	Integration    string   `json:"integration,omitempty"`
	DeviceType     string   `json:"device_type,omitempty"`
}

DeviceMetadata contains device metadata

type Diagnosis added in v0.66.0

type Diagnosis struct {
	Severity string `json:"severity"`
	Message  string `json:"message"`
	Code     string `json:"code"`
}

Diagnosis contains data for a diagnosis

type DiagnosisMetadata added in v0.66.0

type DiagnosisMetadata struct {
	ResourceType string      `json:"resource_type"`
	ResourceID   string      `json:"resource_id"`
	Diagnoses    []Diagnosis `json:"diagnoses"`
}

DiagnosisMetadata contains diagnoses info

type Event added in v0.64.0

type Event struct {
	Source string
	*event.Event
	// contains filtered or unexported fields
}

Event is a payload type for events

func ParseEventPayload added in v0.64.0

func ParseEventPayload(payload api.Payload) ([]*Event, error)

ParseEventPayload parses a payload into a list of EventPayload

func (*Event) GetCollectedTime added in v0.64.0

func (p *Event) GetCollectedTime() time.Time

GetCollectedTime returns the time at which the event was received by the fake intake

func (*Event) GetTags added in v0.64.0

func (p *Event) GetTags() []string

GetTags returns the tags from a payload

type EventAggregator added in v0.64.0

type EventAggregator struct {
	Aggregator[*Event]
}

EventAggregator struct {

func NewEventAggregator added in v0.64.0

func NewEventAggregator() EventAggregator

NewEventAggregator returns a new EventAggregator

type HostTags added in v0.76.0

type HostTags struct {
	InternalHostname string
	HostTags         []string
	// contains filtered or unexported fields
}

HostTags struct contains agents host-tags payload and attributes to fit Aggregator implementation

Use a pointer to assign `HostTags` inner struct. When we ParseHostPayload we receive variaous payload types. We only want to keep those with host-tags Using a pointer allows us to check if the pointer has been allocated and therefore found the right payload

func ParseHostTagsPayload added in v0.76.0

func ParseHostTagsPayload(payload api.Payload) ([]*HostTags, error)

ParseHostTagsPayload parses the generic payload and returns a typed struct with hostImpl data

func (*HostTags) GetCollectedTime added in v0.76.0

func (host *HostTags) GetCollectedTime() time.Time

GetCollectedTime return the time the payload was collected

func (*HostTags) GetTags added in v0.76.0

func (host *HostTags) GetTags() []string

GetTags returns the tags collected by the payload currently none

type HostTagsAggregator added in v0.76.0

type HostTagsAggregator struct {
	Aggregator[*HostTags]
}

HostTagsAggregator structure

func NewHostTagsAggregator added in v0.76.0

func NewHostTagsAggregator() HostTagsAggregator

NewHostTagsAggregator returns a new Host aggregator

type InterfaceMetadata added in v0.66.0

type InterfaceMetadata struct {
	DeviceID      string   `json:"device_id"`
	IDTags        []string `json:"id_tags"`
	Index         int32    `json:"index"`
	RawID         string   `json:"raw_id,omitempty"`
	RawIDType     string   `json:"raw_id_type,omitempty"`
	Name          string   `json:"name,omitempty"`
	Alias         string   `json:"alias,omitempty"`
	Description   string   `json:"description,omitempty"`
	MacAddress    string   `json:"mac_address,omitempty"`
	AdminStatus   int      `json:"admin_status,omitempty"`
	OperStatus    int      `json:"oper_status,omitempty"`
	MerakiEnabled *bool    `json:"meraki_enabled,omitempty"`
	MerakiStatus  string   `json:"meraki_status,omitempty"`
}

InterfaceMetadata contains interface metadata

type Log

type Log struct {
	Message   string `json:"message"`
	Status    string `json:"status"`
	Timestamp int    `json:"timestamp"`
	HostName  string `json:"hostname"`
	Service   string `json:"service"`
	Source    string `json:"ddsource"`
	Tags      tags   `json:"ddtags"`
	// contains filtered or unexported fields
}

Log represents a log payload

func ParseLogPayload

func ParseLogPayload(payload api.Payload) (logs []*Log, err error)

ParseLogPayload return the parsed logs from payload

func (*Log) GetCollectedTime added in v0.49.0

func (l *Log) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*Log) GetTags

func (l *Log) GetTags() []string

GetTags return the tags from a payload

type LogAggregator

type LogAggregator struct {
	Aggregator[*Log]
}

LogAggregator is an aggregator for logs

func NewLogAggregator

func NewLogAggregator() LogAggregator

NewLogAggregator returns a new LogAggregator

type MetadataAggregator added in v0.52.0

type MetadataAggregator struct {
	Aggregator[*MetadataPayload]
}

MetadataAggregator is a type that represents a metadata aggregator

func NewMetadataAggregator added in v0.52.0

func NewMetadataAggregator() MetadataAggregator

NewMetadataAggregator returns a new metadata aggregator

type MetadataPayload added in v0.52.0

type MetadataPayload struct {
	Hostname  string                 `json:"hostname"`
	Timestamp int64                  `json:"timestamp"`
	Metadata  map[string]interface{} `json:"agent_metadata"`
	// contains filtered or unexported fields
}

A MetadataPayload is a struct that represents a metadata payload

func ParseMetadataPayload added in v0.52.0

func ParseMetadataPayload(payload api.Payload) (metadataPayloads []*MetadataPayload, err error)

ParseMetadataPayload return the parsed metadata from payload

func (*MetadataPayload) GetCollectedTime added in v0.52.0

func (mp *MetadataPayload) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*MetadataPayload) GetTags added in v0.52.0

func (mp *MetadataPayload) GetTags() []string

GetTags return the tags from a payload

type MetricAggregator

type MetricAggregator struct {
	Aggregator[*MetricSeries]
}

MetricAggregator is an Aggregator for metric series payloads

func NewMetricAggregator

func NewMetricAggregator() MetricAggregator

NewMetricAggregator returns a new MetricAggregator

type MetricAggregatorV1 added in v0.50.0

type MetricAggregatorV1 struct {
	Aggregator[*MetricSeriesV1]
}

MetricAggregatorV1 Aggregator

type MetricSeries

type MetricSeries struct {
	// embed proto Metric Series struct
	metricspb.MetricPayload_MetricSeries
	// contains filtered or unexported fields
}

MetricSeries represents a metric series payload

func ParseMetricSeries

func ParseMetricSeries(payload api.Payload) (metrics []*MetricSeries, err error)

ParseMetricSeries return the parsed metrics from payload

func (*MetricSeries) GetCollectedTime added in v0.49.0

func (mp *MetricSeries) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*MetricSeries) GetTags

func (mp *MetricSeries) GetTags() []string

GetTags return the tags from a payload

type MetricSeriesV1 added in v0.50.0

type MetricSeriesV1 struct {
	Metric         string                      `json:"metric"`
	Type           DatadogMetricType           `json:"type"`
	Interval       uint32                      `json:"interval,omitempty"`
	Points         [][2]interface{}            `json:"points"`
	Tags           []string                    `json:"tags,omitempty"`
	Host           string                      `json:"host,omitempty"`
	SourceTypeName string                      `json:"source_type_name,omitempty"`
	Device         string                      `json:"device,omitempty"`
	Metadata       DatadogSeriesMetricMetadata `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

MetricSeriesV1 contains all information of a metric in V1 Following API specifications V1 https://docs.datadoghq.com/api/latest/metrics/#submit-metrics Agent submit implementation is https://github.com/DataDog/datadog-agent/blob/af712ce616266987e35e621f0c8f78cbc81716f9/pkg/metrics/series.go#L49-L63

func ParseV1MetricSeries added in v0.50.0

func ParseV1MetricSeries(payload api.Payload) (metrics []*MetricSeriesV1, err error)

ParseV1MetricSeries return the parsed metrics from payload

func (*MetricSeriesV1) GetCollectedTime added in v0.50.0

func (mp *MetricSeriesV1) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*MetricSeriesV1) GetTags added in v0.50.0

func (mp *MetricSeriesV1) GetTags() []string

GetTags return the tags from a payload

type MetricSeriesV1Header added in v0.50.0

type MetricSeriesV1Header struct {
	Series []*MetricSeriesV1 `json:"series"`
}

MetricSeriesV1Header contains a MetricSeriesV1

type NCMAggregator added in v0.74.0

type NCMAggregator struct {
	Aggregator[*NCMPayload]
}

NCMAggregator is an Aggregator for NCM payloads

func NewNCMAggregator added in v0.74.0

func NewNCMAggregator() NCMAggregator

NewNCMAggregator return a new NCMAggregator

type NCMPayload added in v0.74.0

type NCMPayload struct {
	Namespace        string                `json:"namespace"`
	Configs          []NetworkDeviceConfig `json:"configs"`
	CollectTimestamp int64                 `json:"collect_timestamp"`
	// contains filtered or unexported fields
}

NCMPayload represents a network config management payload

func ParseNCMPayload added in v0.74.0

func ParseNCMPayload(payload api.Payload) (ncmPayloads []*NCMPayload, err error)

ParseNCMPayload parses an api.Payload into a list of NCMPayload

func (*NCMPayload) GetCollectedTime added in v0.74.0

func (p *NCMPayload) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*NCMPayload) GetTags added in v0.74.0

func (p *NCMPayload) GetTags() []string

GetTags return the tags from a payload

type NDMAggregator added in v0.66.0

type NDMAggregator struct {
	Aggregator[*NDMPayload]
}

NDMAggregator is an Aggregator for NDM payloads

func NewNDMAggregator added in v0.66.0

func NewNDMAggregator() NDMAggregator

NewNDMAggregator returns a new NDMAggregator

type NDMFlow added in v0.54.0

type NDMFlow struct {
	payload.FlowPayload
	// contains filtered or unexported fields
}

NDMFlow represents an ndmflow payload

func ParseNDMFlowPayload added in v0.54.0

func ParseNDMFlowPayload(payload api.Payload) (ndmflows []*NDMFlow, err error)

ParseNDMFlowPayload parses an api.Payload into a list of NDMFlow

func (*NDMFlow) GetCollectedTime added in v0.54.0

func (p *NDMFlow) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*NDMFlow) GetTags added in v0.54.0

func (p *NDMFlow) GetTags() []string

GetTags return the tags from a payload

type NDMFlowAggregator added in v0.54.0

type NDMFlowAggregator struct {
	Aggregator[*NDMFlow]
}

NDMFlowAggregator is an Aggregator for ndmflow payloads

func NewNDMFlowAggregator added in v0.54.0

func NewNDMFlowAggregator() NDMFlowAggregator

NewNDMFlowAggregator return a new NDMFlowAggregator

type NDMPayload added in v0.66.0

type NDMPayload struct {

	// We redefine NetworkDevicesMetadata from pkg/networkdevice/metadata to not have to export it
	Subnet           string              `json:"subnet,omitempty"`
	Namespace        string              `json:"namespace"`
	Integration      string              `json:"integration"`
	Devices          []DeviceMetadata    `json:"devices,omitempty"`
	Interfaces       []InterfaceMetadata `json:"interfaces,omitempty"`
	Diagnoses        []DiagnosisMetadata `json:"diagnoses,omitempty"`
	CollectTimestamp int64               `json:"collect_timestamp"`
	// contains filtered or unexported fields
}

NDMPayload represents an NDM payload

func ParseNDMPayload added in v0.66.0

func ParseNDMPayload(payload api.Payload) (ndmPayloads []*NDMPayload, err error)

ParseNDMPayload parses an api.Payload into a list of NDMPayload

func (*NDMPayload) GetCollectedTime added in v0.66.0

func (p *NDMPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time when the payload has been collected by the fakeintake server

func (*NDMPayload) GetTags added in v0.66.0

func (p *NDMPayload) GetTags() []string

GetTags returns the tags from a payload

type Netpath added in v0.64.0

type Netpath struct {
	payload.NetworkPath
	// contains filtered or unexported fields
}

Netpath represents a network path payload

func ParseNetpathPayload added in v0.64.0

func ParseNetpathPayload(payload api.Payload) (netpaths []*Netpath, err error)

ParseNetpathPayload parses an api.Payload into a list of Netpath

func (*Netpath) GetCollectedTime added in v0.64.0

func (p *Netpath) GetCollectedTime() time.Time

GetCollectedTime return the time when the payload has been collected by the fakeintake server

func (*Netpath) GetTags added in v0.64.0

func (p *Netpath) GetTags() []string

GetTags return the tags from a payload

type NetpathAggregator added in v0.64.0

type NetpathAggregator struct {
	Aggregator[*Netpath]
}

NetpathAggregator is an Aggregator for netpath payloads

func NewNetpathAggregator added in v0.64.0

func NewNetpathAggregator() NetpathAggregator

NewNetpathAggregator return a new NetpathAggregator

type NetworkDeviceConfig added in v0.74.0

type NetworkDeviceConfig struct {
	DeviceID   string   `json:"device_id"`
	DeviceIP   string   `json:"device_ip"`
	ConfigType string   `json:"config_type"`
	Timestamp  int64    `json:"timestamp"`
	Tags       []string `json:"tags"`
	Content    string   `json:"content"`
}

NetworkDeviceConfig contains network device configuration for a single device

type OrchestratorAggregator added in v0.52.0

type OrchestratorAggregator struct {
	Aggregator[*OrchestratorPayload]
}

OrchestratorAggregator is an Aggregator for OrchestratorPayload

func NewOrchestratorAggregator added in v0.52.0

func NewOrchestratorAggregator() OrchestratorAggregator

NewOrchestratorAggregator returns a new OrchestratorAggregator

type OrchestratorManifestAggregator added in v0.52.0

type OrchestratorManifestAggregator struct {
	Aggregator[*OrchestratorManifestPayload]
}

OrchestratorManifestAggregator is an Aggregator for OrchestratorManifestPayload

func NewOrchestratorManifestAggregator added in v0.52.0

func NewOrchestratorManifestAggregator() OrchestratorManifestAggregator

NewOrchestratorManifestAggregator returns a new OrchestratorManifestAggregator

type OrchestratorManifestPayload added in v0.52.0

type OrchestratorManifestPayload struct {
	Type          agentmodel.MessageType
	CollectedTime time.Time

	Manifest                *agentmodel.Manifest
	ManifestParentCollector *agentmodel.CollectorManifest
}

OrchestratorManifestPayload is a payload type for the OrchestratorManif check

func ParseOrchestratorManifestPayload added in v0.52.0

func ParseOrchestratorManifestPayload(payload api.Payload) ([]*OrchestratorManifestPayload, error)

ParseOrchestratorManifestPayload parses an api.Payload into a list of OrchestratorManifestPayload

func (OrchestratorManifestPayload) GetCollectedTime added in v0.52.0

func (p OrchestratorManifestPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (OrchestratorManifestPayload) GetTags added in v0.52.0

func (p OrchestratorManifestPayload) GetTags() []string

GetTags is not implemented for OrchestratorManifestPayload

type OrchestratorPayload added in v0.52.0

type OrchestratorPayload struct {
	Type          agentmodel.MessageType
	UID           string
	Name          string
	Tags          []string
	CollectedTime time.Time

	Pod                                  *agentmodel.Pod
	PodParentCollector                   *agentmodel.CollectorPod
	ReplicaSet                           *agentmodel.ReplicaSet
	ReplicaSetParentCollector            *agentmodel.CollectorReplicaSet
	Deployment                           *agentmodel.Deployment
	DeploymentParentCollector            *agentmodel.CollectorDeployment
	Service                              *agentmodel.Service
	ServiceParentCollector               *agentmodel.CollectorService
	Node                                 *agentmodel.Node
	NodeParentCollector                  *agentmodel.CollectorNode
	Cluster                              *agentmodel.Cluster
	ClusterParentCollector               *agentmodel.CollectorCluster
	Namespace                            *agentmodel.Namespace
	NamespaceParentCollector             *agentmodel.CollectorNamespace
	Job                                  *agentmodel.Job
	JobParentCollector                   *agentmodel.CollectorJob
	CronJob                              *agentmodel.CronJob
	CronJobParentCollector               *agentmodel.CollectorCronJob
	DaemonSet                            *agentmodel.DaemonSet
	DaemonSetParentCollector             *agentmodel.CollectorDaemonSet
	StatefulSet                          *agentmodel.StatefulSet
	StatefulSetParentCollector           *agentmodel.CollectorStatefulSet
	PersistentVolume                     *agentmodel.PersistentVolume
	PersistentVolumeParentCollector      *agentmodel.CollectorPersistentVolume
	PersistentVolumeClaim                *agentmodel.PersistentVolumeClaim
	PersistentVolumeClaimParentCollector *agentmodel.CollectorPersistentVolumeClaim
	Role                                 *agentmodel.Role
	RoleParentCollector                  *agentmodel.CollectorRole
	RoleBinding                          *agentmodel.RoleBinding
	RoleBindingParentCollector           *agentmodel.CollectorRoleBinding
	ClusterRole                          *agentmodel.ClusterRole
	ClusterRoleParentCollector           *agentmodel.CollectorClusterRole
	ClusterRoleBinding                   *agentmodel.ClusterRoleBinding
	ClusterRoleBindingParentCollector    *agentmodel.CollectorClusterRoleBinding
	ServiceAccount                       *agentmodel.ServiceAccount
	ServiceAccountParentCollector        *agentmodel.CollectorServiceAccount
	Ingress                              *agentmodel.Ingress
	IngressParentCollector               *agentmodel.CollectorIngress
	VerticalPodAutoscaler                *agentmodel.VerticalPodAutoscaler
	VerticalPodAutoscalerParentCollector *agentmodel.CollectorVerticalPodAutoscaler
	ECSTask                              *agentmodel.ECSTask
	ECSTaskParentCollector               *agentmodel.CollectorECSTask
}

OrchestratorPayload is a payload type for the orchestrator check

func ParseOrchestratorPayload added in v0.52.0

func ParseOrchestratorPayload(payload api.Payload) ([]*OrchestratorPayload, error)

ParseOrchestratorPayload parses an api.Payload into a list of OrchestratorPayload

func (OrchestratorPayload) GetCollectedTime added in v0.52.0

func (p OrchestratorPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (OrchestratorPayload) GetTags added in v0.52.0

func (p OrchestratorPayload) GetTags() []string

GetTags returns the tags within the payload

type PayloadItem

type PayloadItem interface {
	GetTags() []string
	GetCollectedTime() time.Time
	// contains filtered or unexported methods
}

A PayloadItem is the interface for payload items stored in a generic aggregator

type ProcessAggregator added in v0.50.0

type ProcessAggregator struct {
	Aggregator[*ProcessPayload]
}

ProcessAggregator is an Aggregator for ProcessPayload

func NewProcessAggregator added in v0.50.0

func NewProcessAggregator() ProcessAggregator

NewProcessAggregator returns a new ProcessAggregator

type ProcessDiscoveryAggregator added in v0.50.0

type ProcessDiscoveryAggregator struct {
	Aggregator[*ProcessDiscoveryPayload]
}

ProcessDiscoveryAggregator is an Aggregator for ProcessDiscoveryPayload

func NewProcessDiscoveryAggregator added in v0.50.0

func NewProcessDiscoveryAggregator() ProcessDiscoveryAggregator

NewProcessDiscoveryAggregator returns a new ProcessDiscoveryAggregator

type ProcessDiscoveryPayload added in v0.50.0

type ProcessDiscoveryPayload struct {
	agentmodel.CollectorProcDiscovery
	// contains filtered or unexported fields
}

ProcessDiscoveryPayload is a payload type for the process_discovery check

func ParseProcessDiscoveryPayload added in v0.50.0

func ParseProcessDiscoveryPayload(payload api.Payload) ([]*ProcessDiscoveryPayload, error)

ParseProcessDiscoveryPayload parses an api.Payload into a list of ProcessDiscoveryPayload

func (ProcessDiscoveryPayload) GetCollectedTime added in v0.50.0

func (p ProcessDiscoveryPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (ProcessDiscoveryPayload) GetTags added in v0.50.0

func (p ProcessDiscoveryPayload) GetTags() []string

GetTags is not implemented for process_discovery payloads

type ProcessPayload added in v0.50.0

type ProcessPayload struct {
	agentmodel.CollectorProc
	// contains filtered or unexported fields
}

ProcessPayload is a payload type for the process check

func ParseProcessPayload added in v0.50.0

func ParseProcessPayload(payload api.Payload) ([]*ProcessPayload, error)

ParseProcessPayload parses an api.Payload into a list of ProcessPayload

func (ProcessPayload) GetCollectedTime added in v0.50.0

func (p ProcessPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (ProcessPayload) GetTags added in v0.50.0

func (p ProcessPayload) GetTags() []string

GetTags is not implemented for process payloads

type SBOMAggregator added in v0.51.0

type SBOMAggregator struct {
	Aggregator[*SBOMPayload]
}

SBOMAggregator is an Aggregator for SbomPayload

func NewSBOMAggregator added in v0.51.0

func NewSBOMAggregator() SBOMAggregator

NewSBOMAggregator returns a new SbomAggregator

type SBOMPayload added in v0.51.0

type SBOMPayload struct {
	*agentmodel.SBOMEntity
	// contains filtered or unexported fields
}

SBOMPayload is a payload type for the sbom check

func ParseSbomPayload added in v0.51.0

func ParseSbomPayload(payload api.Payload) ([]*SBOMPayload, error)

ParseSbomPayload parses an api.Payload into a list of SbomPayload

func (*SBOMPayload) GetCollectedTime added in v0.51.0

func (p *SBOMPayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake

func (*SBOMPayload) GetTags added in v0.51.0

func (p *SBOMPayload) GetTags() []string

GetTags return the tags from a payload

type TraceAggregator added in v0.52.0

type TraceAggregator struct {
	Aggregator[*TracePayload]
}

TraceAggregator is an Aggregator for TracePayload

func NewTraceAggregator added in v0.52.0

func NewTraceAggregator() TraceAggregator

NewTraceAggregator returns a new TraceAggregator

type TracePayload added in v0.52.0

type TracePayload struct {
	*pb.AgentPayload
	// contains filtered or unexported fields
}

TracePayload is a payload type for traces It implements PayloadItem

func ParseTracePayload added in v0.52.0

func ParseTracePayload(payload api.Payload) ([]*TracePayload, error)

ParseTracePayload parses an api.Payload into a list of TracePayload

func (*TracePayload) GetCollectedTime added in v0.52.0

func (tp *TracePayload) GetCollectedTime() time.Time

GetCollectedTime returns the time that the payload was received by the fake intake TracePayload implements PayloadItem

func (*TracePayload) GetTags added in v0.52.0

func (tp *TracePayload) GetTags() []string

GetTags is not implemented TracePayload implements PayloadItem

Jump to

Keyboard shortcuts

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