humio

package
v0.0.0-...-17da3fe Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHTTPStartStopAttributes

func AddHTTPStartStopAttributes(a *Attributes, e *events.Envelope, c caching.CachingClient)

func AddLogMessageAttributes

func AddLogMessageAttributes(a *Attributes, e *events.Envelope, c caching.CachingClient)

Types

type ApplicationAttribute

type ApplicationAttribute struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Attributes

type Attributes struct {
	EventType      string                `json:"eventtype"`
	EventTime      string                `json:"timestamp"`
	Deployment     string                `json:"deployment"`
	Environment    string                `json:"env"`
	Job            string                `json:"job"`
	Index          string                `json:"index"`
	IP             string                `json:"ip,omitempty"`
	Tags           map[string]string     `json:"tags,omitempty"`
	NozzleInstance string                `json:"instance"`
	Org            OrganizationAttribute `json:"org,omitempty"`
	Space          SpaceAttribute        `json:"space,omitempty"`
	App            ApplicationAttribute  `json:"app,omitempty"`
	HTTP           HTTPAttribute         `json:"http,omitempty"`
	Log            LogAttribute          `json:"log,omitempty"`
}

type Event

type Event struct {
	Timestamp  string     `json:"timestamp"`
	Attributes Attributes `json:"attributes"`
}

func NewEvent

func NewEvent(e *events.Envelope, c caching.CachingClient) *Event

type Events

type Events struct {
	Tags   Tags    `json:"tags"`
	Events []Event `json:"events"`
}

type HTTPAttribute

type HTTPAttribute struct {
	StartTimestamp string `json:"starttimestamp"`
	StopTimestamp  string `json:"stoptimestamp"`
	RequestID      string `json:"requestid"`
	PeerType       string `json:"peertype"`
	Method         string `json:"method"`
	URI            string `json:"uri"`
	RemoteAddress  string `json:"remoteaddr"`
	UserAgent      string `json:"ua"`
	StatusCode     int32  `json:"statuscode"`
	ContentLength  int64  `json:"contentlength"`
	InstanceIndex  int32  `json:"instanceindex"`
	InstanceID     string `json:"instanceid"`
	Forwarded      string `json:"forwarded"`
}

type HumioClient

type HumioClient interface {
	PushEvents(*Events) error
	SingleLog(string) error
}

func NewHumioClient

func NewHumioClient(humioConfig *HumioConfig, logger lager.Logger) HumioClient

type HumioConfig

type HumioConfig struct {
	Host      string
	Dataspace string
	Token     string
}

type LogAttribute

type LogAttribute struct {
	Message        string `json:"message"`
	MessageType    string `json:"messagetype"`
	Timestamp      string `json:"timestamp"`
	SourceType     string `json:"sourcetype"`
	SourceInstance string `json:"sourceinst"`
	SourceTypeKey  string `json:"sourcetypekey"`
}

type OrganizationAttribute

type OrganizationAttribute struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type SpaceAttribute

type SpaceAttribute struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Tags

type Tags struct {
	OrgID   string `json:"orgid,omitempty"`
	SpaceID string `json:"spaceid,omitempty"`
	AppID   string `json:"appid,omitempty"`
}

Jump to

Keyboard shortcuts

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