Documentation
¶
Index ¶
- func RegisterMeta(m *AgentMeta)
- func Save(event *Event) error
- func SaveLog(event *Event) error
- func SaveWithTimestamp(event *Event, time2 time.Time) error
- func UpdateAgentID(agentID string)
- type Activity
- type ActivityMetadata
- type AgentMeta
- type Event
- func (e *Event) Delete(key string) error
- func (e *Event) GetValue(key string) (interface{}, error)
- func (e *Event) PutValue(key string, v interface{}) (interface{}, error)
- func (e *Event) SetErrorWithOption(jsonErr util.MapStr, addErrKey bool)
- func (e *Event) SetID(id string)
- func (e *Event) String() string
- type EventMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMeta ¶
func RegisterMeta(m *AgentMeta)
func UpdateAgentID ¶
func UpdateAgentID(agentID string)
Types ¶
type Activity ¶
type Activity struct { ID string `json:"id,omitempty" elastic_meta:"_id" elastic_mapping:"id: { type: keyword }"` Timestamp time.Time `json:"timestamp,omitempty" elastic_mapping:"timestamp:{type: date }"` Metadata ActivityMetadata `json:"metadata" elastic_mapping:"metadata: { type: object }"` Changelog interface{} `json:"changelog,omitempty" elastic_mapping:"changelog:{type: object,enabled:false }"` Fields util.MapStr `json:"payload" elastic_mapping:"payload:{type: object,enabled:false }"` }
type ActivityMetadata ¶
type ActivityMetadata struct { Labels util.MapStr `json:"labels,omitempty" elastic_mapping:"labels:{type: object }"` Category string `json:"category,omitempty"` Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` User util.MapStr `json:"user,omitempty"` }
type AgentMeta ¶
type AgentMeta struct { DefaultMetricQueueName string `json:"-"` LoggingQueueName string `json:"-"` AgentID string `json:"id,omitempty"` HostID string `json:"host_id,omitempty"` Hostname string `json:"hostname,omitempty"` MajorIP string `json:"major_ip,omitempty"` IP []string `json:"ips,omitempty"` Tags []string `json:"tags,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
type Event ¶
type Event struct { Agent *AgentMeta `json:"agent"` QueueName string `json:"-"` Timestamp time.Time `json:"timestamp,omitempty" elastic_mapping:"timestamp: { type: date }"` Metadata EventMetadata `json:"metadata"` Fields util.MapStr `json:"payload"` Meta util.MapStr `json:"-"` Private interface{} `json:"-"` // for beats private use TimeSeries bool `json:"-"` // true if the event contains timeseries data }
func (*Event) SetErrorWithOption ¶
SetErrorWithOption sets jsonErr value in the event fields according to addErrKey value.
Click to show internal directories.
Click to hide internal directories.