Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Debug mode Debug bool // Backend for the collector Backend string // Index for the collection Index = "we-cli" // Type for the collection Type = "metrics" // BulkSize tells how many objects the bulk collects BulkSize = 50 // BackendTimeout for backend requests BackendTimeout = 5 * time.Second )
Functions ¶
Types ¶
type BulkCollector ¶
type BulkCollector struct {
RequestID string
IP string
XForwardedFor string
Feedback BulkCollectorFeedback
// contains filtered or unexported fields
}
BulkCollector is used for collecting the lines and posting to the backend
func (*BulkCollector) GetFeedback ¶
func (b *BulkCollector) GetFeedback() string
GetFeedback for a bulk collection
type BulkCollectorFeedback ¶
type BulkCollectorFeedback struct {
Errors bool `json:"errors"`
Objects int `json:"objects"`
JSONFailureLines []int `json:"json_failure_lines"`
Insertions []Insertion `json:"insertions"`
}
BulkCollectorFeedback is used for printing the statistics of the request
type Event ¶
type Event struct {
ID string `json:"id"`
Type string `json:"event_type,omitempty"`
Text string `json:"text,omitempty"`
PID string `json:"pid,omitempty"`
SID string `json:"sid,omitempty"`
Time string `json:"time,omitempty"`
Tags []string `json:"tags,omitempty"`
Extra map[string]string `json:"extra,omitempty"`
Scope string `json:"scope,omitempty"`
Version string `json:"version,omitempty"`
OS string `json:"os,omitempty"`
Arch string `json:"arch,omitempty"`
RequestID string `json:"request_id,omitempty"`
IP string `json:"ip,omitempty"`
XForwardedFor string `json:"x_forwarded_for,omitempty"`
Raw string `json:"raw"`
}
Event entry for collector see also metrics.Event
Click to show internal directories.
Click to hide internal directories.